Thread: I've followed the faq and still getting too many clients errr
Help! I've recompiled pg. Here is what I did to correct 'too many clients' error I just change the following line in src/configure #define DEF_MAXBACKENDS 32 to #define DEF_MAXBACKENDS 100 Did I do that right? After ./configure I check src/include/config.h and see that previous number 32 has been changed to 100. Before I did the recompile I attempt to restart postmaster with -N 100 -B 200 options. I get the following error -------------- IpcMemoryCreate: shmget failed (Invalid argument) key=5432001, size=1929216, permission=600 This type of error is usually caused by an improper shared memory or System V IPC semaphore configuration. For more information, see the FAQ and platform-specific FAQ's in the source directory pgsql/doc or on our web site at http://www.postgresql.org. FATAL 1: ShmemCreate: cannot create region ------------ After recompiling I still use the same options and get the same error. So I assume that after recompilation I don't need to set the options manually and maximum will be automatically set to 100 etc.. That is not the case... I am still gettiing 'too many clients error' As an aside after the recompilation I get a new error ------------------- pq_flush: send() failed: Broken pipe pq_flush: send() failed: Broken pipe pq_flush: send() failed: Broken pipe --------------- like above before getting too many clients errors again. I really don't think I've reached 100 backends because top says that I have 90 processes altogether of which some are other processes.. linux 2.4.1 red hat 6.2 I'm in complete dodo now.. I've never expected this many hits and I really don't know what I can do to fix this continuous problem. Thanks much in advance for your help kz I am still getting too many clients error.
On Sun, 18 Feb 2001 newsreader@mediaone.net wrote: > I just change the following line in src/configure > #define DEF_MAXBACKENDS 32 > to > #define DEF_MAXBACKENDS 100 > > Did I do that right? After ./configure I check > src/include/config.h and see that previous number 32 > has been changed to 100. ./configure --with-maxbackends=100 Should do the job. -- Dominic J. Eidson "Baruk Khazad! Khazad ai-menu!" - Gimli ------------------------------------------------------------------------------- http://www.the-infinite.org/ http://www.the-infinite.org/~dominic/
Re: I've followed the faq and still getting too many clients errr
From
newsreader@mediaone.net
Date:
Thanks for your help... I just did that.. I'm still getting the error...within 1 minute of restarting my mod_perl server I doubt that I've reached that limit immediately. Should I do make distclean first?? On Sun, Feb 18, 2001 at 08:22:24PM -0600, Dominic J. Eidson wrote: > On Sun, 18 Feb 2001 newsreader@mediaone.net wrote: > > > I just change the following line in src/configure > > #define DEF_MAXBACKENDS 32 > > to > > #define DEF_MAXBACKENDS 100 > > > > Did I do that right? After ./configure I check > > src/include/config.h and see that previous number 32 > > has been changed to 100. > > ./configure --with-maxbackends=100 > > Should do the job. > > > -- > Dominic J. Eidson > "Baruk Khazad! Khazad ai-menu!" - Gimli > ------------------------------------------------------------------------------- > http://www.the-infinite.org/ http://www.the-infinite.org/~dominic/
Re: I've followed the faq and still getting too many clients errr
From
newsreader@mediaone.net
Date:
I trace the problem to kernel 2.4 -- I think. Appropriate section from kernel source documention is below. If anyone outthere is planning to upgrade linux kernel to 2.4 you might want to keep this in mind. It looks like all is well now... what a relief. -------------------------- You can find documentation about IPC with "info ipc" and also in section 6.4 of the Linux Programmer's Guide, available from http://www.linuxdoc.org/docs.html#guide . Shared memory is now implemented using a new (minimal) virtual file system. To mount it automatically at system startup just add the following line to your /etc/fstab: none /dev/shm shm defaults 0 0 Saying Y here enlarges your kernel by about 18 KB. Just say Y. ---------------------- On Sun, Feb 18, 2001 at 08:22:24PM -0600, Dominic J. Eidson wrote: > On Sun, 18 Feb 2001 newsreader@mediaone.net wrote: > > > I just change the following line in src/configure > > #define DEF_MAXBACKENDS 32 > > to > > #define DEF_MAXBACKENDS 100 > > > > Did I do that right? After ./configure I check > > src/include/config.h and see that previous number 32 > > has been changed to 100. > > ./configure --with-maxbackends=100 > > Should do the job. > > > -- > Dominic J. Eidson > "Baruk Khazad! Khazad ai-menu!" - Gimli > ------------------------------------------------------------------------------- > http://www.the-infinite.org/ http://www.the-infinite.org/~dominic/
Re: I've followed the faq and still getting too many clients errr
From
newsreader@mediaone.net
Date:
wrong! still too many clients.. aaaaargh On Sun, Feb 18, 2001 at 10:09:33PM -0500, newsreader@mediaone.net wrote: > > I trace the problem to kernel 2.4 -- I think. > Appropriate section from kernel source > documention is below. > > If anyone outthere is planning to upgrade linux kernel > to 2.4 you might want to keep this in mind. > > It looks like all is well now... what a relief. > > > -------------------------- > You can find documentation about IPC with "info ipc" and also in > section 6.4 of the Linux Programmer's Guide, available from > http://www.linuxdoc.org/docs.html#guide . > > Shared memory is now implemented using a new (minimal) virtual file > system. To mount it automatically at system startup just add the > following line to your /etc/fstab: > > none /dev/shm shm defaults 0 0 > > Saying Y here enlarges your kernel by about 18 KB. Just say Y. > ---------------------- > > > > > On Sun, Feb 18, 2001 at 08:22:24PM -0600, Dominic J. Eidson wrote: > > On Sun, 18 Feb 2001 newsreader@mediaone.net wrote: > > > > > I just change the following line in src/configure > > > #define DEF_MAXBACKENDS 32 > > > to > > > #define DEF_MAXBACKENDS 100 > > > > > > Did I do that right? After ./configure I check > > > src/include/config.h and see that previous number 32 > > > has been changed to 100. > > > > ./configure --with-maxbackends=100 > > > > Should do the job. > > > > > > -- > > Dominic J. Eidson > > "Baruk Khazad! Khazad ai-menu!" - Gimli > > ------------------------------------------------------------------------------- > > http://www.the-infinite.org/ http://www.the-infinite.org/~dominic/
Re: I've followed the faq and still getting too many clients errr
From
newsreader@mediaone.net
Date:
not so fast! i did not pay attention to the message mount point /dev/shm does not exist when the kernel was loading we will see soon whether this problem is really solved... On Sun, Feb 18, 2001 at 10:26:23PM -0500, newsreader@mediaone.net wrote: > wrong! still too many clients.. aaaaargh > > On Sun, Feb 18, 2001 at 10:09:33PM -0500, newsreader@mediaone.net wrote: > > > > I trace the problem to kernel 2.4 -- I think. > > Appropriate section from kernel source > > documention is below. > > > > If anyone outthere is planning to upgrade linux kernel > > to 2.4 you might want to keep this in mind. > > > > It looks like all is well now... what a relief. > > > > > > -------------------------- > > You can find documentation about IPC with "info ipc" and also in > > section 6.4 of the Linux Programmer's Guide, available from > > http://www.linuxdoc.org/docs.html#guide . > > > > Shared memory is now implemented using a new (minimal) virtual file > > system. To mount it automatically at system startup just add the > > following line to your /etc/fstab: > > > > none /dev/shm shm defaults 0 0 > > > > Saying Y here enlarges your kernel by about 18 KB. Just say Y. > > ---------------------- > > > > > > > > > > On Sun, Feb 18, 2001 at 08:22:24PM -0600, Dominic J. Eidson wrote: > > > On Sun, 18 Feb 2001 newsreader@mediaone.net wrote: > > > > > > > I just change the following line in src/configure > > > > #define DEF_MAXBACKENDS 32 > > > > to > > > > #define DEF_MAXBACKENDS 100 > > > > > > > > Did I do that right? After ./configure I check > > > > src/include/config.h and see that previous number 32 > > > > has been changed to 100. > > > > > > ./configure --with-maxbackends=100 > > > > > > Should do the job. > > > > > > > > > -- > > > Dominic J. Eidson > > > "Baruk Khazad! Khazad ai-menu!" - Gimli > > > ------------------------------------------------------------------------------- > > > http://www.the-infinite.org/ http://www.the-infinite.org/~dominic/
Re: I've followed the faq and still getting too many clients errr
From
newsreader@mediaone.net
Date:
not really!! too many clients already!!! i've set def-maxbackends to 1024!!! i've run out of all options.. it appears i thought i would never see the day my load average goes over 2.0 It's really painful to see it's now at 30 or so.. On Sun, Feb 18, 2001 at 10:46:25PM -0500, newsreader@mediaone.net wrote: > not so fast! i did not pay attention to > the message > mount point /dev/shm does not exist > when the kernel was loading > > we will see soon whether this problem > is really solved... > > On Sun, Feb 18, 2001 at 10:26:23PM -0500, newsreader@mediaone.net wrote: > > wrong! still too many clients.. aaaaargh > > > > On Sun, Feb 18, 2001 at 10:09:33PM -0500, newsreader@mediaone.net wrote: > > > > > > I trace the problem to kernel 2.4 -- I think. > > > Appropriate section from kernel source > > > documention is below. > > > > > > If anyone outthere is planning to upgrade linux kernel > > > to 2.4 you might want to keep this in mind. > > > > > > It looks like all is well now... what a relief. > > > > > > > > > -------------------------- > > > You can find documentation about IPC with "info ipc" and also in > > > section 6.4 of the Linux Programmer's Guide, available from > > > http://www.linuxdoc.org/docs.html#guide . > > > > > > Shared memory is now implemented using a new (minimal) virtual file > > > system. To mount it automatically at system startup just add the > > > following line to your /etc/fstab: > > > > > > none /dev/shm shm defaults 0 0 > > > > > > Saying Y here enlarges your kernel by about 18 KB. Just say Y. > > > ---------------------- > > > > > > > > > > > > > > > On Sun, Feb 18, 2001 at 08:22:24PM -0600, Dominic J. Eidson wrote: > > > > On Sun, 18 Feb 2001 newsreader@mediaone.net wrote: > > > > > > > > > I just change the following line in src/configure > > > > > #define DEF_MAXBACKENDS 32 > > > > > to > > > > > #define DEF_MAXBACKENDS 100 > > > > > > > > > > Did I do that right? After ./configure I check > > > > > src/include/config.h and see that previous number 32 > > > > > has been changed to 100. > > > > > > > > ./configure --with-maxbackends=100 > > > > > > > > Should do the job. > > > > > > > > > > > > -- > > > > Dominic J. Eidson > > > > "Baruk Khazad! Khazad ai-menu!" - Gimli > > > > ------------------------------------------------------------------------------- > > > > http://www.the-infinite.org/ http://www.the-infinite.org/~dominic/
At 10:26 PM 18-02-2001 -0500, newsreader@mediaone.net wrote: >wrong! still too many clients.. aaaaargh How much shared memory have you set in your kernel? You may need to increase SHMMAX and stuff like that (and recompile+reinstall kernel :( ). Take a look at FAQ 3.9 again. /usr/src/include/asm-i386/shmparam.h There doesn't appear to be an authoritative "this is the right value for SHMMAX". But I figure what works for installing Oracle should work for Postgresql :). So you could do a google search on oracle, linux and shmmax for examples. It doesn't seem to matter that much as long as there's enough and you don't go overboard :). Also what I found was the Linux 2.2.x sources I downloaded from www.kernel.org would default to a rather low "max tasks" (max number of processes)- NR_TASKs was 512 or something resulting with an even lower figure for MAX_TASKS_PER_USER. In contrast Redhat sets those to about 2000+ for their kernels. So values thereabouts should be safe. Cheerio, Link.
Lincoln Yeoh <lyeoh@pop.jaring.my> writes: > At 10:26 PM 18-02-2001 -0500, newsreader@mediaone.net wrote: >> wrong! still too many clients.. aaaaargh > How much shared memory have you set in your kernel? If the postmaster starts up, then he's got shared memory configured high enough for the number of buffers and backends he's asking for. My bet is he's got a startup script or postmaster.opts file that's setting maxbackends to some fairly small number. Changing the default maxbackends in the build is a complete waste of time, really, since it can be overridden in any case by a command line switch or options file. regards, tom lane