adam3000 Posted August 1, 2013 Share Posted August 1, 2013 We keep having random 500 Internal Server Errors on several of our PHP, MySQL, Magento based sites. I’ve spent hours trying to hunt down what’s happening. Where can I find a php, mysql, magento expert to help me resolve this for good? (Also, our host says our PHP-FPM process continues to segfault. If you know what that means.) Quote Link to comment Share on other sites More sharing options...
sqlnoob Posted August 26, 2013 Share Posted August 26, 2013 segfault is when your script uses up more CPU than the server can deliver. In essence your script has so many calculations that the server can't handle the workload. In other words it CRASHes, hence the random 500 internal server errors. You get the 500 error when the script has too many calculations to execute and you don't get the error when the script doesn't have too many calculations to execute. Let's say the server can handle a maximum of 10,000 rows, if the script fetches 10,001 rows or more it will crash and cause a 500 internal server error, if the script fetches 9,999 rows it will calculate it and serve the page just fine. The only solution is to limit the number of calculations in the script. For example: if you fetch 1 million rows from the sql database and then perform calculations on the fetched data, then the server will crash. The solution is to limit the number of rows fetched by let's say a 1000 rows. Quote Link to comment Share on other sites More sharing options...
kicken Posted August 26, 2013 Share Posted August 26, 2013 (edited) segfault is when your script uses up more CPU than the server can deliver. In essence your script has so many calculations that the server can't handle the workload. That is not at all correct. A SEGFAULT occurs when attempting to access an invalid memory location, such as trying to deference a null pointer. In theory, PHP should never SEGFAULT because the interpreter should not allow such conditions to happen. In practice, it'll happen sometimes due to bugs, unstable builds, poor extensions, etc. Edited August 26, 2013 by kicken Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.