2

I am getting 500 error "Internal Server Error" when I type in my domain. I called customer service and they said that my site has reached it maximum use of memory and therefore the cloud system generates this error. I have never heard of this before. What they said is I can get this error because of either higher:

  1. Memory Usage
  2. CPU Usage
  3. MySQL usage

They recommended to tweak the website and remove plugins etc to get rid of this error or upgrade. Things have not changed much here and we didn't do any major upgrade either. What should I tweak if any? Has anyone come across such error. We are hosting with lunarpages and using PHP 4.7 (it is an older site).

Would upgrading to PHP 5.3 fix things? Interestingly if I go to mydomain.com/index.php it works.

3
  • 1
    Check your error log (most part of hosting providers give access to this log) and read the exact error message. Commented Oct 11, 2011 at 15:05
  • [error] [client 173.200.xxx.xx] (12)Cannot allocate memory: couldn't spawn child process for: /home/mywebsite/public_html/index.php
    – TheTechGuy
    Commented Oct 11, 2011 at 15:29
  • It might be .htaccess too, try renaming the file for a few minutes and see if it happens with the file disabled.
    – Osvaldo
    Commented Oct 11, 2011 at 15:54

3 Answers 3

4

The error message Cannot allocate memory: couldn't spawn child process means that your server is running out of RAM.

This particular problem is common on shared hosting accounts with hosting companies that oversubscribe their service. If you are use shared hosting, then you will need to contact your web hosting company.

1
  • this might be true. Got feedback from the host again that their cloud system had some conflict and therefore cause our website not to load. The interpretation that the website was somehow using more memory was probably incorrect.
    – TheTechGuy
    Commented Oct 11, 2011 at 17:48
0

We have resolved this issue. The issue was likely caused because we exceeded Maximum Connection to the database. By default MySQL allows 151 concurrent connection to the database, if there are more requests, they will be dropped. You can increase Max Connections string by edit my.cnf file, more about it here

We also had a number of other issues with MySQL database such as slow queries, too much backlog which was contributing factor in 500 Error we are getting. I have documented that to some extent here which will help resolve your MYSQL issues

-1

You are accessing your dB and site as root or SA. As all data center administrators, you should have a privileged and non-privileged user ID. The 2nd is the one you use the most. Of course, it works with root. Then you may have other issues.

You need to demand beyond tier 1 or 2 support, especially if your site is monetized. Your requirements & theirs must be in your QoS agreement. If their error, a refund for hours down (they should know that data) ought to be in your QoS too. If "MORE" is the answer, as typically is, in a data center environment, you will have to work with your financials & legal divisions.

1
  • I have answered my question myself above which basically fixed the problem :)
    – TheTechGuy
    Commented Apr 1, 2019 at 16:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.