Re: PHP load to high on server

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxx> wrote:
>
> 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
> the 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

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux