Re: [EMAIL PROTECTED] Apache 2.2.3 and 'File Descriptor Limits'

2006-10-24 Thread Kenneth Svee
[ Jim Jagielski ]

 On Sep 27, 2006, at 9:13 AM, Kenneth Svee wrote:

 [ Jim Jagielski ]

 Kenneth Svee wrote:

 I've ported the old config to Apache 2.2, and we're about 11
 vhosts over the limit on the new build. The 1.3.37-server works.
 The 2.2.3-server starts if i comment out 11 vhosts. With 10
 vhosts commented out, the server dumps this to the global
 error_log, and dies:

   [Tue Sep 26 17:16:41 2006] [error] (24)Too many open files: could
   not open mime types config file /our/path/to/mime.types.
   Configuration Failed

 With 9 vhosts removed it dies with the following message:

   Unable to open logs

 We used the HIGH_SLACK_LINE-flag for our Apache-2.2.3-build as
 well, even though the docs[3] say nothing about it. What's the
 proper way to do this for Apache 2.2.3?

 It doesn't exist in 2.2.

 Meaning it will not work, or that it should work automatically? Is
 there a way for me to make it work?

 Apache 2.2 doesn't take any special care in adjusting fd's in the
 way that the optional slack'ing in Apache 1.3 did. The assumption is
 that the admin takes care of ensuring that the kernel allows for
 sufficient fd's or, if that's not possible, one configures Apache to
 be as lean and mean with fd's as possible (eg: combining all
 CustomLogs and ErrorLogs, using worker MPM, etc...)

To sum up a bit of work here:

The reason why my 2.2-server does not start is because I've got too
many VirtualHosts in the config. Apache it self does fine at opening
all the logs (last logfile gets fd #274), and goes on to open a couple
more (mime.types and a file in /tmp/) before it starts to read the
certificate files for the SSL-enabled VirtualHosts. This is where it
fails.

We use OpenSSL as our SSL-library for mod_ssl. When mod_ssl open the
first certificate file via the OpenSSL BIO_new_file() (from
crypto/bio/bss_file.c in the OpenSSL source) it uses fopen() to open
the certificate file. On Solaris (Solaris 8 at least) fopen() cannot
open files when the descriptor is greater than 255 (due to using and
unsigned char in the _file-field of the FILE-struct). As Apache has
already opened 274 descriptors this fopen() fails, and Apache goes
down.

Apparently [1] using 64-bit binaries will possibly solve this issue,
but this is (for several reasons I won't go into here) not something
we can do. The alternatives, as Jim mentions, seem to be to
reconfigure the server to combine logs, or split it up to get the
number of VirtualHosts down to a manageble level.

(And if the certificates could been opened earlier in the startup
process, that would probably also solve the issue, but is most likely
not a good idea, nor feasible to (re)implement in the server. The
problem is 32bit Solaris 8 and OpenSSL, not Apache.)

[1] http://sunsolve.sun.com/search/document.do?assetkey=1-30-01406-1


Rgds,
Kenneth Svee

-
The official User-To-User support forum of the Apache HTTP Server Project.
See URL:http://httpd.apache.org/userslist.html for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
  from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[EMAIL PROTECTED] Apache 2.2.3 and 'File Descriptor Limits'

2006-09-27 Thread Kenneth Svee
Hi.

We have an older Apache 1.3 server with 130-ish VirtualHosts on
Solaris 8. This runs PHP and mod_perl with lots of dependencies. We've
built Apache 2.2.3 with the same basic functionality (PHP4.4.4,
mod_perl2.0.2). On this server each vhost has it's own access_log and
error_log, and we want to continue this.

In Apache 1.3 (and 2.0 according to the docs[1][2]) we add
-DHIGH_SLACK_LINE=256 to CFLAGS to increase the number of
descriptions the server can use:

  CFLAGS=-DHIGH_SLACK_LINE=256 ./configure ...

I've ported the old config to Apache 2.2, and we're about 11 vhosts
over the limit on the new build. The 1.3.37-server works. The
2.2.3-server starts if i comment out 11 vhosts. With 10 vhosts
commented out, the server dumps this to the global error_log, and
dies:

  [Tue Sep 26 17:16:41 2006] [error] (24)Too many open files: could
  not open mime types config file /our/path/to/mime.types.
  Configuration Failed

With 9 vhosts removed it dies with the following message:

  Unable to open logs

We used the HIGH_SLACK_LINE-flag for our Apache-2.2.3-build as well,
even though the docs[3] say nothing about it. What's the proper way to
do this for Apache 2.2.3? 

Also: should the flag be put in EXTRA_CFLAGS instead of CFLAGS? What's
the difference?

Thanks for any help on this.

[1] http://httpd.apache.org/docs/1.3/misc/descriptors.html
[2] http://httpd.apache.org/docs/2.0/misc/descriptors.html
[3] http://httpd.apache.org/docs/2.2/vhosts/fd-limits.html


Rgds,
Kenneth Svee

-
The official User-To-User support forum of the Apache HTTP Server Project.
See URL:http://httpd.apache.org/userslist.html for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
  from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [EMAIL PROTECTED] Apache 2.2.3 and 'File Descriptor Limits'

2006-09-27 Thread Jim Jagielski
Kenneth Svee wrote:
 
 I've ported the old config to Apache 2.2, and we're about 11 vhosts
 over the limit on the new build. The 1.3.37-server works. The
 2.2.3-server starts if i comment out 11 vhosts. With 10 vhosts
 commented out, the server dumps this to the global error_log, and
 dies:
 
   [Tue Sep 26 17:16:41 2006] [error] (24)Too many open files: could
   not open mime types config file /our/path/to/mime.types.
   Configuration Failed
 
 With 9 vhosts removed it dies with the following message:
 
   Unable to open logs
 
 We used the HIGH_SLACK_LINE-flag for our Apache-2.2.3-build as well,
 even though the docs[3] say nothing about it. What's the proper way to
 do this for Apache 2.2.3? 
 

It doesn't exist in 2.2.

-- 
===
   Jim Jagielski   [|]   [EMAIL PROTECTED]   [|]   http://www.jaguNET.com/
If you can dodge a wrench, you can dodge a ball.

-
The official User-To-User support forum of the Apache HTTP Server Project.
See URL:http://httpd.apache.org/userslist.html for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
  from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [EMAIL PROTECTED] Apache 2.2.3 and 'File Descriptor Limits'

2006-09-27 Thread Kenneth Svee
[ Jim Jagielski ]

 Kenneth Svee wrote:
 
 I've ported the old config to Apache 2.2, and we're about 11 vhosts
 over the limit on the new build. The 1.3.37-server works. The
 2.2.3-server starts if i comment out 11 vhosts. With 10 vhosts
 commented out, the server dumps this to the global error_log, and
 dies:
 
   [Tue Sep 26 17:16:41 2006] [error] (24)Too many open files: could
   not open mime types config file /our/path/to/mime.types.
   Configuration Failed
 
 With 9 vhosts removed it dies with the following message:
 
   Unable to open logs
 
 We used the HIGH_SLACK_LINE-flag for our Apache-2.2.3-build as
 well, even though the docs[3] say nothing about it. What's the
 proper way to do this for Apache 2.2.3?

 It doesn't exist in 2.2.

Meaning it will not work, or that it should work automatically? Is
there a way for me to make it work?

Thank you for your reply.


Rgds,
Kenneth Svee

-
The official User-To-User support forum of the Apache HTTP Server Project.
See URL:http://httpd.apache.org/userslist.html for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
  from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [EMAIL PROTECTED] Apache 2.2.3 and 'File Descriptor Limits'

2006-09-27 Thread Jim Jagielski


On Sep 27, 2006, at 9:13 AM, Kenneth Svee wrote:


[ Jim Jagielski ]


Kenneth Svee wrote:


I've ported the old config to Apache 2.2, and we're about 11 vhosts
over the limit on the new build. The 1.3.37-server works. The
2.2.3-server starts if i comment out 11 vhosts. With 10 vhosts
commented out, the server dumps this to the global error_log, and
dies:

  [Tue Sep 26 17:16:41 2006] [error] (24)Too many open files: could
  not open mime types config file /our/path/to/mime.types.
  Configuration Failed

With 9 vhosts removed it dies with the following message:

  Unable to open logs

We used the HIGH_SLACK_LINE-flag for our Apache-2.2.3-build as
well, even though the docs[3] say nothing about it. What's the
proper way to do this for Apache 2.2.3?


It doesn't exist in 2.2.


Meaning it will not work, or that it should work automatically? Is
there a way for me to make it work?



Apache 2.2 doesn't take any special care in adjusting
fd's in the way that the optional slack'ing in Apache 1.3
did. The assumption is that the admin takes care of
ensuring that the kernel allows for sufficient fd's
or, if that's not possible, one configures Apache to
be as lean and mean with fd's as possible (eg: combining
all CustomLogs and ErrorLogs, using worker MPM, etc...)


-
The official User-To-User support forum of the Apache HTTP Server Project.
See URL:http://httpd.apache.org/userslist.html for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
 from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [EMAIL PROTECTED] Apache 2.2.3 and 'File Descriptor Limits'

2006-09-27 Thread Joe Orton
The SLACK_LINE stuff was about preserving low-numbered fds for use by 
stdio because of the Solaris 8-bit fd limit with stdio.  It's not in 2.x 
because 2.x doesn't use stdio for logging.

If you're hitting fd limits in 2.2 it is only because of kernel fd 
limits which need fixing with limit/ulimit/etc (unless you suspect fd 
leaks somewhere; truss will tell you).

joe

-
The official User-To-User support forum of the Apache HTTP Server Project.
See URL:http://httpd.apache.org/userslist.html for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
  from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]