Sun Webserver 7 TP3 + FCGI leaking file descriptors (?)

Hi.

We are using Sun Webserver (Technology Preview 3 of version 7) to run a perl script as a FastCGI application. Snippets from configuration files:

magnus.conf:

Init fn="load-modules" shlib="libj2eeplugin.so" shlib_flags="(global|now)"

Init fn="load-modules" shlib="/opt/webserver7/plugins/fastcgi/libfastcgi.so" shlib_flags="(global|now)"

obj.conf:

NameTrans fn="assign-name" from="/ips/checkmail.fcgi" name="fcgi.config"

...

<Object name="fcgi.config">

Service fn="responder-fastcgi" app-path="/www/icq/ips/checkmail.fcgi" min-procs=15 max-procs=35 req-retry=3

</Object>

Our problem is, that after some time, the webserver starts returning HTTP 500 errors for all requests for this file, instead of sending the output of the app and a HTTP 200 results. At the same time, the following message is in the error log file, for each requests:

[18/Mar/2007:12:53:36] failure (15328): HTTP3069: Error accepting connection (PR_PROC_DESC_TABLE_FULL_ERROR: file descriptor table full)

One of the webserver's processes has a lot of open files like this (from pfiles):

11573: S_IFSOCK mode:0666 dev:276,0 ino:19498 uid:0 gid:0 size:0

O_RDWR|O_NONBLOCK

SOCK_STREAM

SO_SNDBUF(16384),SO_RCVBUF(5120)

sockname: AF_UNIX

peername: AF_UNIX /tmp/https-www-script-1-5351d5c9/Fastcgistub_23270

I set "ulimit -n" to 65000, but it's only a matter of time, I'm afraid, until it uses all of them.

Killing this one process solves the issue temporarily. Until it uses up all available FDs again.

Even though the maximum of fcgi processes is set to 35, only 15 are present. I.e. the 15 are enough to fulfill all requests.

With "ulimit -n" set to "unlimited", after server start, I get multiple Fastcgistub processes instead of just one and no fcgi processes get started.

To keep the server running correctly, I need to monitor it constantly and kill the offending process, when it uses up all FDs. This is not good, obviously.

Is there a solution for this problem? Is it a bug? Or just a mis-configuration?

[2455 byte] By [nxta] at [2007-11-26 22:03:38]
# 1

Hi ,

> Even though the maximum of fcgi processes is set to

> 35, only 15 are present. I.e. the 15 are enough to

> fulfill all requests.

The plugin will start "min-procs" number of fcgi processes. Currently, "max-procs" is just an upper limit (can be ignored). At any given point of time, plugin will try to maintain "min-procs" number of processes.

> Is there a solution for this problem? Is it a bug?

It is a bug. It has been fixed and the next release of Web Server 7 (i.e., Update 1) will have this fix.

Seema.Aa at 2007-7-10 10:46:02 > top of Java-index,Web & Directory Servers,Web Servers...
# 2
Thank you for the answer.I am aware of the min-proc / max-proc behaviour. I only wanted to illustrate that the load on the server is so small, that it can handle it with min-proc processes.Any ETA on the release of Update 1?Thanks,j.
nxta at 2007-7-10 10:46:02 > top of Java-index,Web & Directory Servers,Web Servers...
# 3
Tentative plan for release is May, 07.
Seema.Aa at 2007-7-10 10:46:02 > top of Java-index,Web & Directory Servers,Web Servers...