Can't increase max connections

Can't increase max connections

Post by peter_ » Tue, 27 Jul 2004 07:44:37



You need to show the error message if you want relevant help.

--
Peter Eisentraut
http://www.yqcomputer.com/ ~petere/


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster
 
 
 

Can't increase max connections

Post by mendol » Tue, 27 Jul 2004 08:03:17

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



| I have installed PostgreSQL 7.3 on FreeBSD 4.10 Stable, and have been
| trying to increase the max connections. the most I'm able to is 40, if I
| increase it any higher I'm unable to start the database. Is there any
| tip, s hte any guide where I can get an idea of the other values to set
| in postgresql.conf for increasing max connections? I had also recompile
| the kernel and changed maxusers from 0 to 64. I'm not sure if increasing
| it even more would allow me increase connections. Would appreciate some
| help, thanks.

Most likely you are out of shared memory segments that you OS allow.
If you are on Linux try to pump-up shmmax and shmall

Regards
Gaetano Mendola



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.yqcomputer.com/

iD8DBQFBBDwz7UpzwH2SGd4RAmO7AJ4jqXpBjglSZuwn7e92wRS23sJR+QCgkpLE
vK2twgkJ8Wi80vM+5KzWymg=
=C9sb
-----END PGP SIGNATURE-----


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to XXXX@XXXXX.COM )

 
 
 

Can't increase max connections

Post by shong_ » Tue, 27 Jul 2004 08:15:08

Actually I got it solved, I recompiled the kernel adding the options below:
options SYSVSHM
options SYSVSEM
options SYSVMSG
options SHMMAXPGS=65536
options SEMMNI=40
options SEMMNS=240
options SEMUME=40
options SEMMNU=120

And I made the following modifications to postgresql.conf:

shared_buffers = 4096
max_fsm_relations = 1024
max_fsm_pages = 16384
sort_mem = 4096

I was tthen able to increase it, I only set maxconnections to 200, because I'm using database pooling to manage connections which I'm only using 80 connections max.

Thanks.



Gaetano Mendola < XXXX@XXXXX.COM > wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Roberto De Shong wrote:

| I have installed PostgreSQL 7.3 on FreeBSD 4.10 Stable, and have been
| trying to increase the max connections. the most I'm able to is 40, if I
| increase it any higher I'm unable to start the database. Is there any
| tip, s hte any guide where I can get an idea of the other values to set
| in postgresql.conf for increasing max connections? I had also recompile
| the kernel and changed maxusers from 0 to 64. I'm not sure if increasing
| it even more would allow me increase connections. Would appreciate some
| help, thanks.

Most likely you are out of shared memory segments that you OS allow.
If you are on Linux try to pump-up shmmax and shmall

Regards
Gaetano Mendola



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBBDwz7UpzwH2SGd4RAmO7AJ4jqXpBjglSZuwn7e92wRS23sJR+QCgkpLE
vK2twgkJ8Wi80vM+5KzWymg=
=C9sb
-----END PGP SIGNATURE-----




Roberto De Shong


---------------------------------
Post your free ad now! Yahoo! Canada Personals

<DIV>
<DIV>Actually I got it solved, I recompiled the kernel adding the options below:</DIV>
<DIV>options        SYSVSHM</DIV>
<DIV>options        SYSVSEM</DIV>
<DIV>options        SYSVMSG</DIV>
<DIV>options        SHMMAXPGS=65536</DIV>
<DIV>options        SEMMNI=40</DIV>
<DIV>options        SEMMNS=240</DIV>
<DIV>options        SEMUME=40</DIV>
<DIV>options        SEMMNU=120</DIV>
<DIV> </DIV>
<DIV>And I made the following modifications to postgresql.conf:</DIV>
<DIV> </DIV>
<DIV>shared_buffers = 4096  </DIV>
<DIV>max_fsm_relations = 1024         </DIV>
<DIV>max_fsm_pages = 16384 </DIV>
<DIV>sort_mem = 4096</DIV>
<DIV> </DIV>
<DIV>I was tthen able to increase it, I only set maxconnections to 200, because I'm using database pooling to manage connections which I'm only using 80 connections max.</DIV>
<DIV> </DIV>
<DIV>Thanks.<BR><BR><BR><BR><B><I>Gaetano Mendola < XXXX@XXXXX.COM ></I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-L
 
 
 

Can't increase max connections

Post by Gaetano Me » Tue, 27 Jul 2004 08:47:45


> Actually I got it solved, I recompiled the kernel adding the options below:
> options SYSVSHM
> options SYSVSEM
> options SYSVMSG
> options SHMMAXPGS=65536
> options SEMMNI=40
> options SEMMNS=240
> options SEMUME=40
> options SEMMNU=120
>
> And I made the following modifications to postgresql.conf:
>
> shared_buffers = 4096
> max_fsm_relations = 1024
> max_fsm_pages = 16384
> sort_mem = 4096
>
> I was tthen able to increase it, I only set maxconnections to 200,
> because I'm using database pooling to manage connections which I'm only
> using 80 connections max.
>
> Thanks.

So if you need 80 connections why did you use 200 on the postgres side ?
You waste shared memory if you have 120 connections more then necessary.

Are you using pgpoll ?


Regards
Gaetano Mendola