Thread: Optimal values for 500 connections

Optimal values for 500 connections

From
Pedro Doria Meunier
Date:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all,

I'm wondering what are the correct values in postgresql.conf for
max_connections = 500 ...

The values I had in 8.2.13 conf file worked without a problem but with
the new 8.3.7 postmaster simply refuses to start.

Any pointers would be highly appreciated ;-)

BR,

- --
Pedro Doria Meunier
GSM: +351 96 17 20 188
Skype: pdoriam

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFKRRhy2FH5GXCfxAsRAt7KAJ0eiq6dcDyuvK5JpcfLb8atGd9FUACgo1TG
G2dZFIB7BzU3bWcGBhikQaE=
=YSCi
-----END PGP SIGNATURE-----


Re: Optimal values for 500 connections

From
Scott Marlowe
Date:
On Fri, Jun 26, 2009 at 12:52 PM, Pedro Doria
Meunier<pdoria@netmadeira.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi all,
>
> I'm wondering what are the correct values in postgresql.conf for
> max_connections = 500 ...
>
> The values I had in 8.2.13 conf file worked without a problem but with
> the new 8.3.7 postmaster simply refuses to start.
>
> Any pointers would be highly appreciated ;-)

You likely need to increase max shared mem.  With linux that's easy to do with

sysctl -a|grep shm

to get a list, and then copy and paste with changes to
/etc/sysctl.conf.  Look them up on the google, or in our docs, some
good examples both places.

Note that anytime the postmaster doesn't startup it tries to log it
somewhere.  Look for postmaster logs and such.

Re: Optimal values for 500 connections

From
Pedro Doria Meunier
Date:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thank you Scott!

As always your advice is right to the point ;-)
That solved it.

Best regards,

Pedro Doria Meunier
GSM: +351 96 17 20 188
Skype: pdoriam




Scott Marlowe wrote:
> On Fri, Jun 26, 2009 at 12:52 PM, Pedro Doria
> Meunier<pdoria@netmadeira.com> wrote:
>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>>
>> Hi all,
>>
>> I'm wondering what are the correct values in postgresql.conf for
>> max_connections = 500 ...
>>
>> The values I had in 8.2.13 conf file worked without a problem but
>> with the new 8.3.7 postmaster simply refuses to start.
>>
>> Any pointers would be highly appreciated ;-)
>
> You likely need to increase max shared mem.  With linux that's easy
> to do with
>
> sysctl -a|grep shm
>
> to get a list, and then copy and paste with changes to
> /etc/sysctl.conf.  Look them up on the google, or in our docs, some
>  good examples both places.
>
> Note that anytime the postmaster doesn't startup it tries to log it
>  somewhere.  Look for postmaster logs and such.
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFKRR2E2FH5GXCfxAsRAlisAJ940HUpld/VCn8acq773jNQq6WXoACfV1EK
lUC1q1tYr0U3g3FT7bii1ZE=
=BYKl
-----END PGP SIGNATURE-----


Re: Optimal values for 500 connections

From
David Fetter
Date:
On Fri, Jun 26, 2009 at 07:52:43PM +0100, Pedro Doria Meunier wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi all,
>
> I'm wondering what are the correct values in postgresql.conf for
> max_connections = 500 ...

You can either increase your shared memory settings or see about a
connection pooler such as pgbouncer.  The latter will be lighter on
your system at the cost of maintaining another component.

Cheers,
David.
>
> The values I had in 8.2.13 conf file worked without a problem but with
> the new 8.3.7 postmaster simply refuses to start.
>
> Any pointers would be highly appreciated ;-)
>
> BR,
>
> - --
> Pedro Doria Meunier
> GSM: +351 96 17 20 188
> Skype: pdoriam
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (GNU/Linux)
> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
>
> iD8DBQFKRRhy2FH5GXCfxAsRAt7KAJ0eiq6dcDyuvK5JpcfLb8atGd9FUACgo1TG
> G2dZFIB7BzU3bWcGBhikQaE=
> =YSCi
> -----END PGP SIGNATURE-----
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general

--
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate