Solved

Troubleshooting Linux Website Downtime - Cause?

Posted on 2014-07-18
7
310 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 109

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Making API calls from hashed passwords 26 52
Ubuntu Apache Webserver - File Permissions 5 34
comma true 6 32
does post require a form or curl to be post 4 29
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
These days socially coordinated efforts have turned into a critical requirement for enterprises.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

776 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