• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

Why VPS Server apache Restart automaticly?

Imteaz

New Member
I have a VPS with 512 MB ram and 50 GB space with 3000 Gb bandwidth.
and problem is last few days apache restart autoamticly. then my site goes down for few minutes then come back again. when i check my server status, it shows httpd failed and show red flash for couple of minutes then go green, what could be the problem?
 
Remove cpanel and install a panel that uses lighthttpd if your problem is resorce usage. cpanle wastes so much ram on VPS's
 
You might want to consider getting a Xen VPS.

Thats why dedicated which might have lower specs have advantage over VPS. The main reason is they have a "SWAP" memory of a couple of GB's or similar.
 
Before you do any of those stuff and assuming stuff, check the logs to see what the actual cause has been. The log file location varies based on the distro you're running.
 
Since it's in the last few days check the last few days logs and see what they say.
 
Could be several things. I haven't really seen issues with Virtuozzo based VPS' either OpenVZ or normal Virtuozzo running Apache and Cpanel as long as the box has at least 512MB RAM.

(Somewhat contradicting) On the other hand, I agree that it is probably running out of memory. You need to tune apache for the correct amount of load/memory usage. Do NOT use the Apache memory limit in Cpanel on a VPS. Next suggestion would be to tune MYSQL correctly as I am sure it is probably idling at 70MB+ memory.

Next step would be to turn off all of the additional crap that CPanel turns on.

Honestly, over the last couple of years and the amount of VPS' and problems we have seen with memory issues...I would never recommend CPanel for a VPS. It is a memory hog and very unforgiving when you have only the ability to burst with limited swap.

My final recommendation if tuning and removing additional services doesn't work. (It should in most cases) Would be to reformat the VPS and get a DirectAdmin license :)

I know following this post, I am going to get several, "Well my VPS runs fine with CPanel". Be grateful! In most cases it doesn't without alot of tuning and a very forgiving VZ configuration to allow extended bursts. On Xen, you are even worse off. There isn't a burst with Xen and most providers don't provide swap with Xen, so if you hit that 512MB....box goes down for a reboot.

Simplest place is to do a search on WHT for: apache tuning or httpd.conf tuning. There are several howtos that are very useful in the VPS section, many provide exactly what you need.

----------------------------------------------------------

I would also recommend checking the logs as Decker mentioned as well. It could also be that Apache is core dumping and restarting. (Possibly due to script issues, memory problems, too many threads.....etc/etc

Good luck.
 
Last edited:
A xen vps would be better since OpenVZ kills of processes when it rund out of ram resources, xen does not. Personally I think runninf cpanel on a openvz-based VPS (like virtuozzo is) is not a smart move. Like on other mentioned here, go with a control panel that uses light httpd, lxAdmin is the best i've seen for this.
 
Back
Top