Jump to content

[Solved] Consistent high server load


Recommended Posts

Hi,

 

I've recently started seeing some very high server loads on the server which is running a Prestashop install for my customer. Rather than general load, there seem to be occasional processes that are causing one apache thread to work the box flat out. I've seen several cases where one process will sit for 10-20 seconds with 100% cpu usage. This doesn't seem to be database related, as there isn't an equivalent spike in load on the mysql process. In an attempt to fix this I have in the last couple of days:

  • Cleared all data in ps_connections, ps_connections_source and ps_connections_page more than two months old (general page loads seem subjectively faster, but the occasional busy threads are still present).
  • Updated to the latest version of Prestashop (1.4.6.2).
  • Upped the crawl-delay in robots.txt from 5 to 10 seconds.
  • cleared out the apache access / error logs as they had grown huge.
  • Installed and enabled memcache.

And I'm now sat here at 2am watching 7 apache processes in top which have for the last few minutes been consuming all the CPU resources on the server. Understandably I've an unhappy customer who's website is running slowly and occasionally refusing to serve pages entirely and an unhappy server admin who's understandably miffed that my site is slowing his server right down. I'm also more worried that this appears to be a problem that has suddenly started happening.

 

 

Does anyone have any ideas? Is there some housekeeping task that is due, being attempted but failing? I'm aware of the option to clear out the ps_connections table, but that is disabled, also as I say this doesn't seem to be driving the database hard, it looks to be working on pure number crunching in php...

Link to comment
Share on other sites

Oh I should add that having examined the log, there doesn't seem to be a huge flood of requests for obscure search combinations, when the busy threads occour there only seem to be reasonbly standard requests for categories / products being made.

Link to comment
Share on other sites

Found it in the end. A few categories had been marked as their own parent, i.e. id_parent = id_category. Not sure why this had suddenly caused a problem, but several web spiders seemed to have picked them up, and that was causing the busy threads. Presumably while something tried to step up the categories to build a breadcrumb or similar.

 

Hope this helps someone else out there :)

Link to comment
Share on other sites

  • 1 month later...
  • 4 months later...
  • 2 years later...
×
×
  • Create New...