Running a proxy in front of mod_perl on Win32
On Fri, January 28, 2011 01:14, Michael Peters wrote: > Another thing that maybe the OP should look at (if he hasn't already) is > to run a proxy in front of the main mod_perl application. Even if the > proxy is on the same machine it will help because you can reduce the > number of memory-heavy mod_perl processes/threads and handle the same > number of connections. I have read that advice before; then it was because of this bug concerning running mod_ssl + mod_perl at the same time on Win32: https://issues.apache.org/bugzilla/show_bug.cgi?id=36751 Unfortunately the bug still exists but the bug report was set to invalid because it did not get proper attention. What would be the best (windows-style) way of running a proxy in front of apache? Insights are welcome! -- Mike
Re: [QUESTION] Some tests fail on Debian
On Thursday, January 27, 2011 20:44:57 Alexander Aparzev wrote: > using Apache/2.2.9 (itk MPM) Just a guess, has anyone ever tested itk-MPM? However, perhaps it's only a matter of bad timing. pnotes2.t is one of mine, I think. It looks as follows: for my $i (1..12) { t_client_log_warn_is_expected(); t_start_error_log_watch; $u="$url?$i"; $ok=GET_BODY $u; select undef, undef, undef, 0.2; # give it time to write the logfile ok t_cmp scalar(grep { /pnotes are destroyed after cleanup passed/; } t_finish_error_log_watch), 1, $u; } You see the 200ms pause? Maybe that's too short for itk. Try the following: # clean the log >t/logs/error_log # run the test t/TEST -verbose t/modperl/pnotes2.t # now check the log and see if it contains 12 lines of 'pnotes are ...' ((12==$(grep 'pnotes are destroyed after cleanup passed' t/logs/error_log | wc -l))) && echo ok The reason for the test is a bug in a former mp2 version where the refcount of the pnotes hash might become wrong: $ svn log -r584380 t/response/TestModperl/pnotes2.pm r584380 | gozer | 2007-10-13 08:48:14 +0200 (Sat, 13 Oct 2007) | 8 lines Don't increase the refcnt of the pnotes HV* twice, we will leak it. Submitted-By: Torsten Foertsch Message-Id: <200710111518.18560.torsten.foert...@gmx.net> Reviewed-By: gozer Torsten Förtsch -- Need professional modperl support? Hire me! (http://foertsch.name) Like fantasy? http://kabatinte.net
Re: Running a proxy in front of mod_perl on Win32
Am Fr, 28.01.2011, 09:31, schrieb Michiel Beijen: > On Fri, January 28, 2011 01:14, Michael Peters wrote: >> Another thing that maybe the OP should look at (if he hasn't already) is >> to run a proxy in front of the main mod_perl application. Even if the >> proxy is on the same machine it will help because you can reduce the >> number of memory-heavy mod_perl processes/threads and handle the same >> number of connections. > > I have read that advice before; then it was because of this bug concerning > running mod_ssl + mod_perl at the same time on Win32: > https://issues.apache.org/bugzilla/show_bug.cgi?id=36751 > > Unfortunately the bug still exists but the bug report was set to invalid > because it did not get proper attention. > > What would be the best (windows-style) way of running a proxy in front of > apache? > > Insights are welcome! > -- > Mike > > (Linux-style) I use nginx and it works great (by coping with ssl and keep-alives) whether you allow it to cache requests or not. It can serve thousands of simultaneous connections and still has just a memory footprint of a few mb. I dont know if the event-model works as great under windows but there are windows builds available on the website (http://nginx.org) so it should be worth a try. Hendrik
Re: [QUESTION] Some tests fail on Debian
On 28.01.2011 09:46, Torsten Förtsch wrote: # run the test t/TEST -verbose t/modperl/pnotes2.t # now check the log and see if it contains 12 lines of 'pnotes are ...' ((12==$(grep 'pnotes are destroyed after cleanup passed' t/logs/error_log | wc -l)))&& echo ok Thank you Torsten. No, it doesn't. I am posting the log nevertheless, with similar-looking entries removed: END in modperl_extra.pl, pid=10195 [Fri Jan 28 11:21:31 2011] [notice] Apache/2.2.9 (Debian) world domination series/2.0 mod_perl/2.0.5-rc1 Perl/v5.10.0 configured -- resuming normal operations [Fri Jan 28 11:21:31 2011] [info] Server built: Dec 31 2010 20:16:52 [Fri Jan 28 11:21:31 2011] [debug] itk.c(1109): AcceptMutex: sysvsem (default: sysvsem) [Fri Jan 28 11:21:32 2011] [info] Child process pid=10203 is exiting [Fri Jan 28 11:21:32 2011] [info] Child process pid=10203 is exiting - server push END in modperl_extra.pl, pid=10203 *** The following warn entry is expected and harmless *** [Fri Jan 28 11:21:32 2011] [info] Child process pid=10204 is exiting [Fri Jan 28 11:21:32 2011] [info] Child process pid=10204 is exiting - server push END in modperl_extra.pl, pid=10204 ... (Similar log entries removed) *** The following warn entry is expected and harmless *** [Fri Jan 28 11:21:35 2011] [info] server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 8 children, there are 0 idle, and 3 total children [Fri Jan 28 11:21:35 2011] [info] Child process pid=10235 is exiting [Fri Jan 28 11:21:35 2011] [info] Child process pid=10235 is exiting - server push END in modperl_extra.pl, pid=10235 ... (Similar log entries removed) [Fri Jan 28 11:21:36 2011] [info] removed PID file /home/justme/sources/mod_perl-2.0.5-rc1/t/logs/httpd.pid (pid=10199) [Fri Jan 28 11:21:36 2011] [notice] caught SIGTERM, shutting down END in modperl_extra.pl, pid=10199
Re: [QUESTION] Some tests fail on Debian
On Friday, January 28, 2011 11:42:46 Alexander Aparzev wrote: > > # now check the log and see if it contains 12 lines of 'pnotes are ...' > > ((12==$(grep 'pnotes are destroyed after cleanup passed' t/logs/error_log > > | wc -l)))&& echo ok > > Thank you Torsten. No, it doesn't. Don't know what the itk-MPM does there. It may be that it just doesn't run the cleanup hooks knowing that the process will terminate soon. That also might be a reason for you to ignore the error. Otherwise, get your preferred debugger and ... Patches are welcome. Viele Grüße aus Weimar nach Berlin (richtig), Torsten Förtsch -- Need professional modperl support? Hire me! (http://foertsch.name) Like fantasy? http://kabatinte.net
Re: [QUESTION] Some tests fail on Debian
On 28.01.2011 12:07, Torsten Förtsch wrote: On Friday, January 28, 2011 11:42:46 Alexander Aparzev wrote: # now check the log and see if it contains 12 lines of 'pnotes are ...' ((12==$(grep 'pnotes are destroyed after cleanup passed' t/logs/error_log | wc -l)))&& echo ok Thank you Torsten. No, it doesn't. Don't know what the itk-MPM does there. It may be that it just doesn't run the cleanup hooks knowing that the process will terminate soon. That also might be a reason for you to ignore the error. Otherwise, get your preferred debugger and ... Patches are welcome. Would if I could :( I am a Java developer and an ad-hoc system administrator. I can write a Perl script, but I cannot possibly debug mod_perl. Besides, there are other tests failing - see original message. I think I would just give "make install" a try. Do you think it would be safe to assume mod_perl cannot possibly destabilize other sites which do *not* use mod_perl? Viele Grüße aus Weimar nach Berlin (richtig), Torsten Förtsch Viele Grüße aus Berlin nach Weimar :) Alexander
VS: build of libapreq2 fails
Hi, Also configuring the runtime linking environment under Solaris 10 often helps a lot along with LDFLAGS: > crle -u -l /usr/sfw/lib > crle -u -l /usr/local/lib Kind regards, Kasper Løvschall Special Consultant, Civil Engineer M.Sc. Aalborg University Library Langagervej 2 Po.Box 8200 DK-9220 Aalborg Øst Denmark Tlf: (+45) 99 40 73 03, Mobile: (+45) 28 95 91 29 E-mail: k...@aub.aau.dk -Oprindelig meddelelse- Fra: John D Groenveld [mailto:jdg...@elvis.arl.psu.edu] Sendt: 28. januar 2011 00:49 Til: modperl@perl.apache.org Emne: Re: build of libapreq2 fails In message <527c4914f1b2ea47b38422de0fa05a65064b1ba...@dh201.dhmcmaster.dh.hitc hcock.org>, "James B. Muir" writes: >Hi, I am trying to build libapreq2 so that I may use it with Apache2 and mo= >d_perl. I'm on a Solaris 10 system. The version of Apache I am using is old= >: > >./bin/apachectl -v >Server version: Apache/2.0.59 >Server built: Aug 22 2006 11:38:34 http://www.apache.org/dist/httpd/CHANGES_2.0.64> > >I receive the following surprising errors during the build of libapreq2: > >gmake[2]: Entering directory `/opt/sfw/libapreq2-2.13/module' >/bin/bash ../libtool --tag=3DCC --mode=3Dlink gcc -g -O2 `/usr/local/lib= >apreq2-2. >13/apreq2-config --link-libtool` -L/usr/local/apache2/lib -laprutil-0 -L/u= >sr/lo >cal/apache2/lib -lapr-0 -o test_cgi test_cgi.o >gcc -g -O2 -o .libs/test_cgi test_cgi.o /opt/sfw/libapreq2-2.13/library/.l= >ibs/l >ibapreq2.so -L/usr/local/apache2/lib /usr/local/apache2/lib/libaprutil-0.so= > /usr >/local/apache2/lib/libapr-0.so -lsendfile -lrt -lm -lsocket -lnsl -lresolv = >-lpth >read -R/usr/local/apache2/lib >Undefined first referenced >symbol in file >XML_Parse /usr/local/apache2/lib/libaprutil-0.so >XML_ParserCreate/usr/local/apache2/lib/libaprutil-0.so >XML_ErrorString /usr/local/apache2/lib/libaprutil-0.so >XML_SetUserData /usr/local/apache2/lib/libaprutil-0.so >XML_ParserFree /usr/local/apache2/lib/libaprutil-0.so >XML_GetErrorCode/usr/local/apache2/lib/libaprutil-0.so >XML_SetCharacterDataHandler /usr/local/apache2/lib/libaprutil-0.so >XML_SetElementHandler /usr/local/apache2/lib/libaprutil-0.so >ld: fatal: Symbol referencing errors. No output written to .libs/test_cgi >collect2: ld returned 1 exit status >gmake[2]: *** [test_cgi] Error 1 >gmake[2]: Leaving directory `/opt/sfw/libapreq2-2.13/module' > > >I recently installed libexpat to /usr/local/lib. > >ls -lF libexpat* >-rw-r--r-- 1 root root 492744 Dec 14 16:23 libexpat.a >-rwxr-xr-x 1 root root 816 Dec 14 16:23 libexpat.la* >lrwxrwxrwx 1 root root 17 Dec 14 16:23 libexpat.so -> libexp= >at.so.1.5.2* >lrwxrwxrwx 1 root root 17 Dec 14 16:23 libexpat.so.1 -> libe= >xpat.so.1.5.2* >-rwxr-xr-x 1 root root 305504 Dec 14 16:23 libexpat.so.1.5.2* > >Does anyone have any idea why I am seeing the undefined symbols when I buil= >d libapreq2? Do I need to rebuild apache to resolve this? I don't see the attempt to link libexpat. You can try manually adding it to LDFLAGS $ env LDFLAGS="-L/usr/local/lib -R/usr/local/lib -lexpat" perl Makefile.PL \ --with-apache2-apxs=/usr/local/apache2/bin/apxs And libexpat ships with Solaris 10 in the SUNWlexpt package. When building Apache httpd 2.2, you specify --with-expat in the configure. John groenv...@acm.org
Re: VS: build of libapreq2 fails
In message , =? iso-8859-1?Q?Kasper_L=F8vschall?= writes: >Also configuring the runtime linking environment under Solaris 10 often helps >a lot along with LDFLAGS: > >> crle -u -l /usr/sfw/lib >> crle -u -l /usr/local/lib If you add the -R flag to the linker (or not set any runtime paths with -R and instead set them with the LD_RUN_PATH environment) then you shouldn't need to kludge the Solaris system or user runtime link environment. My notes for building 64-bit modperl with httpd 2.2 remind me to check these build files: # edit apr_rules.mk and config_vars.mk in /opt/apache2/build # add "-m64 -xO3" to EXTRA_CFLAGS and "-m64" EXTRA_LDFLAGS # confirm "-m64 -L/usr/sfw/lib/64 -R/usr/sfw/lib/64" # edit apr-1-config and apu-1-config in /opt/apache2/bin # add the same to CFLAGS and LDFLAGS # confirm "-m64 -L/usr/sfw/lib/64 -R/usr/sfw/lib/64" BTW with 32-bit Solaris builds one needs to be dilligent about building httpd and Perl the same as either largefile(5) or not or modperl will core. John groenv...@acm.org