Knowledgebase

Portal Home > Knowledgebase > Articles Database > Server crashing frequently


Server crashing frequently




Posted by rknuppel, 05-01-2008, 11:47 AM
Ok, this is getting out of control. I have a dedicated server that is "unmanaged" meaning, I manage it I typically can make my way around a server and do most things - but in this case I'm stuck. I host a number of websites on this box and have went over a year with little problems. The past month or so it seems as though the server crashes daily or every other day. It will be running just fine, then all of a sudden the processes and loads will go out of control until the server is just unusable. What do I need to provide here for you to be of any help to me? I watch the processes using "top -ci" and it's typically small output - but when it's getting ready to crash it's like a ton of processes get backed up and continue running. I can provide screenshots of anything, just want to know what someone would need to assist me a bit. Really appreciate it. Ryan

Posted by WebbyCart, 05-01-2008, 12:01 PM
Hi, I suggest that you get an Admin guy to look deeper into your server or get a Server Management company. Good luck. Regards, Bobby

Posted by ashish1987, 05-01-2008, 12:02 PM
Check what are you running low on, is it the RAM or the CPU? Also, check your apache logs to see which website/user is using so much of resources.

Posted by Patrick, 05-01-2008, 12:02 PM
Do you have any idea on what processes are "backing up" as you put it? Are they httpd or php, etc? This is a very important question in the quest for troubleshooting your issue.

Posted by david510, 05-01-2008, 12:53 PM
rknuppel, Was any additional software installed on the server lately? If the load consuming process is mysql, it can be that particular users updated/installed some plugins for some forums/blogs etc such as wordpress. In these cases server can act like this. Monitor the processes and if you see any certain user/user_database taking much resource have a check of that account in detail.

Posted by rknuppel, 05-01-2008, 01:40 PM
Thank you all so much for the help. Really appreciated. I've attached screenshot of my "top -ci" when it fails. It seems as though the httpd process is the one that gets backed up as I normally only have 1-4 of those processes live at anytime. I don't think anything out of the ordinary was installed lately. Is there a particular server log that is best to go back and see what the real problem/error is? Thanks again! Attached Thumbnails  

Posted by Patrick, 05-01-2008, 01:51 PM
Run the following and post the #'s here: ps aux | grep -v grep | grep -c http ps aux | grep -v grep | grep -c php You are correct that it does look like your httpd is getting swamped. Do you have a control panel, if not roughly how many websites do you host on that server? The first step is to determine what website is being swamped, but before I offer a suggestion on that I'll wait for the control panel answer as it may be easier.

Posted by rknuppel, 05-01-2008, 01:56 PM
Currently the server is running just fine. The numbers are: ps aux | grep -v grep | grep -c http = 31 ps aux | grep -v grep | grep -c php = 0 I host nearly 100 websites on the server but maybe only 15-20 are real active. I have WHM that I can login to for the machine. Thanks!

Posted by Patrick, 05-01-2008, 02:01 PM
Do you have suPHP installed to your knowledge? That would make it easier to track down what script (chances are it's a PHP script) on one of the websites that's causing / prolonging the problem. You can also login to WHM and click on "CPU/Memory/MySQL Usage" from the side menu. It'll give you a very rough idea on what websites are using the most resources. These load / crashing issues are often frustrating to track down, unless you have your own monitoring scripts in place to record what's going on and respond if possible.

Posted by ashish1987, 05-01-2008, 02:06 PM
You seem to be totally out of RAM In WHM go toCPU/Memory/MySQL Usage You should be able to spot the website here. What are your server specs?

Posted by mellow-h, 05-01-2008, 02:09 PM
Are you using any php cacher? Also let me know the output of the following command after it gets heavily loaded:

Posted by mellow-h, 05-01-2008, 02:11 PM
I was about to suggest that. If you are not using any php cacher, try changing to suphp with Worker MPM. That should reduce the usage of memory in your server. Or if you are using php cacher, try switching to Apache MPM Worker only. That should also reduce the total memory usage of your server.

Posted by rknuppel, 05-01-2008, 02:31 PM
Some more updates... I don't think I have suPHP installed. Next time the server goes wild (which will be soon at this pace) I'll run the netstat -plan|wc -l command. I tried going to CPU/Memory/MySQL Usage but it doesn't give me numbers. Note: This script will not able to track cgi cpu/memory usage if you do not have suexec installed. Should I have that installed?

Posted by rknuppel, 05-01-2008, 02:33 PM
suexec Status enabled I guess that's not why.

Posted by mellow-h, 05-01-2008, 02:33 PM
If you are using cpanel, then i would recommend you to go for suphp instead of using php with suexec. Its because the suphp will help you to save some memory as well as suphp is faster than suexec. So convert to suphp, then you should be able to trace who is taking higher memory and cpu.

Posted by rknuppel, 05-01-2008, 02:44 PM
Ok so the #'s and %'s are showing up now for MYSQL Usage... The one in Red is: nobody 39.29 71.54 0.0 Others: Top Process %CPU 15.3 /usr/local/apache/bin/httpd -DSSL Top Process %CPU 3.2 /usr/local/apache/bin/httpd -DSSL Top Process %CPU 2.4 /usr/local/apache/bin/httpd -DSSL mysql 1.23 4.36 0.0 Top Process %CPU 1.4 /usr/sbin/mysqld --basedir/ --datadir/var/lib/mysql --usermysql --pid-file/var/lib/mysql/cardinal.knuphost.com.pid --skip-external-locking Top Process %CPU 1.2 /usr/sbin/mysqld --basedir/ --datadir/var/lib/mysql --usermysql --pid-file/var/lib/mysql/cardinal.knuphost.com.pid --skip-external-locking Top Process %CPU 1.1 /usr/sbin/mysqld --basedir/ --datadir/var/lib/mysql --usermysql --pid-file/var/lib/mysql/cardinal.knuphost.com.pid --skip-external-locking root 1.10 14.87 2.0

Posted by FastServ, 05-01-2008, 04:40 PM
You're out of memory (RAM). Check out that nasty IO wait... your swapping like mad, and the drive is trashing out of control. I recommend jumping up to 4Gb for starters. Go from there.

Posted by rknuppel, 05-02-2008, 08:32 AM
Thank you all for all the advice. I did some server upgrades. Upgraded my Apache and to PHP5 - using suPHP. Things immediately seem better as far as server load goes. I will most likely increase RAM as well. Upgrading to PHP5 did cause problems of it's own - but I can deal with those THANKS TO EVERYONE! What a great forum and pool of knowledge.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Midphase Strikes again (Views: 568)


Language:

Contact us