Jump to content

Recommended Posts

Posted

Hello,

 

During the last hour (3h30 AM 4h30 AM GMT+1) I'm experiencing problem connecting to MySQL Database.

Response from one of my script :

Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'

 

I checked the state of service and saw that MySQL is running properly however the cpu usage is

Server Load 11.58 (4 cpus)

 

I know it's not coming from me cause there is no activity on my site nor on my SQL Database.

 

Is there any back up job running during this period of time or is there any account using this amount of CPU ?

 

I think it's causing every account to have problem connecting to MySQL and give also some timeouts situations or 500 Internal Server Errors.

 

Thanks in advance for the reply

Posted

This doesn't reply to my question. I already saw the post before posting mine by the way. I speak about CPU usage blocking queries to MySQL Database or causing timeouts for php or causing 500 Internal error.

Posted

Reason for 500 erros:-

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.

Posted

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. ==> this is the answer. Hope High server usage will not be too often... Might be a reason to seek another hosting.

Posted

You can switch to Stevie if you don't need programming languages like ASP.NET, Java, or Ruby. Stevie has much lower server load than Johnny most of the time.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...