HI,

I'm using a AuthAny handler to authenticate for every script. Today 
for the first time the production server was put thru it's paces. I had 
about 80 users at the same time. Checking the apache error log 
there were a lot of 

DBI->connect failed: Too many connections at 
/systems/humakpro/lib/library.pm line 213

I have 10 different databases. Would I solve this problem if I started 
using persistent connections? I've installed ApacheDBI on a test 
server but I can't produce the same load or can I ?

I'm also using a Apache::AuthAny.pm to authenticate for each script.

Those 80 users used today about 14000 scripts in 5 hours but each 
script has many queries sent to the database. The database handle 
is opened at the beginning and closed at the end of each script.
The handle is passed to a function in library.pm and from there it is 
closed. Is this wrong to do? Like wise the handle is opened from 
within a function. 

i.e. I have 

sub footer {
           # display a standard footer etc etc
                if ($_[0] != 1 && $_[0] ne ""){
                $_[0]->disconnect ;
           }
}
          

It really peaked at 14:38:41 and then in the error_log

Ouch!  malloc failed in malloc_block()
DBI->connect failed: Too many connections at 
/systems/humakpro/lib/library.pm line 213
[Wed Jan 10 14:38:41 2001] [error] Can't call method "prepare" 
without a package or object reference at /syst$

Ouch!  malloc failed in malloc_block()
Ouch!  malloc failed in malloc_block()
Ouch!  malloc failed in malloc_block()
Ouch!  malloc failed in malloc_block()
Out of memory!
Ouch!  malloc failed in malloc_block()
Out of memory!
Ouch!  malloc failed in malloc_block()
Out of memory!

I wasn't running top at the time. 

BTW it's running redhat 7.0, 2 * 600 PIII with 256 MB, mysql 
3.22.27, Apache 1.3.14, mod_perl 1.24_01 Alll with just standard 
installations. I haven't tweaked anything.

Any help would be appreciated.

regards

Scott
_________________________
scott alexander
tietoverkkosuunnittelija
humak amk - finland
+358(0)407505640

Reply via email to