Re: BSD::Resource und apache/mod_perl

2002-01-10 Thread Christoph Bergmann

Perrin Harkins wrote:
 
 The difference is that Apache::Resource should apply this limit to each
 new child process.  When you do this from the shell, you are limiting
 the parent Apache process, which isn't very useful.

I put

use BSD::Resource;
setrlimit RLIMIT_AS, 3200, 6400;

at the top of the script which should be limited. So only the Apache
child process of this script is limited.

 
 Are you sure you're using the right units (bytes vs. megabytes)?  Could

Yes, setrlimit wants bytes, Apache::Resource wants MBytes.

 your server be immediately going higher than the limit you set for it?

Mmh, but what could be the reason? A normal httpd process has i.g. 8 MB
and i set the limit to 32 MB. If I run the test script without
setrlimit and watch it with top it slowly consumes the RAM appr. 1 MB
/ sec...


Anyway: I still don't know what the reason was for this problem -  but I
solved it with installing a brand new apache, perl  mod_perl - now it
works as it should! ;-)

Thanx for your help nonetheless!!


 
 - Perrin


Best regards,

Christoph




Re: BSD::Resource und apache/mod_perl

2002-01-09 Thread Perrin Harkins

 has anybody any ideas?

Apache::Resource.




Re: BSD::Resource und apache/mod_perl

2002-01-09 Thread Christoph Bergmann

Thanx, but that leads to the same result. In the first place I used:

PerlModule Apache::Resource
PerlSetEnv PERL_RLIMIT_AS 32:64
PerlChildInitHandler Apache::Resource

in httpd.conf, but Apache::Resource uses BSD::Resource in the end and
thus its the same as

use BSD::Resource;
setrlimit RLIMIT_AS, 3200, 6400;

at top of the test script. I use setrlimit directly so I could test if
BSD::Resource works at all - and it DOES if run from the shell - but it
does NOT if run from Apache/mod_perl.

What could cause the different behaviour??

Best regards,

Christoph Bergmann


Perrin Harkins wrote:
 
  has anybody any ideas?
 
 Apache::Resource.




Re: BSD::Resource und apache/mod_perl

2002-01-09 Thread Perrin Harkins

 PerlModule Apache::Resource
 PerlSetEnv PERL_RLIMIT_AS 32:64
 PerlChildInitHandler Apache::Resource

 in httpd.conf, but Apache::Resource uses BSD::Resource in the end and
 thus its the same as

 use BSD::Resource;
 setrlimit RLIMIT_AS, 3200, 6400;

The difference is that Apache::Resource should apply this limit to each
new child process.  When you do this from the shell, you are limiting
the parent Apache process, which isn't very useful.

Are you sure you're using the right units (bytes vs. megabytes)?  Could
your server be immediately going higher than the limit you set for it?

- Perrin