(gs)MT- REQUEST ID #551946 / STATUS: Resolved


I have been receiving “Cannot allocate memory” errors when trying to connect to a postgresql database
I believe I’m not doing anything weird on my end, and since it’s a website I just started developing I’m probably the only one opening the page.

Can you guys look at what the logs say?

the database is db64704_dothejob
and the website is http://dothejobfor.me/store


2009.03.30 05:40 PM
Mike M.

We would have to see the active processes running in order to see the out of memory errors. Since the databases are shared there is no log we can go to to see your specific memory error. I was able to access ‘http://dothejobfor.me/store‘ without any problems. Is there anything specific I should be doing to replicate the memory error?

Best Regards,

Mike M
Customer Support
Check out the New User Forums: http://kb.mediatemple.net/questions/824/
(mt) Media Temple
<v> 877-578-4000
<f> 310-564-2007

2009.03.31 01:30 AM
I just got the error message again:

pg_connect() [function.pg-connect]: Unable to connect to PostgreSQL server: could not fork new process for connection: Cannot allocate memory

started: 1:46am 9/14/2009

my mysql dies along:

There was an SQL error: Out of memory (Needed 122672 bytes) – SELECT *
FROM `music_song`
ORDER BY `songid` DESC
LIMIT 0, 10

and the problem lasted for 2 minutes

Sharon C.

These errors indicate that your scripts were trying to access the database server during the latency spike that occurred at about the time you documented. Due to the shared nature of the (gs) Grid-Service, there may be brief periods of resource unavailability. We have both automated and manual monitoring of the servers to keep these interruptions to a minimum; however, we apologize for the inconvenience. Basically, if several users are trying to use a higher-than-average amount of resources in the database SmartPool, we have automatic systems in place, and engineers who keep an eye on things, to move those high-load users to temporary isolated database servers, so that they can continue to function and other users won’t be affected. There can be a few minutes of resource unavailability before the load-balancing kicks in, however. If you want to read more about how MySQL on the (gs) Grid-Service works, please see this article:


If this system does not appeal to you, we also have MySQL Containers (we do not have PostGreSQL Containers, however). A MySQL Container will do two things for you. First, it will isolate you from other users, so you won’t be affected by any “bad neighbors” in the SmartPool, even for brief periods of time. Second, it will allow you to run a more detailed analysis on all your queries, so you can be sure your own database use is fully optimized. It’s completely seamless to move to and from a Container. See these articles for more details:

Getting started with your MySQL GridContainer

Generating a MySQL report for your MySQL container

Best Regards,

Sharon C.
Customer Support
(mt) Media Temple
<v> 877-578-4000
<f> 310-564-2007

NEW! User Forums: http://kb.mediatemple.net/questions/824/

2009.09.14 11:00 PM
Tagged , , , , . Bookmark the permalink.

Leave a Reply