Nginx slow load of php page

Ian Hobson ian at ianhobson.co.uk
Fri May 22 15:08:19 MSD 2009


Y. Yaax wrote:
> I am running nginx with php-fpm by fastcgi. All config settings are
> default. And since few days all php pages became very slow loading. Even
> simplest php script take about ONE minute to execute. Server is not
> loaded - its load is almost alway less then 1 - in average is 0.5, but
> php pages are still loading very very slow!
> Note that on the same server I am running Apache on different ip - not
> connected to nginx and not by proxy with nginx. And php on apache pages
> is loaded very fast, while through nginx it is loaded very slow!
> What can be reason of such problems and how can I fix it?
>   
It could be a number of things. Short of memory, waiting for a timeout.

Try taking Apache down and testing then. If php works fast, and slows 
again when Apache is restarted
you have your reason.  Give it more memory, make other things smaller, 
fewer worker threads, etc.

You don't need much. I run nginx on a 256MB VPS server with php and it 
flies!

Regards

Ian







More information about the nginx mailing list