Re: Help Required

Lists: pgsql-cygwin
From: "Kamalraj Singh Madhan" <kamalr(at)networkprograms(dot)com>
To: <pgsql-cygwin(at)postgresql(dot)org>
Subject: Help Required
Date: 2003-08-13 06:58:04
Message-ID: 008101c36168$424c1000$55cc09c0@kamalraj
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-cygwin

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


From: Jason Tishler <jason(at)tishler(dot)net>
To: Kamalraj Singh Madhan <kamalr(at)networkprograms(dot)com>
Cc: pgsql-cygwin(at)postgresql(dot)org
Subject: Re: Help Required
Date: 2003-08-13 11:13:56
Message-ID: 20030813111355.GE1108@tishler.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-cygwin

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


From: "Kamalraj Singh Madhan" <kamalr(at)networkprograms(dot)com>
To: "Jason Tishler" <jason(at)tishler(dot)net>
Cc: <pgsql-cygwin(at)postgresql(dot)org>
Subject: Re: Help Required
Date: 2003-08-13 12:42:39
Message-ID: 012d01c36198$741851e0$55cc09c0@kamalraj
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-cygwin

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(at)tishler(dot)net>
To: "Kamalraj Singh Madhan" <kamalr(at)networkprograms(dot)com>
Cc: <pgsql-cygwin(at)postgresql(dot)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


From: Jason Tishler <jason(at)tishler(dot)net>
To: Kamalraj Singh Madhan <kamalr(at)networkprograms(dot)com>
Cc: pgsql-cygwin(at)postgresql(dot)org
Subject: Re: Help Required
Date: 2003-08-13 15:09:38
Message-ID: 20030813150937.GI1108@tishler.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-cygwin

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