Jump to content

[Solved] 500 Error For About An Hour Now


GLaDOS

Recommended Posts

Well, after testing the ftp for krydos my site refuses to work and returns a 500 error

 

Update: after maybe 2 hours of downtime its up, at 5:21 pm

 

2 hours and 9 minutes of downtime confirmed by pingdom

 

PingdomAlert UP:

Secruity (www.fm1337.me) is UP again at 04/05/2013 01:19:34PM, after 2h 9m of downtime.

 

(got that email just a few seconds ago)

Link to comment
Share on other sites

500 errors can be caused by a lot of things. The most common are

  1. Exceeding Process Limit The solution is to not run as many processes. Opening cpanel, connecting to FTP, checking mail, connecting to webdisk, etc all increase your process count, and if you exceed your limit php will show 500 errors since it cannot start a new php process. This sometimes affects only the webmaster since opening cPanel and FTP etc is common when you're editing your site, but normal users won't have these errors since they will only be accessing your website not all the other services. The process limit is higher on Johnny so for some websites the solution to 500 errors might be to switch servers.
  2. Syntax Error in .htaccess If you have a syntax error in one of your .htaccess files it can cause a 500 error. The easiest way to check if this is the case is to delete or rename your .htaccess files and see if the 500 error goes away.
  3. Incorrect Permissions If the script or the directory that the script is in doesn't have the correct permissions it can cause 500 errors too. If you're running a php script the file permission should be 644. If you're running a cgi script it should have 755 permissions. Your directories should have 755 or 750 permissions.
  4. Exceeding Time Limit If your script exceeds the time limit it can be killed by the system which will also result in a 500 error. The solution to this problem is to break your long executing scripts into multiple faster scripts that can call each other. For instance longscript.php always results in a 500 error because it exceeds the time limit, but if script1.php runs for a short time, and then calls script2.php which calls script3.php they can together execute the same code as longscript.php without exceeding the time limit and being killed.
  5. High Server Load If the server is currently experiencing high server load scripts can return a 500 error when they would normally work. This is more common on Johnny than Stevie since Johnny is more unstable, and accounts that cause high load on Stevie are suspended. There isn't really anything that can be done about high load 500 errors other than trying again later when the load is lower.

I'm guessing your site was affected by the first reason in my list: Exceeding the process limit. FTP clients with the default settings generally try to get files uploaded and downloaded in the absolute fastest way possible. Those are the settings that we were testing to fix the firewall. The way FTP clients do this is by running as many concurrent FTP threads connected as many concurrent FTP connections as they can. Each FTP connection to the server uses on of your limited number of processes available. The reason we have to limit the number of processes is because if we didn't or if the limit was higher (as it is on Johnny) then one user would either maliciously or unintentionally be able to cause slow performance or downtime for all the other accounts on the server.

 

The solution is to not run as many processes. Opening cpanel, connecting to FTP, checking mail, connecting to webdisk, etc all increase your process count, and if you exceed your limit php will show 500 errors since it cannot start a new php process. This sometimes affects only the webmaster since opening cPanel and FTP etc is common when you're editing your site, but normal users won't have these errors since they will only be accessing your website not all the other services. The process limit is higher on Johnny so for some websites the solution to 500 errors might be to switch servers.

If your site shows a 500 error, log out of cpanel, close all FTP clients, shut down your email clients, etc. and it should clear up on it's own in a few minutes.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...