Welcome! Log In Create A New Profile

Advanced

Nginx Server & timeout

Posted by sysmanz 
Nginx Server & timeout
August 11, 2011 06:45AM
Hi all,
There is Ubuntu server with nginx as webserver.
Its a filehosting server and don't have any MySQL or PHP or anything else.
10 HDDs and nginx and 1 GB port with lot of files on it.
Also it host one website only.

the DATATRAFFIC graph from previous month show users used almost 1 GBitps/sec but from 3 weeks ago someone or by accident some of nginx custom configuration changed and from that time max DATATRAFFIC graph is on 400-500 Mbits/sec and gives time out error with terrible speed when people try to download something...
I don't know the real reason of this problem...
3 days ago my partner removed nginx and install it again but after then its more terrible than before...
More time out errors and less speed...
Now the server is in my hand and i need to do something about that...
also i saw in history my partner use this command ulimit -n 40000 (im not sure what is this for but he told me the problem should gone with this command)
also in nginx.conf
worker_connections 8000
worker_processes 16;
also in conf.d folder here is limit settings :
limit_conn one 24;
limit_rate 400k;
(I'll try to decrease them but as i did it before im sure the problem is not in here)

I can paste whole config if someone can help in this case...

nginx error log don't show anything...

TOP :
top - 15:17:02 up 4 days, 1:03, 3 users, load average: 17.01, 16.78, 16.82
Tasks: 335 total, 1 running, 334 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0%us, 0.6%sy, 0.0%ni, 97.5%id, 1.9%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 33006068k total, 32880076k used, 125992k free, 16896k buffers
Swap: 23741436k total, 0k used, 23741436k free, 30918240k cached

nginx_status
Active connections: 5515
server accepts handled requests
1354296 1354296 1764918
Reading: 58 Writing: 5388 Waiting: 69


Any idea ?
Any nginx expert ?!
What settings should i check in nginx ?!

Regards



Edited 1 time(s). Last edit at 08/11/2011 06:48AM by sysmanz.
Re: Nginx Server & timeout
August 11, 2011 07:24AM
here is message log :


Aug 11 15:52:43 TJ014 kernel: [351037.884030] net_ratelimit: 744 callbacks suppressed
Aug 11 15:52:43 TJ014 kernel: [351037.884058] nf_conntrack: table full, dropping packet.
Aug 11 15:52:43 TJ014 kernel: [351037.928763] nf_conntrack: table full, dropping packet.
Aug 11 15:52:43 TJ014 kernel: [351037.934224] nf_conntrack: table full, dropping packet.
Aug 11 15:52:43 TJ014 kernel: [351037.938412] nf_conntrack: table full, dropping packet.
Aug 11 15:52:44 TJ014 kernel: [351037.952279] nf_conntrack: table full, dropping packet.
Aug 11 15:52:44 TJ014 kernel: [351037.962390] nf_conntrack: table full, dropping packet.
Aug 11 15:52:44 TJ014 kernel: [351037.982251] nf_conntrack: table full, dropping packet.
Aug 11 15:52:44 TJ014 kernel: [351037.998427] nf_conntrack: table full, dropping packet.
Aug 11 15:52:44 TJ014 kernel: [351038.005714] nf_conntrack: table full, dropping packet.
Aug 11 15:52:44 TJ014 kernel: [351038.021848] nf_conntrack: table full, dropping packet.
Aug 11 15:52:49 TJ014 kernel: [351042.933530] net_ratelimit: 747 callbacks suppressed
Aug 11 15:52:49 TJ014 kernel: [351042.933535] nf_conntrack: table full, dropping packet.
Aug 11 15:52:49 TJ014 kernel: [351042.938368] nf_conntrack: table full, dropping packet.
Aug 11 15:52:49 TJ014 kernel: [351042.940795] nf_conntrack: table full, dropping packet.
Aug 11 15:52:49 TJ014 kernel: [351042.940930] nf_conntrack: table full, dropping packet.
Aug 11 15:52:49 TJ014 kernel: [351042.943720] nf_conntrack: table full, dropping packet.
Aug 11 15:52:49 TJ014 kernel: [351042.947181] nf_conntrack: table full, dropping packet.
Aug 11 15:52:49 TJ014 kernel: [351042.952938] nf_conntrack: table full, dropping packet.
Aug 11 15:52:49 TJ014 kernel: [351042.953392] nf_conntrack: table full, dropping packet.
Aug 11 15:52:49 TJ014 kernel: [351042.953400] nf_conntrack: table full, dropping packet.
Aug 11 15:52:49 TJ014 kernel: [351042.954217] nf_conntrack: table full, dropping packet.
Aug 11 15:52:54 TJ014 kernel: [351047.949424] net_ratelimit: 705 callbacks suppressed
Aug 11 15:52:54 TJ014 kernel: [351047.949428] nf_conntrack: table full, dropping packet.
Aug 11 15:52:54 TJ014 kernel: [351047.954102] nf_conntrack: table full, dropping packet.
Aug 11 15:52:54 TJ014 kernel: [351047.954790] nf_conntrack: table full, dropping packet.
Aug 11 15:52:54 TJ014 kernel: [351047.955249] nf_conntrack: table full, dropping packet.
Aug 11 15:52:54 TJ014 kernel: [351047.964266] nf_conntrack: table full, dropping packet.
Aug 11 15:52:54 TJ014 kernel: [351047.977582] nf_conntrack: table full, dropping packet.
Aug 11 15:52:54 TJ014 kernel: [351047.981354] nf_conntrack: table full, dropping packet.
Aug 11 15:52:54 TJ014 kernel: [351047.985038] nf_conntrack: table full, dropping packet.
Aug 11 15:52:54 TJ014 kernel: [351047.988954] nf_conntrack: table full, dropping packet.
Aug 11 15:52:54 TJ014 kernel: [351047.989820] nf_conntrack: table full, dropping packet.
Re: Nginx Server & timeout
August 11, 2011 10:22AM
I reboot server and its working so cool.

No more nf_conntrack: table full, dropping packet. Error !

But i think this problem will happened in next few hours ... any suggestion how to fix this for ever ?!
Re: Nginx Server & timeout
August 11, 2011 12:11PM
Just explain me how config nginx to don't get TimeOut Error for new people trying to download...

I limited connection limit to 8
and there is a lot of error that say limiting connections by zone "one" but its not important...
8 connection is enough...

But still when i try to download something it gives me timeout error for few times and then after few retry the download will start....

also i try to change
worker_connections 20000; also worker_rlimit_nofile 50000; but still same problem...

The server was good enough before...
How can i solve this ?!

Could Someone please reply in here...
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 278
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready