# Nginx 100% cpu usage

**URL:** <https://www.ruby-forum.com/t/nginx-100-cpu-usage/226313>\
**Category:** NGINX\
**Created:** [July 11, 2012, 1:01pm UTC](https://www.ruby-forum.com/t/nginx-100-cpu-usage/226313 "2012-07-11T13:01:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lalyos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/48db29/32.png) [@lalyos](https://www.ruby-forum.com/u/lalyos)\
**Post date:** [July 11, 2012, 1:01pm UTC](https://www.ruby-forum.com/t/nginx-100-cpu-usage/226313/1 "2012-07-11T13:01:26Z")

</div>

Hi,

im using nginx 0.8.54 in front of a tomcat. its running since 1 week  
now, and with just a few open sessions, nginx is using 100% cpu.

strace is telling that ‘munmap’ is responsible for 94%. so looks like  
some sort of memory problem,  
but top shows that 400mb is free from the 4gb total memory.

more detailed logs (strace sample/top/nginx acces/error logs)

> <https://gist.github.com/lalyos/3089367>
>
> There are more than three files. show original

note this is a vmware virtual machine.

any tips?

Posted at Nginx Forum:

> **[nginx 100% cpu usage](https://forum.nginx.org/read.php?2,228495,228495#msg-228495)**
>
> Hi, im using nginx 0.8.54 in front of a tomcat. its running since 1 week now, and with just a few open sessions, nginx is using 100% cpu. strace is telling that 'munmap' is responsible for 94%. so looks like some sort of memory problem, but top shows...

---

<div class="post-metadata">

**Author:** ![lalyos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/48db29/32.png) [@lalyos](https://www.ruby-forum.com/u/lalyos)\
**Post date:** [July 11, 2012, 2:11pm UTC](https://www.ruby-forum.com/t/nginx-100-cpu-usage/226313/2 "2012-07-11T14:11:32Z")

</div>

> any tips?

Upgrade.  
0.8.54 is like 2 years old already and there have been few bugs relating  
to  
cpu hogging.

rr

---

<div class="post-metadata">

**Author:** ![lalyos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/48db29/32.png) [@lalyos](https://www.ruby-forum.com/u/lalyos)\
**Post date:** [July 30, 2012, 10:00am UTC](https://www.ruby-forum.com/t/nginx-100-cpu-usage/226313/3 "2012-07-30T10:00:27Z")

</div>

Hi Reinis,

I was using nginx as part of the CloudFoundry framework, so first i  
tried to use the nginx version they provided.  
but i couldn’t figure it out, so I just did an upgrade to 1.1.5 (that  
was the latest i could use with the required plugins)

cpu hogging is gone,  
thanks for the tip!

cheers,

lalyos

Posted at Nginx Forum:

> **[Re: nginx 100% cpu usage](https://forum.nginx.org/read.php?2,228495,229089#msg-229089)**
>
> Hi, im using nginx 0.8.54 in front of a tomcat. its running since 1 week now, and with just a few open sessions, nginx is using 100% cpu. strace is telling that 'munmap' is responsible for 94%. so looks like some sort of memory problem, but top shows...
