Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

My server is a FreeBSD system, I run nginx on it to proxy user requests to another real server. My problem is I can't visit my freebsd server after a while. The server is in another place, so I have to go to fix it. When the problem happens, the server can't ping another address, it can't use networks, if I reboot it and restart nginx, everything becomes normal. But after a while, it can't be visited again. I am not quite familiar with freebsd, so anyone can't help to find out the possible reason?

share|improve this question
add comment

3 Answers 3

I think it's problem with mbufs count. There is 2 possible solutions:

You can easily check limits: Compare values LIMIT and USED in vmstat

# vmstat -z
share|improve this answer
    
Do you mean the server has used out of all mbufs? I guess this will happen if we've too many visits, but our server is not visited by many users(not more than 100 before it's down), and will mbufs be reused after a time, which means the server will recover after some time? Till now nothing changed actually. –  gleery Oct 20 '09 at 8:59
    
mbufs, open files, somaxcon etc... there is too many limits in OS that you can bump in. –  SaveTheRbtz Oct 20 '09 at 9:04
    
thanks for your help, I will check by your hints –  gleery Oct 20 '09 at 9:11
add comment

Check the network card as well - it might be the mbufs issue that SaveTheRbtz mentions but I've also had this problem with a network card that would inexplicably 'wedge' after a while.

share|improve this answer
    
Yeah, that's might be good suggestion. Grep /var/log/messages for something like watchdog time out and other messages from your NICs' drivers –  SaveTheRbtz Oct 21 '09 at 20:58
add comment

Also check out your firewall, I had some problems with a server not forgetting about connections for a few hours. Eventually it would fill up its allotted connections and just reject everything else. If I waited it would come back. In the end I just had to disable connection tracking.

share|improve this answer
    
pf have state table that can overflow: use pfctl -sa and watch LIMITS –  SaveTheRbtz Oct 20 '09 at 20:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.