mod_perl preloading modules or fork() issue on RH9

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For referance, the problem i am seeing is that even though i have configured a load of modules to be preloaded, they are not being preloaded, or at least not being shared.
This happened after moving to a new server running the same redhat 9 but with different kernels and glibc's. I'm betting thats where the problem is but i am stumped as to how to trace and solve the problem. Before moving, most of the memory was well shared for a good while.

Has anyone had similar problems with RedHat 9?

It appears to be one of two things;

1. mod_perl is not loading modules before the fork()'s.
2. fork() is not correctly identifing pages which can be shared.

However, all the code does appear to be loaded into the parent apache process its just seperated during the fork.

mod_perl / apache configured with

perl Makefile.PL APACHE_SRC=../apache_1.3.29/src USE_APACI=1 PERL_INIT=1 PERL_STACKED_HANDLERS=1 ALL_HOOKS=1 DO_HTTPD=1  APACI_ARGS='--prefix=/usr --activate-module=src/modules/gzip/mod_gzip.a --enable-module=env --activate-module=src/modules/php4/libphp4.a --activate-module=src/modules/perl/libperl.a --enable-module=log_config --disable-module=log_agent --disable-module=log_referer --enable-module=mime --enable-module=negotiation --enable-module=include --disable-module=autoindex --enable-module=dir --enable-module=cgi --enable-module=alias --enable-module=rewrite --enable-module=headers --enable-module=access --enable-module=auth --enable-module=expires --enable-module=setenvif --disable-module=userdir --disable-module=status --disable-module=info --disable-module=asis --enable-suexec --suexec-docroot=/var/www --suexec-caller=apache'


Useful stuff...


------- httpd.conf #####################

PerlModule Apache::Registry Apache::RegistryLoader DBD::mysql BSD::Resource DBI
PerlModule Storable Text::Kakasi Encode::Encoding Apache::DBI Carp
PerlModule IPC::Shareable Jcode IPC::SysV Encode Encode::Alias Lingua::JA::Romaji
PerlRequire "/var/www/startup.pl"

<Files anime.manga>
      SetHandler perl-script
      PerlHandler Apache::Registry
      Options ExecCGI
      PerlSendHeader On
</Files>

 

------- /var/www/startup.pl #####################

BEGIN {
use lib qw(/var/www/);
use strict;
#use Apache::Registry;
use lib::ModHTML ();
use IPC::Shareable ();


        use drivers::index ();
 .......
        use drivers::anistuff ();


use Apache::DBI;

#  use DBI;

use Apache::RegistryLoader;
  Apache::RegistryLoader->new->handler("/anime.manga","/var/www/html/anime.manga");

Apache::DBI->connect_on_init("DBI:mysql:database=xxxxx",  "xxxxx","xxxxxx",
   {
    PrintError => 1, # warn() on errors
    RaiseError => 0, # don't die on error
    AutoCommit => 1, # commit executes immediately
   }
 );
}

1;


}


------- TOP #####################

(apache was just started)
  PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME CPU COMMAND
25270 apache    15   0 12772  12M  3152 S     0.0  2.5   0:00   0 httpd
25255 apache    23   0 12640  12M  3120 S     0.0  2.4   0:00   0 httpd
25284 apache    15   0 12620  12M  3144 S     1.1  2.4   0:00   0 httpd
25254 root      15   0 11196  10M  2804 S     1.0  2.2   0:05   0 httpd (parent)


------- pmap - parent#####################

(other junk same as below)
mapped:   15720 KB writable/private: 8904 KB shared: 72 KB

 

------- pmap - child #####################

httpd(25270)
08048000 (1600 KB)     r-xp (03:03 131451)   /usr/sbin/httpd
081d8000 (88 KB)       rw-p (03:03 131451)   /usr/sbin/httpd
081ee000 (9384 KB)     rwxp (00:00 0)
40000000 (84 KB)       r-xp (03:01 539705)   /lib/ld-2.3.2.so
40015000 (4 KB)        rw-p (03:01 539705)   /lib/ld-2.3.2.so
40016000 (4 KB)        rw-p (00:00 0)
40017000 (12 KB)       r-xp (03:03 929343)   /usr/lib/perl5/site_perl/5.8.2/i686-linux/auto/BSD/Resource/Resource.so
4001a000 (4 KB)        rw-p (03:03 929343)   /usr/lib/perl5/site_perl/5.8.2/i686-linux/auto/BSD/Resource/Resource.so
4001b000 (12 KB)       r-xp (03:03 439898)   /usr/lib/perl5/5.8.2/i686-linux/auto/Fcntl/Fcntl.so
4001e000 (4 KB)        rw-p (03:03 439898)   /usr/lib/perl5/5.8.2/i686-linux/auto/Fcntl/Fcntl.so
4001f000 (8 KB)        r-xp (03:03 848151)   /usr/lib/perl5/site_perl/5.8.2/i686-linux/auto/Text/Kakasi/Kakasi.so
40021000 (4 KB)        rw-p (03:03 848151)   /usr/lib/perl5/site_perl/5.8.2/i686-linux/auto/Text/Kakasi/Kakasi.so
40022000 (4 KB)        rw-p (00:00 0)
40023000 (20 KB)       r-xp (03:01 539626)   /lib/libcrypt-2.3.2.so
40028000 (4 KB)        rw-p (03:01 539626)   /lib/libcrypt-2.3.2.so
40029000 (156 KB)      rw-p (00:00 0)
40050000 (60 KB)       r-xp (03:01 539648)   /lib/libresolv-2.3.2.so
4005f000 (4 KB)        rw-p (03:01 539648)   /lib/libresolv-2.3.2.so
40060000 (8 KB)        rw-p (00:00 0)
40062000 (132 KB)      r-xp (03:01 637731)   /lib/tls/libm-2.3.2.so
40083000 (4 KB)        rw-p (03:01 637731)   /lib/tls/libm-2.3.2.so
40084000 (12 KB)       r-xp (03:01 539628)   /lib/libdl-2.3.2.so
40087000 (4 KB)        rw-p (03:01 539628)   /lib/libdl-2.3.2.so
40088000 (72 KB)       r-xp (03:01 539632)   /lib/libnsl-2.3.2.so
4009a000 (4 KB)        rw-p (03:01 539632)   /lib/libnsl-2.3.2.so
4009b000 (8 KB)        rw-p (00:00 0)
4009d000 (24 KB)       r-xp (03:03 65209)    /usr/lib/libgdbm.so.2.0.0
400a3000 (4 KB)        rw-p (03:03 65209)    /usr/lib/libgdbm.so.2.0.0
400a4000 (4 KB)        rw-p (00:00 0)
400a5000 (932 KB)      r-xp (03:03 945623)   /usr/lib/perl5/5.8.2/i686-linux/CORE/libperl.so
4018e000 (40 KB)       rw-p (03:03 945623)   /usr/lib/perl5/5.8.2/i686-linux/CORE/libperl.so
40198000 (12 KB)       rw-p (00:00 0)
4019b000 (8 KB)        r-xp (03:01 539654)   /lib/libutil-2.3.2.so
4019d000 (4 KB)        rw-p (03:01 539654)   /lib/libutil-2.3.2.so
4019e000 (4 KB)        rw-p (00:00 0)
4019f000 (2048 KB)     r--p (03:03 196819)   /usr/lib/locale/locale-archive
4039f000 (88 KB)       r-xp (03:03 115375)   /usr/lib/perl5/site_perl/5.8.2/i686-linux/auto/DBI/DBI.so
403b5000 (4 KB)        rw-p (03:03 115375)   /usr/lib/perl5/site_perl/5.8.2/i686-linux/auto/DBI/DBI.so
403b6000 (60 KB)       r-xp (03:03 929331)   /usr/lib/perl5/site_perl/5.8.2/i686-linux/auto/DBD/mysql/mysql.so
403c5000 (8 KB)        rw-p (03:03 929331)   /usr/lib/perl5/site_perl/5.8.2/i686-linux/auto/DBD/mysql/mysql.so
403c7000 (116 KB)      r-xp (03:03 49195)    /usr/lib/mysql/libmysqlclient.so.12.0.0
403e4000 (16 KB)       rw-p (03:03 49195)    /usr/lib/mysql/libmysqlclient.so.12.0.0
403e8000 (48 KB)       r-xp (03:03 65251)    /usr/lib/libz.so.1.1.4
403f4000 (8 KB)        rw-p (03:03 65251)    /usr/lib/libz.so.1.1.4
403f6000 (56 KB)       r-xp (03:03 848128)   /usr/lib/perl5/5.8.2/i686-linux/auto/Storable/Storable.so
40404000 (4 KB)        rw-p (03:03 848128)   /usr/lib/perl5/5.8.2/i686-linux/auto/Storable/Storable.so
40405000 (32 KB)       r-xp (03:03 65367)    /usr/lib/libkakasi.so.2.1.0
4040d000 (32 KB)       rw-p (03:03 65367)    /usr/lib/libkakasi.so.2.1.0
40415000 (232 KB)      rw-p (00:00 0)
4044f000 (24 KB)       r-xp (03:03 945619)   /usr/lib/perl5/5.8.2/i686-linux/auto/Encode/Encode.so
40455000 (4 KB)        rw-p (03:03 945619)   /usr/lib/perl5/5.8.2/i686-linux/auto/Encode/Encode.so
40456000 (12 KB)       r-xp (03:03 782934)   /usr/lib/perl5/5.8.2/i686-linux/auto/IPC/SysV/SysV.so
40459000 (4 KB)        rw-p (03:03 782934)   /usr/lib/perl5/5.8.2/i686-linux/auto/IPC/SysV/SysV.so
4045a000 (12 KB)       r-xp (03:03 798327)   /usr/lib/perl5/5.8.2/i686-linux/auto/Filter/Util/Call/Call.so
4045d000 (4 KB)        rw-p (03:03 798327)   /usr/lib/perl5/5.8.2/i686-linux/auto/Filter/Util/Call/Call.so
4045e000 (24 KB)       r--s (03:03 407433)   /usr/lib/gconv/gconv-modules.cache
40464000 (12 KB)       r-xp (03:03 521487)   /usr/lib/perl5/5.8.2/i686-linux/auto/Time/HiRes/HiRes.so
40467000 (4 KB)        rw-p (03:03 521487)   /usr/lib/perl5/5.8.2/i686-linux/auto/Time/HiRes/HiRes.so
40468000 (48 KB)       rw-s (00:04 786432)   /SYSV00000000
40474000 (44 KB)       r-xp (03:01 539638)   /lib/libnss_files-2.3.2.so
4047f000 (4 KB)        rw-p (03:01 539638)   /lib/libnss_files-2.3.2.so
4048c000 (16 KB)       r-xp (03:01 539636)   /lib/libnss_dns-2.3.2.so
40490000 (4 KB)        rw-p (03:01 539636)   /lib/libnss_dns-2.3.2.so
42000000 (1216 KB)     r-xp (03:01 637971)   /lib/tls/libc-2.3.2.so
42130000 (12 KB)       rw-p (03:01 637971)   /lib/tls/libc-2.3.2.so
42133000 (12 KB)       rw-p (00:00 0)
bfff8000 (32 KB)       rwxp (00:00 0)
mapped:   16972 KB writable/private: 10140 KB shared: 72 KB


------- Linked against ###################

        libcrypt.so.1 => /lib/libcrypt.so.1 (0x40023000)
        libresolv.so.2 => /lib/libresolv.so.2 (0x40050000)
        libm.so.6 => /lib/tls/libm.so.6 (0x40062000)
        libdl.so.2 => /lib/libdl.so.2 (0x40084000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x40088000)
        libgdbm.so.2 => /usr/lib/libgdbm.so.2 (0x4009d000)
        libperl.so => /usr/lib/perl5/5.8.2/i686-linux/CORE/libperl.so (0x400a5000)
        libutil.so.1 => /lib/libutil.so.1 (0x4019b000)
        libc.so.6 => /lib/tls/libc.so.6 (0x42000000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)


[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux