Thread: Help Required

Help Required

From
"Kamalraj Singh Madhan"
Date:
Hi,
    I'am using PostGre SQL along with JBOSS and Tomcat for our application. After quite some time of the usage of the application i start getting these messages in my database console (Cygwin) :
 
 
DEBUG:  geqo_main: using edge recombination crossover [ERX]
CheckPoint Data Base: fork failed: Resource temporarily unavailable
/usr/bin/postmaster: BackendStartup: fork failed: Resource temporarily unavailable - Backend startup failed
DEBUG:  geqo_main: using edge recombination crossover [ERX]
CheckPoint Data Base: fork failed: Resource temporarily unavailable
CheckPoint Data Base: fork failed: Resource temporarily unavailable
DEBUG:  geqo_main: using edge recombination crossover [ERX]
 
 
 
After this the performance of the system worsens and in the end we have to restart either of the 2 application servers Tomcat or JBOSS. This makes everything work alright, till the time i again start getting these messages.
 
 
Kindly advice on this issue, it's urgent.
 
 
regards
Kamalraj Singh  

Re: Help Required

From
Jason Tishler
Date:
Kamalraj,

On Wed, Aug 13, 2003 at 12:28:04PM +0530, Kamalraj Singh Madhan wrote:
> I'am using PostGre SQL along with JBOSS and Tomcat for our
> application.  After quite some time of the usage of the application i
> start getting these messages in my database console (Cygwin) :
>
>
> DEBUG:  geqo_main: using edge recombination crossover [ERX]
> CheckPoint Data Base: fork failed: Resource temporarily unavailable
> /usr/bin/postmaster: BackendStartup: fork failed: Resource temporarily
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> unavailable - Backend startup failed
> DEBUG:  geqo_main: using edge recombination crossover [ERX]
> CheckPoint Data Base: fork failed: Resource temporarily unavailable
> CheckPoint Data Base: fork failed: Resource temporarily unavailable
> DEBUG:  geqo_main: using edge recombination crossover [ERX]

My WAG is that you hit the Cygwin fork() limit of 63 children per
parent.  If I'm correct, then I recommend limiting your connections to
~60 if possible.

Jason

--
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6

Re: Help Required

From
"Kamalraj Singh Madhan"
Date:
Hi,
        Could you please elaborate as in how do we alter the fork limit of
cygwin and what exactly will happen after we have increased the value. The
number of connections specified in our postgresql.conf is 240 and shared
buffers as 480, by making it ~60 what will we be achieving ? Looking forward
to your reply.

regards
Kamalraj

----- Original Message -----
From: "Jason Tishler" <jason@tishler.net>
To: "Kamalraj Singh Madhan" <kamalr@networkprograms.com>
Cc: <pgsql-cygwin@postgresql.org>
Sent: Wednesday, August 13, 2003 4:43 PM
Subject: Re: [CYGWIN] Help Required


> Kamalraj,
>
> On Wed, Aug 13, 2003 at 12:28:04PM +0530, Kamalraj Singh Madhan wrote:
> > I'am using PostGre SQL along with JBOSS and Tomcat for our
> > application.  After quite some time of the usage of the application i
> > start getting these messages in my database console (Cygwin) :
> >
> >
> > DEBUG:  geqo_main: using edge recombination crossover [ERX]
> > CheckPoint Data Base: fork failed: Resource temporarily unavailable
> > /usr/bin/postmaster: BackendStartup: fork failed: Resource temporarily
>                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > unavailable - Backend startup failed
> > DEBUG:  geqo_main: using edge recombination crossover [ERX]
> > CheckPoint Data Base: fork failed: Resource temporarily unavailable
> > CheckPoint Data Base: fork failed: Resource temporarily unavailable
> > DEBUG:  geqo_main: using edge recombination crossover [ERX]
>
> My WAG is that you hit the Cygwin fork() limit of 63 children per
> parent.  If I'm correct, then I recommend limiting your connections to
> ~60 if possible.
>
> Jason
>
> --
> PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
> Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
>                http://www.postgresql.org/docs/faqs/FAQ.html


Re: Help Required

From
Jason Tishler
Date:
Kamalraj,

On Wed, Aug 13, 2003 at 06:12:39PM +0530, Kamalraj Singh Madhan wrote:
> Could you please elaborate as in how do we alter the fork limit of
> cygwin and what exactly will happen after we have increased the value.

Unfortunately, it is not that simple...

Cygwin's fork() implementation has a hard limit of 63 children due to
its dependency on MsgWaitForMultipleObjects() which has its own
limitations:

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/msgwaitformultipleobjects.asp

Specifically, the following:

    nCount
        [in] Number of object handles in the array pointed to by
        pHandles. The maximum number of object handles is
        MAXIMUM_WAIT_OBJECTS minus one.

Additionally, we have the following:

    $ fgrep MAXIMUM_WAIT_OBJECTS /usr/include/w32api/winbase.h
    #define MAXIMUM_WAIT_OBJECTS 64

The above is why the magic number is 63.

Hence, to "alter the fork limit of cygwin" would require changing its
implementation.  This is not a trivial area of Cygwin to hack, but you
can always submit a patch.

> The number of connections specified in our postgresql.conf is 240 and
> shared buffers as 480, by making it ~60 what will we be achieving ?

Preventing your system from hitting the Cygwin fork() limit -- albeit,
with the obvious performance impact and/or connection refused errors...

Jason

--
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6