Thread: Too many private FDs

Too many private FDs

From
Rolf Lüttecke
Date:
Hi folks,

is anyone able to explain the following error-message extracted from
the "server.log"?

-- ERROR:  AllocateFile: too many private FDs demanded
-- pq_recvbuf: unexpected EOF on client connection
-- IpcMemoryCreate: shmget failed (Identifier removed) key=5432007,  size=96424, permission=600
-- SISegmentGet: failed: Identifier removed
-- FATAL 1:  CreateSharedInvalidationState: failed segment init
-- FATAL 1:  AttachSLockMemory: could not attach segment

The main postmaster-process dies, still leaving the other postgres-
processes active (but not working). This happens roundabout once a
day caused by different workstations and different functions.

A few environment information:
PostgreSQL 6.5.2 w/ SuSE 6.0 (2.0.36) running on a SNI-Primergy 070
Access-method: w/ Insight's ODBC-driver (6.5/0006) from MS-Access

Thanx in advance
- Rolf

_____________________________________________________________________ 
"Rolf Luettecke" <rluettecke@gcd.de>
Gesellschaft für
Computer- u. Datentechnik mbH 
http://www.gcd.de
Internet Business Solutions
_____________________________________________________________________

************




Re: [INTERFACES] Too many private FDs

From
awilliam@whitemice.org
Date:
> -- ERROR:  AllocateFile: too many private FDs demanded
> -- pq_recvbuf: unexpected EOF on client connection
> -- IpcMemoryCreate: shmget failed (Identifier removed) key=5432007,
>    size=96424, permission=600
> -- SISegmentGet: failed: Identifier removed
> -- FATAL 1:  CreateSharedInvalidationState: failed segment init
> -- FATAL 1:  AttachSLockMemory: could not attach segment
> A few environment information:
> PostgreSQL 6.5.2 w/ SuSE 6.0 (2.0.36) running on a SNI-Primergy 070
> Access-method: w/ Insight's ODBC-driver (6.5/0006) from MS-Access

I have had similair problems with the Informix Online database engine. You need to be running a 2.2.x kernel and to use
thesysctrl 
 
interface to increase the number of file handles (by default limited 
to 1024) and possibly the maximum shared memory size.




************




Re: [INTERFACES] Too many private FDs

From
Tom Lane
Date:
Rolf Lüttecke <rluettecke@gcd.de> writes:
> is anyone able to explain the following error-message extracted from
> the "server.log"?

> -- ERROR:  AllocateFile: too many private FDs demanded

Do you use password verification for any of your clients?

There is a file descriptor leak in the 6.5.* postmaster that is
triggered when an invalid user name is presented to the password
check routine.  Add a FreeFile() call to the bottom of the check
routine, like this:

*** src/backend/libpq/password.c.orig    Tue May 25 12:09:00 1999
--- src/backend/libpq/password.c    Wed Dec  1 10:30:46 1999
***************
*** 90,95 ****
--- 90,97 ----             return STATUS_ERROR;         }     }
+ 
+     FreeFile(pw_file);      snprintf(PQerrormsg, ERROR_MSG_LENGTH,              "verify_password: user '%s' not found
inpassword file.\n",
 


This is fixed in current sources and will be fixed in 6.5.4, if
there is another 6.5.* release...

If you *don't* use this style of authentication then we need to
look harder :-(
        regards, tom lane

************




unsubscribe

From
Michael Katkin
Date:
unsubscribe katkin@ling.ohio-state.edu




Re: [INTERFACES] Too many private FDs

From
Tom Lane
Date:
Rolf Lüttecke <rluettecke@gcd.de> writes:
> is anyone able to explain the following error-message extracted from
> the "server.log"?

> -- ERROR:  AllocateFile: too many private FDs demanded

Do you use password verification for any of your clients?

There is a file descriptor leak in the 6.5.* postmaster that is
triggered when an invalid user name is presented to the password
check routine.  Add a FreeFile() call to the bottom of the check
routine, like this:

*** src/backend/libpq/password.c.orig    Tue May 25 12:09:00 1999
--- src/backend/libpq/password.c    Wed Dec  1 10:30:46 1999
***************
*** 90,95 ****
--- 90,97 ----             return STATUS_ERROR;         }     }
+ 
+     FreeFile(pw_file);      snprintf(PQerrormsg, ERROR_MSG_LENGTH,              "verify_password: user '%s' not found
inpassword file.\n",
 


This is fixed in current sources and will be fixed in 6.5.4, if
there is another 6.5.* release...

If you *don't* use this style of authentication then we need to
look harder :-(
        regards, tom lane

************




Re: [INTERFACES] Too many private FDs

From
awilliam@whitemice.org
Date:
> -- ERROR:  AllocateFile: too many private FDs demanded
> -- pq_recvbuf: unexpected EOF on client connection
> -- IpcMemoryCreate: shmget failed (Identifier removed) key=5432007,
>    size=96424, permission=600
> -- SISegmentGet: failed: Identifier removed
> -- FATAL 1:  CreateSharedInvalidationState: failed segment init
> -- FATAL 1:  AttachSLockMemory: could not attach segment
> A few environment information:
> PostgreSQL 6.5.2 w/ SuSE 6.0 (2.0.36) running on a SNI-Primergy 070
> Access-method: w/ Insight's ODBC-driver (6.5/0006) from MS-Access

I have had similair problems with the Informix Online database engine. You need to be running a 2.2.x kernel and to use
thesysctrl 
 
interface to increase the number of file handles (by default limited 
to 1024) and possibly the maximum shared memory size.




************