RE: [PHP] PHP load to high on server
| From: | Stefan Moldoveanu | Date: | Wed, 18 Jan 2006 17:09:23 +0000 |
| Subject: | RE: [PHP] PHP load to high on server | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-228768@lists.php.net to get a copy of this message | ||
Hello,
The same problem I've had on a FreeBSD 4.11 box, running Apache 1.3.3 and PHP 4.3.5. From time to time, httpd went to 90%+ (I supposed it was a memory leak or smth).
After upgrading Apache to 1.3.4 and PHP to 4.4.2, everything smoothed down and we got no more 90+% httpd, even on heavy load.
If possible, try to downgrade/upgrade PHP and/or Apache (eventually on a test machine).
Regards,
Stefan
From: Jochem Maas
Sent: Mi 18.01.2006 18:59
To: Adi
Cc: Albert; PHP List
Subject: Re: [PHP] PHP load to high on server
Adi wrote:
Run some tracer apps on your code...could be some wild loops of some sort? Never the less, ZEND debugger with the module should do the job....it will tell you which files/functions etc are running....nice tool to track execution time etc... On 1/18/06, Albert <albert@fastworx.com> wrote:what changes? DB related per chance? doing any queries on tables that are not indexed properly? or maybe your app creates tons of objects? (in which case you might look at being able to clone objects rather than init new ones where possible).Hi I am running SuSE 9.2 (Kernel 2.6.8-24-default) with Apache 2.0.50 and PHP 4.3.8 (as an Apache module) on a Celeron 900 with 304MB RAM. This machine is used for testing. We have made some changes to our PHP application and now
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpthe machine is having trouble serving the pages. Apache is occupying almost 90% CPU usage. My Apache log configuration is: %a %b %H %r %>s %t %T %X %a : Remote IP %b : Size of response %H : Protocol %r : Request %>s : Last status of request %t : Time of request %T : Time to serve %X : Connection status after serving request In the log below the last character after the timestamp indicates the following: X : Connection terminated before end serving request + : Connection might not be terminated - : Connection terminated As you will notice almost all the statuses is connection might not have been terminated. The page having the heaviest load uses 5 simultaneous sessions - they refresh every 5 seconds. Even with just one connection there are 16 Apache threads running all occupying between 5 and 20% of CPU. Does anyone have an idea of what I can do (short of recoding)? TIA Albert From our Apache log: 192.168.x.x 216 HTTP/1.1 GET /selObject.php HTTP/1.1 200 [17/Jan/2006:16:16:29 +0000] 1 X 192.168.x.x 1845 HTTP/1.1 GET /msgMon.php?h=3D1024&w=3D1280 HTTP/1.1 200 [17/Jan/2006:16:16:28 +0000] 2 + 192.168.x.x 3711 HTTP/1.1 GET /display_menu.php HTTP/1.1 200 [17/Jan/2006:16:16:29 +0000] 1 + 192.168.x.x 2839 HTTP/1.1 GET /gd.php HTTP/1.1 200 [17/Jan/2006:16:16:29 +0000] 2 + 192.168.x.x 3279 HTTP/1.1 GET /display_target_information.php HTTP/1.1 200 [17/Jan/2006:16:16:31 +0000] 1 + 192.168.x.x 216 HTTP/1.1 GET /selObject.php HTTP/1.1 200 [17/Jan/2006:16:16:31 +0000] 1 + 192.168.x.x 13353 HTTP/1.1 GET /validation.php HTTP/1.1 200 [17/Jan/2006:16:16:33 +0000] 0 + 192.168.x.x 429 HTTP/1.1 GET /display_background.php HTTP/1.1 200 [17/Jan/2006:16:16:32 +0000] 2 + 192.168.x.x 178 HTTP/1.1 GET /selObject.php HTTP/1.1 200 [17/Jan/2006:16:16:33 +0000] 3 + 192.168.x.x 3325 HTTP/1.1 GET /display_target_information.php HTTP/1.1 200 [17/Jan/2006:16:16:33 +0000] 3 + 192.168.x.x 3711 HTTP/1.1 GET /display_menu.php HTTP/1.1 200 [17/Jan/2006:16:16:33 +0000] 3 X 192.168.x.x 1249 HTTP/1.1 GET /gd.php HTTP/1.1 200 [17/Jan/2006:16:16:33 +0000] 4 + 192.168.x.x 3279 HTTP/1.1 GET /display_target_information.php HTTP/1.1 200 [17/Jan/2006:16:16:34 +0000] 3 + 192.168.x.x 13353 HTTP/1.1 GET /validation.php HTTP/1.1 200 [17/Jan/2006:16:16:37 +0000] 1 + 192.168.x.x 431 HTTP/1.1 GET /display_background.php HTTP/1.1 200 [17/Jan/2006:16:16:35 +0000] 3 + 192.168.x.x 2823 HTTP/1.1 GET /gd.php HTTP/1.1 200 [17/Jan/2006:16:16:35 +0000] 4 + 192.168.x.x 13353 HTTP/1.1 GET /validation.php HTTP/1.1 200 [17/Jan/2006:16:16:39 +0000] 0 + 192.168.x.x 1845 HTTP/1.1 GET /msgMon.php?h=3D768&w=3D1024 HTTP/1.1 200 [17/Jan/2006:16:16:37 +0000] 3 + 192.168.x.x 216 HTTP/1.1 GET /selObject.php HTTP/1.1 200 [17/Jan/2006:16:16:38 +0000] 3 X 192.168.x.x 3711 HTTP/1.1 GET /display_menu.php HTTP/1.1 200 [17/Jan/2006:16:16:39 +0000] 2 X 192.168.x.x 3711 HTTP/1.1 GET /display_menu.php HTTP/1.1 200 [17/Jan/2006:16:16:39 +0000] 2 + 192.168.x.x 3279 HTTP/1.1 GET /display_target_information.php HTTP/1.1 200 [17/Jan/2006:16:16:39 +0000] 3 + 192.168.x.x 2828 HTTP/1.1 GET /gd.php HTTP/1.1 200 [17/Jan/2006:16:16:39 +0000] 3 + 192.168.x.x 429 HTTP/1.1 GET /display_background.php HTTP/1.1 200 [17/Jan/2006:16:16:42 +0000] 2 + 192.168.x.x 178 HTTP/1.1 GET /selObject.php HTTP/1.1 200 [17/Jan/2006:16:16:43 +0000] 2 + 192.168.x.x 3325 HTTP/1.1 GET /display_target_information.php HTTP/1.1 200 [17/Jan/2006:16:16:43 +0000] 3 + 192.168.x.x 1260 HTTP/1.1 GET /gd.php HTTP/1.1 200 [17/Jan/2006:16:16:43 +0000] 3 + 192.168.x.x 1845 HTTP/1.1 GET /msgMon.php?h=3D1024&w=3D1280 HTTP/1.1 200 [17/Jan/2006:16:16:43 +0000] 3 + 192.168.x.x 13353 HTTP/1.1 GET /validation.php HTTP/1.1 200 [17/Jan/2006:16:16:46 +0000] 0 + 192.168.x.x 3279 HTTP/1.1 GET /display_target_information.php HTTP/1.1 200 [17/Jan/2006:16:16:44 +0000] 1 + 192.168.x.x 216 HTTP/1.1 GET /selObject.php HTTP/1.1 200 [17/Jan/2006:16:16:46 +0000] 1 + 192.168.x.x 2807 HTTP/1.1 GET /gd.php HTTP/1.1 200 [17/Jan/2006:16:16:46 +0000] 1 + 192.168.x.x 13353 HTTP/1.1 GET /validation.php HTTP/1.1 200 [17/Jan/2006:16:16:48 +0000] 0 + 192.168.x.x 3711 HTTP/1.1 GET /display_menu.php HTTP/1.1 200 [17/Jan/2006:16:16:48 +0000] 0 + 192.168.x.x 3711 HTTP/1.1 GET /display_menu.php HTTP/1.1 200 [17/Jan/2006:16:16:48 +0000] 0 + 192.168.x.x 431 HTTP/1.1 GET /display_background.php HTTP/1.1 200 [17/Jan/2006:16:16:49 +0000] 1 + 192.168.x.x 216 HTTP/1.1 GET /selObject.php HTTP/1.1 200 [17/Jan/2006:16:16:49 +0000] 1 + 192.168.x.x 2808 HTTP/1.1 GET /gd.php HTTP/1.1 200 [17/Jan/2006:16:16:49 +0000] 2 + 192.168.x.x 3279 HTTP/1.1 GET /display_target_information.php HTTP/1.1 200 [17/Jan/2006:16:16:51 +0000] 1 + 192.168.x.x 13353 HTTP/1.1 GET /validation.php HTTP/1.1 200 [17/Jan/2006:16:16:53 +0000] 0 + 192.168.x.x 429 HTTP/1.1 GET /display_background.php HTTP/1.1 200 [17/Jan/2006:16:16:51 +0000] 2 + 192.168.x.x 1845 HTTP/1.1 GET /msgMon.php?h=3D768&w=3D1024 HTTP/1.1 200 [17/Jan/2006:16:16:51 +0000] 2 + 192.168.x.x 3711 HTTP/1.1 GET /display_menu.php HTTP/1.1 200 [17/Jan/2006:16:16:53 +0000] 2 X -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.14.19/231 - Release Date: 2006/01/16-- Take care... Adam