Re: Memory issues

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: pgsql-general(at)postgresql(dot)org
Cc: Shiran Kleiderman <shirank1(at)gmail(dot)com>
Subject: Re: Memory issues
Date: 2012-09-27 06:59:09
Message-ID: 201209270859.09943.andres@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-performance

On Monday, September 24, 2012 08:45:06 AM Shiran Kleiderman wrote:
> Hi,
> I'm using and Amazon ec2 instance with the following spec and the
> application that I'm running uses a postgres DB 9.1.
> The app has 3 main cron jobs.
>
> *Ubuntu 12, High-Memory Extra Large Instance
> 17.1 GB of memory
> 6.5 EC2 Compute Units (2 virtual cores with 3.25 EC2 Compute Units each)
> 420 GB of instance storage
> 64-bit platform*
>
> I've changed the main default values under file *postgresql.conf* to:
> shared_buffers = 4GB
> work_mem = 16MB
> wal_buffers = 16MB
> checkpoint_segments = 32
> effective_cache_size = 8GB
>
> When I run the app, after an hour or two, free -m looks like below ans the
> crons can't run due to memory loss or similar (i'm new to postgres and db
> admin).
> Thanks!
>
> free -m, errors:
>
> total used free shared buffers cached
> Mem: 17079 13742 3337 0 64 11882
> -/+ buffers/cache: 1796 15283
> Swap: 511 0 511
>
> total used *free* shared buffers cached
> Mem: 17079 16833 *245 *0 42 14583
> -/+ buffers/cache: 2207 14871
> Swap: 511 0 511
>
> **free above stays low even when nothing is running.
>
> **errors:
> *DBI connect('database=---;host=localhost','postgres',...) failed: could
> not fork new process for connection: Cannot allocate memory*
> could not fork new process for connection: Cannot allocate memory
>
> and
> execute failed: ERROR: out of memory
> DETAIL: Failed on request of size 968. [for Statement "
> SELECT DISTINCT....
could you show cat /proc/meminfo?

Greetings,

Andres
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Albe Laurenz 2012-09-27 07:42:59 Re: idle in transaction query makes server unresponsive
Previous Message Chris Travers 2012-09-27 06:57:10 Re: PostgreSQL, OLAP, and Large Clusters

Browse pgsql-performance by date

  From Date Subject
Next Message Undertaker Rude 2012-09-27 08:33:33 Re: Same query doing slow then quick
Previous Message Jeff Janes 2012-09-27 00:04:08 Re: [GENERAL] Inaccurate Explain Cost