pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: lst_hoe02@kwsoft.de
To: pgsql-admin@postgresql.org
Subject: Re: [GENERAL] openvz and shared memory trouble
Date: Fri, 28 Mar 2014 11:35:22 +0100
Message-ID: <20140328113522.Horde.J_Q9G4tvRT0JfDnSF6I8eg2@webmail.kwsoft.de> (raw)
In-Reply-To: <CAHnozTjxUrfbaZVFbzibLQmhzR-n9ty+ktyRN2a0Tyr9PhApqQ@mail.gmail.com>
References: <CAHnozTjxUrfbaZVFbzibLQmhzR-n9ty+ktyRN2a0Tyr9PhApqQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>


Zitat von Willy-Bas Loos <willybas@gmail.com>:

> Hi,
>
> I have a problem with postgres in combination with openvz.
> My hot standby crashes on me when i give it a normal value for
> shared_buffers (4GB, which 25% of the memory in the container).
> When i tune down the shared_buffers, it works again. But of course this is
> far from desireable.

Have a look at the bean counters from OpenVZ. Some of them have  
dependencies to each other and can lead to unexpected out-of-memory  
condition inside the container. Check the logs for the reason  
PostgreSQL crashed, maybe it was the OOM killer.

> Now, i've seen a couple more messages around the net about openVZ and
> postgres that weren't very encouraging:
>
> http://www.postgresql.org/message-id/CAHyXU0xa5EgvjeH=4vp-eZDJdS5kMQuiDivvTRLjY-uZ62Y44w@mail.gmail....

This is about Postgres not able to read a block from a file, so it  
looks like a filesystem issue to me.

> http://www.postgresql.org/message-id/23206.1254683408@sss.pgh.pa.us

This is about "hot" migration which is in general a dangerous task for  
databases. Obviously it doesn't work in this case. We also had no  
success some time ago trying "hot" migration with Oracle Databases on  
OpenVZ.

> http://postgresql.1045698.n5.nabble.com/BUG-9721-Fatal-error-on-startup-no-free-slots-in-PMChildFlag...

This is also a related problem to the above. Freezing a running  
database (which is also done for migration) must be atomic, else the  
internal database states might get confused.

> But i am in a position where we already have a pretty strong binding with
> openVZ.
> I also have a colleague that has been using openVZ and postgres on
> production for quite a while now, without any problems. And already 1 of
> our servers is running a production database in openVZ that is well used,
> without any trouble of this kind.
>
> Now, what i would like to know is:
>
>    - is there clarity about what the issues are at all
>    - is it just 1 problem (in openVZ) that make openVZ and postgres so
>    poorly compatible?
>    - how can i stay out of trouble (when using postgres inside openVZ)
>    - who else has trouble with openVZ in combination with postgres, and
>    what constitutes the trouble?

 From my point of view your problem is not related to the URLs shown.  
You have to carefully check the Container settings and errors and  
avoid freezing/migrating the database container if possible.

In general there is no Problem with databases inside Containers but  
you have to carefully check the settings for the container in question  
and test the advanced features like hot migration if you really have  
to use them.

Regards

Andreas

Attachments:

  smime.p7s (application/pkcs7-signature, 5.8K) download

view thread (15+ messages)  latest in thread

Message-ID: <20140328113522.Horde.J_Q9G4tvRT0JfDnSF6I8eg2@webmail.kwsoft.de>
Permalink:  ../20140328113522.Horde.J_Q9G4tvRT0JfDnSF6I8eg2@webmail.kwsoft.de/
Also on:    postgresql.org/message-id/20140328113522.Horde.J_Q9G4tvRT0JfDnSF6I8eg2@webmail.kwsoft.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: lst_hoe02@kwsoft.de
  Subject: Re: [GENERAL] openvz and shared memory trouble
  In-Reply-To: <20140328113522.Horde.J_Q9G4tvRT0JfDnSF6I8eg2@webmail.kwsoft.de>
  References: <CAHnozTjxUrfbaZVFbzibLQmhzR-n9ty+ktyRN2a0Tyr9PhApqQ@mail.gmail.com> <20140328113522.Horde.J_Q9G4tvRT0JfDnSF6I8eg2@webmail.kwsoft.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox