Hello, Linux noob here I'm having a problem with my VPS, Lighttpd crashes and all sites get a 500 internal server error until I restart this service. It's got a HyperVM/Lxadmin control panel, And Xcache is enabled. When I checked Qos everthing was within limits except for this: Description Current Used Maximum Held Barrier Limit Fail Count privvmpages 27417 92241 83200 83200 1544 Code (markup): what are privvmpages? I know it's to do with ram, but... Anyhow the last bit of my Lighttpd error log is: 2008-09-13 20:25:25: (response.c.537) file not found ... or so: Too many open files /index.html -> 2008-09-13 20:25:41: (mod_indexfile.c.180) file not found ... or so: Too many open files / -> /home/admin/****.net/ 2008-09-13 20:25:44: (mod_indexfile.c.180) file not found ... or so: Too many open files / -> /home/admin/****.net/ 2008-09-13 20:28:37: (response.c.537) file not found ... or so: Too many open files /index.html -> 2008-09-13 20:31:05: (response.c.537) file not found ... or so: Too many open files /robots.txt -> 2008-09-13 20:31:05: (mod_indexfile.c.180) file not found ... or so: Too many open files / -> /home/admin/****.net/ 2008-09-13 20:31:10: (mod_indexfile.c.180) file not found ... or so: Too many open files / -> /home/admin/****.net/ 2008-09-13 20:31:45: (mod_indexfile.c.180) file not found ... or so: Too many open files / -> /home/admin/****.net/ 2008-09-13 20:33:16: (mod_cgi.c.584) cgi died, pid: 12160 2008-09-13 20:33:16: (mod_cgi.c.1231) cgi died ? 2008-09-13 20:33:16: (mod_cgi.c.1231) cgi died ? 2008-09-13 20:33:16: (mod_cgi.c.1231) cgi died ? 2008-09-13 20:33:16: (mod_cgi.c.1231) cgi died ? Code (markup): Any ideas? or does anybody know where I can find some info on these error codes? Thanks in Advance.
"Too many open files", you could me hitting some limits. Can you paste the whole output of cat /proc/user_beancounters
Just seems to be hitting the privvmpages limit. what are privvmpages? resource held maxheld barrier limit failcnt kmemsize 2550282 12249561 2147483646 2147483646 0 lockedpages 0 0 1000 1000 0 privvmpages 40859 92241 83200 83200 1544 shmpages 0 656 65536 65536 0 dummy 0 0 0 0 0 numproc 34 190 1000 1000 0 physpages 37036 72159 0 2147483647 0 vmguarpages 0 0 65536 2147483647 0 oomguarpages 37036 72159 65536 2147483647 0 numtcpsock 20 208 8000 8000 0 numflock 2 45 1000 1000 0 numpty 0 1 500 500 0 numsiginfo 0 5 1000 1000 0 tcpsndbuf 357760 2323204 53687296 86455296 0 tcprcvbuf 327680 4545984 53687296 86455296 0 othersockbuf 17188 221808 53687296 86455296 0 dgramrcvbuf 0 29800 53687296 86455296 0 numothersock 14 37 8000 8000 0 dcachesize 0 0 9216000 9216000 0 numfile 1466 6809 24000 24000 0 dummy 0 0 0 0 0 dummy 0 0 0 0 0 dummy 0 0 0 0 0 numiptent 10 10 1000 1000 0 Code (markup):
You are running out of RAM. Basically you are using your burst ram, and the kernel is killing off your processes in that RAM in order to free it up for other users. Burst ram is only really there for load spikes. oomguarpages is your "Guaranteed" ram which is always available privvmpages is your "Burst" ram, which is there if there is free ram on the node, and it's not needed by other users. 99% of the time burst ram is twice that of the guaranteed ram. Perhaps if you can show us the output of ps aux we can help identify what's using all your ram up
Thanks for your help guys So... I should just order more ram? Where do I find ps aux? and is any of this sensitive info? (I'm looking for it now)
Just type in "ps aux" into SSH, its a command which will output all of the processes currently running. You probably will need more RAM But it may be something in particular which is chewing all of your RAM up.
Yeah proxy sites, lol Thanks heaps for your help. I'll talk with my host about some more ram. Also.. my VPS has no swap partition so I'll ask about this as well. I really appreciate your help with this. Thanks again! Rep added!
You can actually make the swap yourself, if they say no Just thought you should know Edit: Thanks for the reputation Jay
Ok.. couldn't help asking, lol How do I allocate my own swap partition? (I'm not going to do it, I'm just curious) Is there a reason why my host would not have given me one? I mean... I figure the least amount of disk writes on the server the better. So this would be for server optimization?
This should help you out: http://www.netadmintools.com/art1.html I'm not really sure why your host hasn't given you one. Maybe someone more fluent in OpenVZ may have a reason. Jay
With OpenVZ you basically get "Burst" ram instead of swap. The idea behind it is that burst ram is available for spikes etc when you need more than your guaranteed ram. As anyone knows, RAM is MUCH faster than Hard Disk. There is technically nothing wrong with manually creating a swapfile in your VPS, however your VPS will only really use it when you start to use up the burst ram as well. So technically you don't really gain anything by creating one. You could ask your host to disable burst ram, and then your swap file would be used when you exceed your huaranteed ram (like a dedicated server or a Xen based VPS), so that gives you stability if you exceed your allocated RAM, but it gets a bit slower. However if you use up your Burst ram, the kernel will kill off your processes after a while for someone else to use, which is why you have been having instability issues. Thanks for the rep HTH Chris
Thanks for explaining all that to me Chris I have more RAM related questions, mainly on what is normal usage between XEN Vs OpenVS (I have both VPS's at the moment) But I think I should ask about this in a new thread.
Personally, I don't think lighttpd+fcgi for dynamic sites, php etc. with lots of connections is a good solution. It simply doesnt work. I switched back to apache on a dedi for proxy sites from lighty and works fine till date.
Thanks agnivo007, would you might taking a look Here And letting me know what you think about this? I've got a VPS with apache as well, but that is using heaps of ram even when it's idle.
What would you expect from a VPS with less than 256MB guaranteed RAM? Sub 256MB VPSs are good for developing or testing etc. not for production in any sense. I personally won't take any VPS less than 512MB ram to run apache serving websites with traffic. Unlike lighty, apache is multi-process app. that makes it hog more memory even in idling state. But a little fine tuning and optimization can make apache run nicely.
That's just it! I didn't really know what to expect. This machine is not sub 256mb though. Hmm... I just didn't think apache would hog that much ram.