Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: bug after explain Linode
PostPosted: Sat Dec 18, 2010 11:48 pm 
Offline
Newbie

Joined: Sat Dec 18, 2010 11:43 pm
Posts: 2
I asked support about this problem. They couldn't help me. And now i here!

Recently, we've bought you linode 2048. Now, we have expanded our linode to 4096...

Linode, before expansion, was subjected to DDoS attacks (as well as now). To optimize server performance, we have done:
Used fail2ban utility, which monitored access.log our ngnix8 web-server, and adds entries in iptables if needs. Thus, already filtered about 15,000 hosts from attacker's botnet.
Increased possible limit open files from ~200,000 to 1,000,000. And also the limit of open files per user from 1000 to 32768 soft and 65536 hard links. Since the log file was included:
2010/12/10 01:22:13 [alert] 2097#0: accept () failed (1924: Too many open files)
2010/12/10 01:22:13 [alert] 2097#0: accept () failed (1924: Too many open files)
2010/12/10 01:22:13 [alert] 2097#0: accept () failed (1924: Too many open files)
2010/12/10 01:22:13 [alert] 2097#0: accept () failed (1924: Too many open files)

In addition, we increased the number of worker_connections to 32768 connections, on our nginx8 web server. Because in the log file was wrote, that it is not enough worker_connections, after we increased the limit of open files.
All this has significantly reduced the size of error.log file, and decrease the speed of its completion, which accelerate the performance of the system.

And then today, we have expanded our Linode ...
And now we see the same - error.log quickly filled with messages that:
2010/12/19 02:26:52 [alert] 2097#0: accept () failed (1924: Too many open files)
2010/12/19 02:26:52 [alert] 2097#0: accept () failed (1924: Too many open files)
2010/12/19 02:26:52 [alert] 2097#0: accept () failed (1924: Too many open files)
2010/12/19 02:26:52 [alert] 2097#0: accept () failed (1924: Too many open files)
Server performance - fell sharply.
We even increased the limits but it does not help.
Terminal's commands shows the following:

newmen@li199-4:/opt/nginx8/logs$ cat /proc/sys/fs/file-max
1000000
newmen@li199-4:/opt/nginx8/logs$ ulimit -Sn
65536
newmen@li199-4:/opt/nginx8/logs$ ulimit -Hn
131072

Why do not our old settings?
Please help me understand the issue.
Thanks a lot. Best wishes
Gleb


Top
   
 Post subject: now all right
PostPosted: Sun Dec 19, 2010 7:40 am 
Offline
Newbie

Joined: Sat Dec 18, 2010 11:43 pm
Posts: 2
Hello. I did something - do not even know that ... (=
I reduced the limits of open files to the old values, and rebooted Linode several times...
And now everything works as before.

Thanks a lot.


Top
   
 Post subject:
PostPosted: Sun Dec 19, 2010 11:04 am 
Offline

Joined: Thu Feb 18, 2010 10:20 pm
Posts: 1
You may also wish to look @ the "worker_rlimit_nofile" directive in your nginx config.

Can't find the article @ the moment but I believe that worker_processes * worker_connections * 2 is a good rule of thumb (where worker_processes matches your available cores).


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group