Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Httpd Process High memory usage and slow page loads

I am running wampserver on my windows vista machine. I have been doing this for a long time and it has been working great. I have completed loads of projects with this setup.

However, today, without me changing anything (no configuration etc) only PHP code changes, I find that every time I load pages of my site (those with user sessions or access the database) are really slow to load - Over 30 seconds, they use to take 1 or 2 seconds.

When I have a look at the task manager, I can see on page loads the httpd process jumps from 10mb to 30mb, 90mb, 120mb, 250mb and then back down again.

I have tested previous php code projects and they seem to all be slow as well!

What is going on?

Thanks all for any help on this confusion issue!

like image 329
Abs Avatar asked Jul 16 '26 21:07

Abs


1 Answers

Check the following:

  • Check if you your data-access library to access your database has been changed/updated lately (if you use one).
  • Just a guess, but did you changed your antivirus/firewall (or settings) since last time you checked those previous projects? A more aggresive security can slow things a lot.
  • Did you changed the Apache/PHP/MySQL version in the WAMPSERVER menu?
  • Maybe you can try to reinstall WAMPSERVER (do this last and if it's not an hassle for you because I really doubt this will help but it can in some really really weird cases).

But from experience and the memory usage you explain in your question it seems that your SQL queries are long to execute and/or return a really large data set.

Try to optimise your queries, it can help for speed but not really memory usage (at least if the result set is the same). For the memory, maybe you can use LIMIT to reduce your returning data set (if your design allows it - but it should).

Since we don't really know what you do with your data, take note than "playing" (like parsing large XML documents) with large data sets can take much time/memory (again it depends much on what you do with all this data).

Bottom line, if nothing in this post helps, try to post more information on your setup and what exactly you do (with even code samples) when it's slow.

like image 98
AlexV Avatar answered Jul 19 '26 11:07

AlexV