Nginx + PHP = VERY High CPU Usage

Roger Hoover roger.hoover at gmail.com
Fri Dec 10 22:42:39 MSK 2010


On Fri, Dec 10, 2010 at 11:35 AM, hasson <nginx-forum at nginx.us> wrote:
> I'm not using APC because I'm using PHP-MEMCACHE.
>
> Do you think that would be necessary the APC?

APC will complement memcache.  You can cache your application data in
memcache and cache your PHP op code in APC.

>
> By the way this is my configure
>
> [size=x-small]Configure Command         './configure' '--with-gdbm'
> '--with-mysql=/usr/local/mysql/'
> '--with-mcrypt=/usr/ports/security/mcrypt'
> '--with-gd=/usr/ports/graphics/gd/work/gd-2.0.35/' '--with-png-dir=/usr'
> '--with-zlib-dir=/usr' '--with-xpm-dir=/usr' '--with-freetype-dir=/usr'
> '--with-jpeg-dir=/usr' '--with-layout=GNU' '--localstatedir=/var'
> '--with-config-file-scan-dir=/usr/local/etc/php' '--enable-libxml'
> '--with-libxml-dir=/usr/local' '--with-pcre-regex=/usr/local'
> '--with-zlib-dir=/usr' '--with-regex=php' '--with-zend-vm=CALL'
> '--prefix=/usr/local' '--mandir=/usr/local/man'
> '--infodir=/usr/local/info/' '--build=i386-portbld-freebsd8.1'
> '--enable-mbstring' '--enable-fastcgi' '--enable-soap' '--with-curl'
> '--with-mcrypt' '--enable-zip' '--with-bz2'
> Server API      CGI/FastCGI[/size]
>
> On apache the production server is running nice, with mod_fastcgi.

Weird.  There must be something different about the way the php-cgi
daemons are spawned.

>
> Looking forward to figure out that =)

Maybe you can try running strace on the php-cgi process and see what it's doing.

>
> Thanks for your reply!
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,157575,157589#msg-157589
>
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx
>



More information about the nginx mailing list