So this weekend I tried to push some new changes to my staging website. The site, musiciansub.com, is running Drupal so you basically need to run Drush to do any form of updates. Anyways, I logged onto the server and tried to do a drush update, and I recieved this error:
Fatal error: Out of memory (allocated 22806528) (tried to allocate 30720 bytes) in /home/musici12/staging.musiciansub.com/sites/all/modules/date/date_api.module on line 105
Drush command could not be completed.
After digging around the net I found many references to PHP memory limits. Where most people have fixed this error by simply setting the PHP.ini for Drush to use, or simply added ini_set to the drush.php file. Here are some links;
None of these worked for me. I always hit the 22806528 limit no matter what. This is roughly 20M, which is really small.
My problem was the Fork Bomb protection (http://en.wikipedia.org/wiki/Fork_bomb) that some hosting providers setup. The basic defense is to restrict your Bash (or whatever) shell to a very limited set of resources so that its difficult to bring down the server. In my case the memory limits.
After requesting that my hosting provider disable the fork bomb on my VPS, I’m back to being able to update my site.
I hope this helps someone, I wasted a few midnight hours trying to figure this out.