Re: Figuring out which perl file is leaking memory
Thanks for the tips. For the record, it turned out that the leak wasn't really a leak at all: we have a *large* directory structure in which each directory was using as its index file a symlink to the same perl file (which in turn used the REQUEST_URI to figure out what content to serve). Apparently mod_perl treats each of those as a separate file, so it was caching thousands of copies of the same file over time. The reason I didn't find this sooner is that I had been testing that index file via only a handful of URIs, and thus didn't see the memory usage grow. Once I turned to `wget -r', the leak finally surfaced. I fixed it by converting the index file to a real mod_perl handler and pointing the right URIs at it manually in httpd.conf. Sorry for the extra noise, but I figured the info might be useful to somebody. Thanks again, guys. -Michael
Re: compiling problems with mod_perl 2.0.3 and Apache 2.2.6
I have encountered the same mod_perl make problem working with these releases: Perl 5.8.9 Apache 2.2.3 mod_perl 2.0.4 a...@arthur-desktop:~/Downloads/mod_perl-2.0.4$ make cd src/modules/perl make make[1]: Entering directory `/home/artg/Downloads/mod_perl-2.0.4/src/modules/perl' cc -I/home/artg/Downloads/mod_perl-2.0.4/src/modules/perl -I/home/artg/Downloads/mod_perl-2.0.4/xs -I/home/artg/Downloads/httpd-2.2.3/include -I/home/artg/Downloads/httpd-2.2.3/srclib/apr/include -I/home/artg/Downloads/httpd-2.2.3/srclib/apr-util/include -I/home/artg/Downloads/httpd-2.2.3/os/unix -fno-strict-aliasing -pipe -I/usr/local/include -I/usr/local/lib/perl5/5.8.9/i686-linux/CORE -DMOD_PERL -DMP_COMPAT_1X -O2 -c mod_perl.c In file included from /home/artg/Downloads/httpd-2.2.3/include/ap_config.h:25, from /home/artg/Downloads/httpd-2.2.3/include/httpd.h:43, from modperl_apache_includes.h:27, from mod_perl.h:20, from mod_perl.c:17: /home/artg/Downloads/httpd-2.2.3/srclib/apr/include/apr.h:270: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘apr_off_t’ Making apr via pushd ../httpd-2.2.3/srclib/apr make sudo make install proceeds without problems. John D Groenveld-2 wrote: In message 4795b02302c100047...@agrippa.hbz-nrw.de, Heiko Jansen writes : No - at least not for me (Solaris 10, 64Bit, Sun cc): 2.0.3 won't build Working for me so far. $ cd /tmp/httpd-2.2.8 $ env PATH=/usr/bin:/usr/ccs/bin:/opt/SUNWspro/bin:/usr/sfw/bin \ CC=cc CFLAGS=-m64 -xO3 LDFLAGS=-m64 -L/usr/sfw/lib/64 -R/usr/sfw/lib/64 \ ./configure --with-expat=/usr/sfw --with-ssl=/usr/sfw --enable-ssl \ --enable-proxy --enable-rewrite --enable-modules=all --enable-mods-shared=all \ --prefix=/opt/apache2 # make install Edit apr_rules.mk and config_vars.mk in /opt/apache2/build and add -m64 to EXTRA_LDFLAGS Add -m64 to LDFLAGS in /opt/apache2/bin/apr-1-config $ cd /tmp/perl-5.10.0 $ env PATH=/usr/bin:/usr/ccs/bin:/opt/SUNWspro/bin \ ./Configure -Dprefix=/opt/apache2/perl-5.10.0 -Dcc=cc -Duseshrplib \ -Uusemymalc -Duselargefiles -Ubincompat5005 -Doptimize=-xO3 -Duse64bitall # make install $ cd /tmp/mod_perl-2.0.3 $ env PATH=/usr/bin:/usr/ccs/bin:/opt/SUNWspro/bin \ /opt/apache2/perl-5.10.0/bin/perl Makefile.PL MP_APXS=/opt/apache2/bin/apxs # make install John groenv...@acm.org -- View this message in context: http://www.nabble.com/compiling-problems-with-mod_perl-2.0.3-and-Apache-2.2.6-tp14946923p24061845.html Sent from the mod_perl - General mailing list archive at Nabble.com.
Re: compiling problems with mod_perl 2.0.3 and Apache 2.2.6
Hi Arthur Are you building a static apache or dynamic that uses .so modules?? Mike - Original Message - From: ArthurG a...@cs.nyu.edu To: modperl@perl.apache.org Sent: Tuesday, June 16, 2009 4:05 PM Subject: Re: compiling problems with mod_perl 2.0.3 and Apache 2.2.6 I have encountered the same mod_perl make problem working with these releases: Perl 5.8.9 Apache 2.2.3 mod_perl 2.0.4 a...@arthur-desktop:~/Downloads/mod_perl-2.0.4$ make cd src/modules/perl make make[1]: Entering directory `/home/artg/Downloads/mod_perl-2.0.4/src/modules/perl' cc -I/home/artg/Downloads/mod_perl-2.0.4/src/modules/perl -I/home/artg/Downloads/mod_perl-2.0.4/xs -I/home/artg/Downloads/httpd-2.2.3/include -I/home/artg/Downloads/httpd-2.2.3/srclib/apr/include -I/home/artg/Downloads/httpd-2.2.3/srclib/apr-util/include -I/home/artg/Downloads/httpd-2.2.3/os/unix -fno-strict-aliasing -pipe -I/usr/local/include -I/usr/local/lib/perl5/5.8.9/i686-linux/CORE -DMOD_PERL -DMP_COMPAT_1X -O2 -c mod_perl.c In file included from /home/artg/Downloads/httpd-2.2.3/include/ap_config.h:25, from /home/artg/Downloads/httpd-2.2.3/include/httpd.h:43, from modperl_apache_includes.h:27, from mod_perl.h:20, from mod_perl.c:17: /home/artg/Downloads/httpd-2.2.3/srclib/apr/include/apr.h:270: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘apr_off_t’ Making apr via pushd ../httpd-2.2.3/srclib/apr make sudo make install proceeds without problems. John D Groenveld-2 wrote: In message 4795b02302c100047...@agrippa.hbz-nrw.de, Heiko Jansen writes : No - at least not for me (Solaris 10, 64Bit, Sun cc): 2.0.3 won't build Working for me so far. $ cd /tmp/httpd-2.2.8 $ env PATH=/usr/bin:/usr/ccs/bin:/opt/SUNWspro/bin:/usr/sfw/bin \ CC=cc CFLAGS=-m64 -xO3 LDFLAGS=-m64 -L/usr/sfw/lib/64 -R/usr/sfw/lib/64 \ ./configure --with-expat=/usr/sfw --with-ssl=/usr/sfw --enable-ssl \ --enable-proxy --enable-rewrite --enable-modules=all --enable-mods-shared=all \ --prefix=/opt/apache2 # make install Edit apr_rules.mk and config_vars.mk in /opt/apache2/build and add -m64 to EXTRA_LDFLAGS Add -m64 to LDFLAGS in /opt/apache2/bin/apr-1-config $ cd /tmp/perl-5.10.0 $ env PATH=/usr/bin:/usr/ccs/bin:/opt/SUNWspro/bin \ ./Configure -Dprefix=/opt/apache2/perl-5.10.0 -Dcc=cc -Duseshrplib \ -Uusemymalc -Duselargefiles -Ubincompat5005 -Doptimize=-xO3 -Duse64bitall # make install $ cd /tmp/mod_perl-2.0.3 $ env PATH=/usr/bin:/usr/ccs/bin:/opt/SUNWspro/bin \ /opt/apache2/perl-5.10.0/bin/perl Makefile.PL MP_APXS=/opt/apache2/bin/apxs # make install John groenv...@acm.org -- View this message in context: http://www.nabble.com/compiling-problems-with-mod_perl-2.0.3-and-Apache-2.2.6-tp14946923p24061845.html Sent from the mod_perl - General mailing list archive at Nabble.com.
Re: compiling problems with mod_perl 2.0.3 and Apache 2.2.6
Hi Mike Static mod_perl, as per http://perl.apache.org/docs/2.0/user/install/install.html#Static_mod_perl. My make command was perl Makefile.PL MP_USE_STATIC=1 MP_AP_PREFIX=/home/artg/Downloads/httpd-2.2.3 MP_AP_CONFIGURE=--with-mpm=prefork BR A Mike OK-2 wrote: Hi Arthur Are you building a static apache or dynamic that uses .so modules?? Mike - Original Message - From: ArthurG a...@cs.nyu.edu To: modperl@perl.apache.org Sent: Tuesday, June 16, 2009 4:05 PM Subject: Re: compiling problems with mod_perl 2.0.3 and Apache 2.2.6 I have encountered the same mod_perl make problem working with these releases: Perl 5.8.9 Apache 2.2.3 mod_perl 2.0.4 a...@arthur-desktop:~/Downloads/mod_perl-2.0.4$ make cd src/modules/perl make make[1]: Entering directory `/home/artg/Downloads/mod_perl-2.0.4/src/modules/perl' cc -I/home/artg/Downloads/mod_perl-2.0.4/src/modules/perl -I/home/artg/Downloads/mod_perl-2.0.4/xs -I/home/artg/Downloads/httpd-2.2.3/include -I/home/artg/Downloads/httpd-2.2.3/srclib/apr/include -I/home/artg/Downloads/httpd-2.2.3/srclib/apr-util/include -I/home/artg/Downloads/httpd-2.2.3/os/unix -fno-strict-aliasing -pipe -I/usr/local/include -I/usr/local/lib/perl5/5.8.9/i686-linux/CORE -DMOD_PERL -DMP_COMPAT_1X -O2 -c mod_perl.c In file included from /home/artg/Downloads/httpd-2.2.3/include/ap_config.h:25, from /home/artg/Downloads/httpd-2.2.3/include/httpd.h:43, from modperl_apache_includes.h:27, from mod_perl.h:20, from mod_perl.c:17: /home/artg/Downloads/httpd-2.2.3/srclib/apr/include/apr.h:270: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘apr_off_t’ Making apr via pushd ../httpd-2.2.3/srclib/apr make sudo make install proceeds without problems. John D Groenveld-2 wrote: In message 4795b02302c100047...@agrippa.hbz-nrw.de, Heiko Jansen writes : No - at least not for me (Solaris 10, 64Bit, Sun cc): 2.0.3 won't build Working for me so far. $ cd /tmp/httpd-2.2.8 $ env PATH=/usr/bin:/usr/ccs/bin:/opt/SUNWspro/bin:/usr/sfw/bin \ CC=cc CFLAGS=-m64 -xO3 LDFLAGS=-m64 -L/usr/sfw/lib/64 -R/usr/sfw/lib/64 \ ./configure --with-expat=/usr/sfw --with-ssl=/usr/sfw --enable-ssl \ --enable-proxy --enable-rewrite --enable-modules=all --enable-mods-shared=all \ --prefix=/opt/apache2 # make install Edit apr_rules.mk and config_vars.mk in /opt/apache2/build and add -m64 to EXTRA_LDFLAGS Add -m64 to LDFLAGS in /opt/apache2/bin/apr-1-config $ cd /tmp/perl-5.10.0 $ env PATH=/usr/bin:/usr/ccs/bin:/opt/SUNWspro/bin \ ./Configure -Dprefix=/opt/apache2/perl-5.10.0 -Dcc=cc -Duseshrplib \ -Uusemymalc -Duselargefiles -Ubincompat5005 -Doptimize=-xO3 -Duse64bitall # make install $ cd /tmp/mod_perl-2.0.3 $ env PATH=/usr/bin:/usr/ccs/bin:/opt/SUNWspro/bin \ /opt/apache2/perl-5.10.0/bin/perl Makefile.PL MP_APXS=/opt/apache2/bin/apxs # make install John groenv...@acm.org -- View this message in context: http://www.nabble.com/compiling-problems-with-mod_perl-2.0.3-and-Apache-2.2.6-tp14946923p24061845.html Sent from the mod_perl - General mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/compiling-problems-with-mod_perl-2.0.3-and-Apache-2.2.6-tp14946923p24062804.html Sent from the mod_perl - General mailing list archive at Nabble.com.