Thread: SOMAXCONN, MaxBackendID and Postgres
hi wondered if anyone can help:- O/S S.u.s.e linux 6.0 kernel 2.0.36 postgres 6-4-2 I'm trying to increase the maximum number of connections on the operating system which invovles altering the SOMAXCONN and patching certain files. I've done that but im still limited by postgres. I found that the ./configure file was pulling in a different version of socket.h from the operating system. After altering that I still had the same problem. I've also increase the MaxBackendID and that still doesn't help. Is there any more documentation on SOMAXCONN or has anybody else had this problem. I know unix based O/S's have 128 connections but I need to increase this considerably. Currently im aming for about 512 connections. Is there any draw backs I should be aware of? any help on this is greatly appreciated. Thanks guys n gals,Stuart +-=-=-=-=-=-=-=-StOo-=-=-=-=-=-=-=-+ Stuart Hodgkinson - Software Engineer Comodo Technology Design
StOo <stuart@comodo.net> writes: > O/S S.u.s.e linux 6.0 > kernel 2.0.36 > postgres 6-4-2 > I'm trying to increase the maximum number of connections on the operating > system which invovles altering the SOMAXCONN and patching certain > files. Changing the max number of backends in 6.4.* is pretty painful. I'd suggest updating to 6.5.1 --- you can set the max to as high as 1024 without even recompiling. Whether your kernel will support that many is another question. Aside from the connections themselves, you need adequate swap space, file table slots, etc to support that many processes. You will also need larger-than-typical limits on the size of the shared memory block and on the max number of semaphores. regards, tom lane