# Nginx process high load cpu

**URL:** <https://www.ruby-forum.com/t/nginx-process-high-load-cpu/203202>\
**Category:** NGINX\
**Created:** [February 15, 2011, 3:12pm UTC](https://www.ruby-forum.com/t/nginx-process-high-load-cpu/203202 "2011-02-15T15:12:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [February 15, 2011, 3:12pm UTC](https://www.ruby-forum.com/t/nginx-process-high-load-cpu/203202/1 "2011-02-15T15:12:28Z")

</div>

Hi i have a script called mysql, when 10 people comes site at the same  
time cpu load above 1.50, with apache 20-30 people no problem no more  
then 2 at the same time. i’ve tried to install APC via whm its been  
automaticlly installed but when i restart nginx every nginx process  
takes 2% or %3 for 4-5 people at the same time (good sign) the problem  
is after 30 second it goes white screen automaticlly so i had to  
uninstall APC i dont know what to do

[![](http://img703.imageshack.us/img703/4042/highcpupad.png)](http://img703.imageshack.us/i/highcpupad.png/)

Posted at Nginx Forum:

> **[nginx process high load cpu](https://forum.nginx.org/read.php?2,175259,175259#msg-175259)**
>
> Hi i have a script called mysql, when 10 people comes site at the same time cpu load above 1.50, with apache 20-30 people no problem no more then 2 at the same time. i've tried to install APC via whm its been automaticlly installed but when i restart...

---

<div class="post-metadata">

**Author:** ![lifeisjustabout](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/74df32/32.png) [@lifeisjustabout](https://www.ruby-forum.com/u/lifeisjustabout)\
**Post date:** [February 15, 2011, 4:26pm UTC](https://www.ruby-forum.com/t/nginx-process-high-load-cpu/203202/2 "2011-02-15T16:26:26Z")

</div>

I see that you’re using php-cgi with APC. Do you have apc.mmap\_file\_mask  
specified in your APC config? Secondly, is there a reason you’re not  
using php-fpm instead of php-cgi?

> <https://stackoverflow.com/questions/598444/how-to-share-apc-cache-between-several-php-processes-when-running-under-fastcgi>

Posted at Nginx Forum:

> **[Re: nginx process high load cpu](https://forum.nginx.org/read.php?2,175259,175466#msg-175466)**
>
> Hi i have a script called mysql, when 10 people comes site at the same time cpu load above 1.50, with apache 20-30 people no problem no more then 2 at the same time. i've tried to install APC via whm its been automaticlly installed but when i restart...

---

<div class="post-metadata">

**Author:** ![lifeisjustabout](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/74df32/32.png) [@lifeisjustabout](https://www.ruby-forum.com/u/lifeisjustabout)\
**Post date:** [February 15, 2011, 4:52pm UTC](https://www.ruby-forum.com/t/nginx-process-high-load-cpu/203202/3 "2011-02-15T16:52:08Z")

</div>

hi kaspars

I tried to install APC and php-fpm but no luck i couldnt find any repo  
to do that i found some repo but they are fairly old and even try to  
install it says no package available either apc nor php-fpm do i need to  
use both apc and php-fpm in order to reduce cpu usage?

php-fpm: i tried manual installation but no luck after rpm installation  
i try to start it couldnt find config file and it says you need to use  
key either -a -e -i -v etc. even config file is there /etc/pfp.fpm.conf  
then i uninstalled

APC: tried to install manual no luck tried to install via whm installed  
but when i restart nginx page goes blank after 30second i dont know  
maybe spawn fcgi caused problem. then i unstalled apc

[![](http://img815.imageshack.us/img815/6632/stats2k.png)](http://img815.imageshack.us/i/stats2k.png/)

Uploaded with [ImageShack.us](http://imageshack.us)

Posted at Nginx Forum:

> **[Re: nginx process high load cpu](https://forum.nginx.org/read.php?2,175259,175479#msg-175479)**
>
> Hi i have a script called mysql, when 10 people comes site at the same time cpu load above 1.50, with apache 20-30 people no problem no more then 2 at the same time. i've tried to install APC via whm its been automaticlly installed but when i restart...

---

<div class="post-metadata">

**Author:** ![lifeisjustabout](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/74df32/32.png) [@lifeisjustabout](https://www.ruby-forum.com/u/lifeisjustabout)\
**Post date:** [February 18, 2011, 6:36pm UTC](https://www.ruby-forum.com/t/nginx-process-high-load-cpu/203202/4 "2011-02-18T18:36:22Z")

</div>

hi guys i solve this issue with php-fpm and APC my advice is never use  
spawn-fgci and use php-fpm with APC currently have 20 connection and  
0.65 cpu load

[![](http://img146.imageshack.us/img146/7465/newstats.png)](http://imageshack.us/photo/my-images/146/newstats.png/)

Uploaded with [ImageShack.us](http://imageshack.us)

Posted at Nginx Forum:

> **[Re: nginx process high load cpu](https://forum.nginx.org/read.php?2,175259,176368#msg-176368)**
>
> Hi i have a script called mysql, when 10 people comes site at the same time cpu load above 1.50, with apache 20-30 people no problem no more then 2 at the same time. i've tried to install APC via whm its been automaticlly installed but when i restart...
