Re: 8.2.3: Server crashes on Windows using Eclipse/Junit

From: Rainer Bauer <usenet(at)munnin(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: 8.2.3: Server crashes on Windows using Eclipse/Junit
Date: 2007-10-20 20:15:27
Message-ID: u5okh3dktco7uvusi5ggc14hl7i85s5lad@4ax.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

"Trevor Talbot" wrote:

>On 10/20/07, Rainer Bauer <usenet(at)munnin(dot)com> wrote:
>> "Magnus Hagander" wrote:
>>
>> >> - Max_connections is set to 500. I did that originally because I kept
>> >> seeing a message about no connection available and I thought it was
>> >> because I was not allocating enough connections. My machine has 2GB of RAM.
>> >
>> >There's your problem. 500 is way above what the windows version can handle. IIRC the hard max is somewhere around 200 depending on some OS factors that we don't entirely know. I'd never recommend going above 100-150. With no more than 2Gb ram, not above 100.
>>
>> My guess is that Windows is running out of handles. Each backend uses about
>> 150 handles. 100 Backends means 15000 handles. Depending how many other
>> programs are currently running the no. of startable backends will vary
>> depending on the total handle limit Windows imposes.
>
>Those are kernel object handles; the ceiling does depend on available
>kernel memory, but they're cheap, and postgres is in no danger of
>running into that limit. Most of the handle limits people talk about
>are on USER (window etc) objects, which come from a single shared
>pool.

You are right. I just did a quick test and depending on the handle type these
limits are quite high. I could create 5 millions events or 4 millions
semaphores or 3,5 millions mutexes before the system returned error 1816
ERROR_NOT_ENOUGH_QUOTA "Not enough quota is available to process this
command.".

Rainer

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rainer Bauer 2007-10-20 20:42:00 Re: 8.2.3: Server crashes on Windows using Eclipse/Junit
Previous Message Tom Lane 2007-10-20 19:44:04 Re: UNIQUE INDEX and PRIMARY KEY

Browse pgsql-hackers by date

  From Date Subject
Next Message Rainer Bauer 2007-10-20 20:42:00 Re: 8.2.3: Server crashes on Windows using Eclipse/Junit
Previous Message Tom Lane 2007-10-20 19:24:57 Poorly designed tsearch NOTICEs