pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Process Files
3+ messages / 2 participants
[nested] [flat]

* Process Files
@ 2003-11-06 05:55  Rudi Starcevic <rudi@oasis.net.au>
  0 siblings, 1 reply; 3+ messages in thread

From: Rudi Starcevic @ 2003-11-06 05:55 UTC (permalink / raw)
  To: pgsql-admin

Hi,

I'm moving a Postgresql database onto a co-located server - a Linux 
Virtual Server.

Today I got some error's in my logs:

ERROR:  _mdfd_getrelnfd: cannot open relation virtualusertable: Cannot 
allocate memory
If I reboot it goes away but has been reappearing.

I'd like to try limiting the amount of files per process.
By default, I believe Postgres is configured to permit 1000 open files 
per process,
and my server currently has 9 postgres processes running.

Is there an option I can configure to do this ??

Many thanks
Regards
Rudi Starcevic




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Process Files
@ 2003-11-06 14:48  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Rudi Starcevic <rudi@oasis.net.au>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2003-11-06 14:48 UTC (permalink / raw)
  To: Rudi Starcevic <rudi@oasis.net.au>; +Cc: pgsql-admin

Rudi Starcevic <rudi@oasis.net.au> writes:
> ERROR:  _mdfd_getrelnfd: cannot open relation virtualusertable: Cannot 
> allocate memory

Hm, that's a rather odd error code, but I suppose it must mean that you
have run out of kernel memory for file descriptor slots or inodes.

> I'd like to try limiting the amount of files per process.
> Is there an option I can configure to do this ??

max_files_per_process.  If you don't have it you need a newer version of
Postgres.

Note that you could also attack this by increasing the kernel filetable
size; I forget exactly how to do that in Linux, but it is possible.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Process Files
@ 2003-11-06 23:00  Rudi Starcevic <rudi@oasis.net.au>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Rudi Starcevic @ 2003-11-06 23:00 UTC (permalink / raw)
  To: pgsql-admin

Thanks Tom,

>> Hm, that's a rather odd error code, but I suppose it must mean that you
>> have run out of kernel memory for file descriptor slots or inodes.

Yep, after checking with the co-location techs the limit of open file on
my Virtual Server is 2479. They've upped the limit to 3718 for me.

This server is running serveral servers which all need to share the limited
amount of kernel memory allocated to my Virtual setup.
I want to power about a dozen Postgres driven web application on this 
machine so I have running: Postgresql,Apache,FTP,Bind,Sendmail with PHP.
 
>> Note that you could also attack this by increasing the kernel filetable size

In this case, Virtual Server, I'm not able to alter Kernel settings.

>> max_files_per_process

Doh !
Sorry I should have looked first.

Many thanks
Best Regards
Rudi.

Tom Lane wrote:

>Rudi Starcevic <rudi@oasis.net.au> writes:
>  
>
>>ERROR:  _mdfd_getrelnfd: cannot open relation virtualusertable: Cannot 
>>allocate memory
>>    
>>
>
>Hm, that's a rather odd error code, but I suppose it must mean that you
>have run out of kernel memory for file descriptor slots or inodes.
>
>  
>
>>I'd like to try limiting the amount of files per process.
>>Is there an option I can configure to do this ??
>>    
>>
>
>max_files_per_process.  If you don't have it you need a newer version of
>Postgres.
>
>Note that you could also attack this by increasing the kernel filetable
>size; I forget exactly how to do that in Linux, but it is possible.
>
>			regards, tom lane
>
>---------------------------(end of broadcast)---------------------------
>TIP 4: Don't 'kill -9' the postmaster
>
>  
>





^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2003-11-06 23:00 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-11-06 05:55 Process Files Rudi Starcevic <rudi@oasis.net.au>
2003-11-06 14:48 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-11-06 23:00   ` Rudi Starcevic <rudi@oasis.net.au>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox