100% CPU Usage (on all 8 cores)

Jim Ohlstein jim at ohlste.in
Sat Mar 19 23:51:05 MSK 2011


On 3/19/11 3:18 PM, kthxbai2u wrote:
> I have done some more debugging, and it appears the issue is with the VHosts... As soon as I comment out  this line:
> 
> include "/etc/nginx/vhosts/*";
> 
> and restart nginx, htop reports normal usage. CPU + Mem all fine.
> 
> I think I am going to poke around a bit more, but it seems there is a problem with the way NginX converts apache VirtualHosts to NginX VirtualHosts.

This is an interesting feature that I have never used. Can you explain
how nginx does this "conversion". Most of write our own configuration
files. Are you using a commercial prodict?

> 
> Oh another thing, the errors that should be ignorable are actually not ignorable... They all dissappeared. My guess is that someone went around telling people they can ignore errors like this:
> 
> nginx: [warn] conflicting server name "79.142.67.113" on 79.142.67.113:80, ignored
> nginx: [warn] conflicting server name "79.142.67.113" on 79.142.67.113:80, ignored
> nginx: [warn] conflicting server name "79.142.67.113" on 79.142.67.113:80, ignored
> nginx: [warn] conflicting server name "79.142.67.113" on 79.142.67.113:80, ignored
> nginx: [warn] conflicting server name "79.142.67.113" on 79.142.67.113:80, ignored
> nginx: [warn] conflicting server name "79.142.67.113" on 79.142.67.113:80, ignored
> nginx: [warn] conflicting server name "79.142.67.113" on 79.142.67.113:80, ignored

This means nginx is ignoring your conflicting server names and not
incorporating them at run time. This is your clue.

> nginx: [emerg] bind() to 79.142.67.110:80 failed (98: Address already in use)
> nginx: [emerg] bind() to 79.142.67.113:80 failed (98: Address already in use)
> nginx: [emerg] bind() to 79.142.67.112:80 failed (98: Address already in use)
> nginx: [emerg] bind() to 79.142.67.110:80 failed (98: Address already in use)
> nginx: [emerg] bind() to 79.142.67.113:80 failed (98: Address already in use)
> nginx: [emerg] bind() to 79.142.67.112:80 failed (98: Address already in use)
> nginx: [emerg] bind() to 79.142.67.110:80 failed (98: Address already in use)


Please run lsof -i :80 | grep -v nginx

This should tell you what other processes are bound to port 80.

> 
> 
> Those errors can NOT be ignored, according to my findings... Oh and by the way thats only half the errors, but they all seem to be the same or similair to those ones.
> 
> Is there any 3rd party tool to convert Apache VHosts to NginX Vhosts? I am googling as we speak :)

Again, I think you are using one. Or believe that you are.

> 
> Thanks for your help, it seems you may have nudged me in the right direction :)
> 
> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,183858,184011#msg-184011
> 
> 
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx


-- 
Jim Ohlstein



More information about the nginx mailing list