Mod_perl spawning processes

2003-06-09 Thread George Bagley
Hi

CONFIG  redhat linux 9.0
  apache 2

I have ugraded from apache1.3 to Apache2 and I am having a performance
problem with a cgi script.

On 1.3, when I do a ps, I cannot see the cgi script running.

On 2, there are hundreds of the cgi scripts running.

The cgi makes a connection to a mysql database.

Is there a configuration option to stop this happening?  



Thanks

George Bagley
Senior Systems Analyst

Red Eye International Ltd
24-28 Nelson's Row
Clapham
London  SW4 7JT

d: 020 7627 9313
t: 020 7627 9300
f: 020 7627 9301
e: [EMAIL PROTECTED] 
n: www.redeye.com

eCRM experts





Mod_perl 1.99 spawning processes causing major performance issue

2003-06-09 Thread George Bagley

-8-- Start Bug Report 8--
1. Problem Description:

 Hi

I have ugraded from apache1.3 to Apache2 and I am having a performance
problem with a cgi script.
Hardware
Dell 2550, Dual Proc, 2GB RAM, RedHat Linux 9.0

On Apache 1.3, when I do a ps -ef, I cannot see the cgi script running.
I assume this is because Apache is NOT spawning a separate process to
satisfy the request.

On Apache2, there are hundreds of the cgi scripts running and
performance is roughly half what it was on Apache 1.3

The cgi script in question makes a connection to a mysql database.  

I have had to increase the max number of connections allowed by mysql to
allow for the large number of spawned perl processes attempting to make
a DB connection.

Is there a configuration option to stop this happening?  

I have the following relating to perl in my httpd.conf

# LoadModule foo_module modules/mod_foo.so
#
LoadModule perl_module modules/mod_perl.so
# PerlRequire /usr/local/apache2/2.0.45/conf/startup.pl
PerlModule Apache2

# PerlModule ModPerl::Registry
Location /cgi-bin
AddHandler cgi-script cgi pl
#   AddHandler perl-script .pl
#   PerlResponseHandler Apache::Registry
PerlResponseHandler ModPerl::Registry
PerlOptions +ParseHeaders
AllowOverride None
Options +ExecCGI -Includes
#   SetHandler perl-script
SetHandler cgi-script
/Location


2. Used Components and their Configuration:

*** using lib/Apache/BuildConfig.pm
*** Makefile.PL options:
  MP_AP_PREFIX= /usr/local/apache
  MP_COMPAT_1X= 1
  MP_GENERATE_XS  = 1
  MP_INST_APACHE2 = 1
  MP_LIBNAME  = mod_perl
  MP_USE_DSO  = 1
  MP_USE_STATIC   = 1


*** /usr/local/apache/bin/httpd -V
Server version: Apache/2.0.45
Server built:   Apr 30 2003 17:51:58
Server's Module Magic Number: 20020903:0
Architecture:   32-bit
Server compiled with
 -D APACHE_MPM_DIR=server/mpm/prefork
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_PROC_PTHREAD_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D HTTPD_ROOT=/usr/local/apache2/2.0.45
 -D SUEXEC_BIN=/usr/local/apache2/2.0.45/bin/suexec
 -D DEFAULT_PIDLOG=logs/httpd.pid
 -D DEFAULT_SCOREBOARD=logs/apache_runtime_status
 -D DEFAULT_LOCKFILE=logs/accept.lock
 -D DEFAULT_ERRORLOG=logs/error_log
 -D AP_TYPES_CONFIG_FILE=conf/mime.types
 -D SERVER_CONFIG_FILE=conf/httpd.conf


*** /usr/bin/perl -V
Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
  Platform:
osname=linux, osvers=2.4.20-8smp, archname=i686-linux
uname='linux redeye-lin-01.pajmc.com 2.4.20-8smp #1 smp thu mar 13
17:45:54 est 2003 i686 i686 i386 gnulinux '
config_args='-d -Dprefix=/usr'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
  Compiler:
cc='cc', ccflags ='-fno-strict-aliasing -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
optimize='-O3',
cppflags='-fno-strict-aliasing -I/usr/include/gdbm'
ccversion='', gccversion='3.2.2 20030222 (Red Hat Linux 3.2.2-5)',
gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=4, prototype=define
  Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lgdbm -ldb -ldl -lm -lc -lcrypt -lutil
perllibs=-lnsl -ldl -lm -lc -lcrypt -lutil
libc=/lib/libc-2.3.2.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.3.2'
  Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl):
  Compile-time options: USE_LARGE_FILES
  Built under linux
  Compiled at Apr 30 2003 17:16:30
  %ENV:
PERL_LWP_USE_HTTP_10=1
  @INC:
/usr/lib/perl5/5.8.0/i686-linux
/usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/i686-linux
/usr/lib/perl5/site_perl/5.8.0
/usr/lib/perl5/site_perl

3. This is the core dump trace: (if you get a core dump):

 I am not getting an ERROR.  Just a major performance issue.

This report was generated by t/REPORT on Mon Jun  9 20:59:06 2003 GMT.

-8-- End Bug Report --8--

Note: Complete the rest of the details and post this bug report to
dev at perl.apache.org. To subscribe to the list send an empty
email to [EMAIL PROTECTED]