Solved

Troubleshooting Linux Website Downtime - Cause?

Posted on 2014-07-18
7
309 Views
Last Modified: 2014-08-05
I have a group of php websites / different domains that run off a single linux server (Centos).  All of the sites are forums for the most part that run off a single mysql database.  For some reason, one of the sites goes down multiple times a day.  The others don't.  The site that goes down receives the second most traffic but not the most.  So the server should be able to handle the load.  All of the sites are very similar in structure but not content.  I bought the sites so don't know the intricacies of all of the code.  I'm not a linux guy by any means (Windows guy) but have a tiny bit of linux experience that I've picked up during my troubleshooting.  I've tried looking at logs but haven't figured out what's causing it.  Any tips or suggestions on how to troubleshoot this?  Step by step directions / commands would be greatly appreciated.
0
Comment
Question by:adrian78
7 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 40205756
sites goes down
What exactly happens?
What error messages?
Have you enabled error reporting on the site?
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 40205803
Not enough info.  Details are required.
0
 
LVL 14

Accepted Solution

by:
ThomasMcA2 earned 167 total points
ID: 40205873
Right after the server goes down, look at recently modified logs in the /var/log directory on the server. Sometimes mysql has its own log folder (/var/log/mysql), so look for that, too.
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
LVL 108

Assisted Solution

by:Ray Paseur
Ray Paseur earned 167 total points
ID: 40206565
In PHP, make sure you have error_reporting(E_ALL) set, as well as log_errors.  This will give you some diagnostic information if, in fact, PHP errors are causing a problem.

If you want us to be able to help, we will need to know exactly what you mean by "site goes down multiple times a day."  We would need to see the actual URL of the site, the contents of the log files and any error messages, the most recent requests to the site immediately prior to the failure.
0
 

Author Comment

by:adrian78
ID: 40206925
Hi Guys,

Thanks for the replies.

Thomas, I'll go ahead and check those log files and report back.

Ray, I have error_reporting already on but it's not a PHP error (as far as I know) that's causing it.

There are no errors reported - the site just doesn't load (progress icon keeps spinning - almost like the resources are getting max'd).  The problem is it happens a handful of times during the day and I'm not usually on the computer when it happens.  I have a ping service (monastic) that checks every 30 min and emails me… so I don't know exactly when it happens but I know it's within 30 minutes.

I'll look into those logs a bit more and will update this thread.

Thanks again!
0
 
LVL 58

Assisted Solution

by:Gary
Gary earned 166 total points
ID: 40207396
Is it one particular page do you know? Or any page...
Is it MySQL getting maxed out and just showing up under this one site as it has the second most traffic.
What kinda of memory does the server have, and what is allocated to MySQL and to Apache.
Maybe you are running out of processes - how many visitors/page loads are you getting for all sites.
0
 

Author Closing Comment

by:adrian78
ID: 40242031
Thanks guys.  Your tips were helpful but I decided to switch to a cloud solution so I don't need to worry about this :)
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now