Resolved: Gallery creating problem httpd processes
|
larryl
Joined: 2002-09-16
Posts: 41 |
Posted: Thu, 2006-05-04 04:14
|
|
I have a gallery with 26K+ pictures. Customers post their images here and link to them from external websites. Recently I started getting reports of timeouts on other processes that the server runs (pop3, imap, smtp, http for other sites, etc). We've been monitoring top for several days and found httpd to be the culprit. More specifically, since I upgraded to 2.1.1 Gallery is spawning httpd processes that consume more than 90% of the cpu available on the system. These processes continue for 3, 4, or 5 minutes or more of cpu time until I kill them. They choke off any other activity the box is trying to do, which customers on my other sites somewhat miffed. I let one go for over 20 minutes of cpu time just to see how long it would last, but I finally killed it. The Gallery processes are starting every 5-15 minutes. The access_log doesn't show anything particularly noteworthy, just access to the Gallery pictures. The server has 2GB of memory and does almost no swapping. There is plenty of disk space available and we are not even approaching out bandwidth capability limit. I would appreciate any help you can provide in diagnosing the problem. If you want to see some nice scuba pictures feel free to visit http://www.allenhost.com/gallery. phpinfo
|
|
| Login or register to post comments |

Posts: 12
Same problem I am having and have yet to know why.
Posts: 32356
no idea what causes that on your webserver.
you've got there a ton of apache modules running. it's difficult to identify the problem if there are so many involved componennts. one has to systematically rule out possibilities, e.g. by running apache only with the very basic modules. running g2 only with the core module. etc.
and g2 isn't spawning _httpd_ processes / threads. g2 does some shell calls for imagemagick, zip, unzip, netpbm, ffmpeg etc. to do some rare actions like generating a thumbnail.
Posts: 41
Resolution: A web bot was making thousands of requests per day from the gallery, apparently caching all the images. We expected each request to generate a new http process, but apparently Apache will try to attach new requests to the first open http process it can find. Piling new requests onto an open process caused the process to stay active for long periods of time and consume all processor resources.
Blocking requests from the web bot has made the issue go away for now.
Posts: 38
Hi
Gallery caused CPU overload on my web hosting server again. Any affordable hosting companies with reliable servers to recommend? It seems the technical personnel at my current web hosting company isn't interested in helping out to solve my problem and has immediately suspended my account without sending me an email (2nd time CPU overload).
-----
Photography gallery at http://www.kennyyeoh.com
Posts: 80
In normal operation, Gallery does not load the CPU that much more than other typical PHP applications. Check what pages generate the most load. I had serious load problems because of the Googlebot repeatedly hammering slideshow pages. Instead of banning the bot you can just restrict it from the CPU-heavy page. I opened a thread about it : http://gallery.menalto.com/node/49282.
Also check if you use the G2 caching feature. It very significantly reduces the load induced by high traffic.