Re: [OT] looking for unix/perl/c/c++ programmer

2007-04-12 Thread Perrin Harkins

On 4/12/07, Lev Lvovsky <[EMAIL PROTECTED]> wrote:

My apologies if this sort of posting is not allowed on this list


FYI, job postings that involve mod_perl are always welcome on this
list.  Some people use the [JOB] tag in the subject, but we're not
sticklers about that.  See
http://perl.apache.org/maillist/email-etiquette.html for more info.

- Perrin


Re: graceful stop?

2007-04-12 Thread Perrin Harkins

On 4/12/07, Jonathan Swartz <[EMAIL PROTECTED]> wrote:

The mod_perl guide section on starting and stopping (http://
perl.apache.org/docs/general/control/
control.html#Safe_Code_Updates_on_a_Live_Production_Server)
recommends using regular old stop. Doesn't this terminate any current
user requests, with ugly results on the client? Wouldn't it make more
sense to issue a graceful stop signal, setting
GracefulShutdownTimeout to a low number (like 1) and then sleeping
for at least that number of seconds?


Yes.  The reason the docs don't suggest that is that this is a new
feature in apache 2.2 and as such has not been used by most people who
contribute to the docs.  Please try it, and if it works for you we'll
update the docs.

The graceful restart, which has been there for years, doesn't work
well with mod_perl because it doesn't actually create a new perl
interpreter, so all the old state is still there.

- Perrin


Re: apreq issues - test fail + no uploads

2007-04-12 Thread Jonathan Vanasco


On Apr 12, 2007, at 8:36 PM, Jonathan Vanasco wrote:


I  tried to figure out the error, but couldn't discern it.


i found the error:

$export HARNESS_VERBOSE='1'

not ok 36 - apreq_decode(expect, &elen, src3, sizeof(src3) -1) ==  
APR_SUCCESS, as integers # at (util.c:107) test 5 in test_charset_divine
not ok 37 - apreq_charset_divine(expect, elen) ==  
APREQ_CHARSET_CP1252, as integers # at (util.c:109) test 6 in  
test_charset_divine







// Jonathan Vanasco

| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -

| SyndiClick.com
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -

|  FindMeOn.com - The cure for Multiple Web Personality Disorder
|  Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -

|  RoadSound.com - Tools For Bands, Stuff For Fans
|  Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -





apreq issues - test fail + no uploads

2007-04-12 Thread Jonathan Vanasco
I'm having an issue with libapreq2 on my dev machine.  I haven't used  
it in a while, so I reinstalled to make sure that I'm on the latest.


First off, on the reinstall of libapreq2, I'm getting an error on  
make test:  ( osx 10.4.9 )



perl -MTest::Harness -e 'runtests(@ARGV)' version.t cookie.t params.t  
parsers.t error.t util.t

versionok
cookie.ok
params.ok
parsersok
3/542 skipped: skipping ELF-dependent tests (parsers.c:134)
error..ok
util...FAILED tests 36-37
Failed 2/89 tests, 97.75% okay
Failed Test Stat Wstat Total Fail  Failed  List of Failed
 
---

util.t892   2.25%  36-37
3 subtests skipped.
Failed 1/6 test scripts, 83.33% okay. 2/747 subtests failed, 99.73%  
okay.

make[2]: *** [test] Error 255
make[1]: *** [test] Error 2
make: *** [library_test] Error 2


I  tried to figure out the error, but couldn't discern it.

library/t/ -- is the only dir that seems to have a util.t , but it  
doesn't have 89 tests.let alone finding out what 36/37 are


hopefully someone can help me with that.


I installed anyways, though I have a feeling these may have to do  
with my issue.


Now, getting back to my code:

my handler has this line:
$apr= Apache2::Request->new( $r , POST_MAX=> 1_000_000 );

as a side note , it will die on this line;
		$apr= Apache2::Request->new( $r , POST_MAX=> 1_000_000 ,  
DISABLE_UPLOADS=> 0);
		[Thu Apr 12 19:02:45 2007] [notice] child pid 12021 exit signal Bus  
error (10)


note the DISABLE_UPLOADS=> 0 -- always gives me the Bus error.

however, these lines always work:
		$apr= Apache2::Request->new( $r , POST_MAX=> 1_000_000 ,  
DISABLE_UPLOADS=> 1);
		$apr= Apache2::Request->new( $r , POST_MAX=> 10_000 ,  
DISABLE_UPLOADS=> 1);


If i try to upload a 'small' item, i'll get this: "ERROR Unknown  
error: 0" as my body_status or the process will hang or i'll get a  
segfault.
If I try to uplad something too big, i'll get the right 'too big'  
error, or the process will hang or i'll get a segfault -- mostly a  
segfault or hang.



I'm rebuilding perl with debugging on this machine right now.  and  
will post a stack trace later.  pssibly in the mean time someone can  
point me in the  right direction.


graceful stop?

2007-04-12 Thread Jonathan Swartz
I'm wondering if anyone uses Apache's graceful stop feature (http:// 
httpd.apache.org/docs/2.2/stopping.html#gracefulstop) with mod_perl  
servers.


The mod_perl guide section on starting and stopping (http:// 
perl.apache.org/docs/general/control/ 
control.html#Safe_Code_Updates_on_a_Live_Production_Server)  
recommends using regular old stop. Doesn't this terminate any current  
user requests, with ugly results on the client? Wouldn't it make more  
sense to issue a graceful stop signal, setting  
GracefulShutdownTimeout to a low number (like 1) and then sleeping  
for at least that number of seconds? This would give current requests  
some time to finish, while avoiding the problems of running multiple  
identically configured instances of httpd at the same time.


Thanks
Jon



[OT] looking for unix/perl/c/c++ programmer

2007-04-12 Thread Lev Lvovsky
My apologies if this sort of posting is not allowed on this list (if  
you have suggestions on where to cull prospective employees in the  
OSS community, please let me know).


We're looking for someone with the above-mentioned skillset (if you  
have more, great).  This position is at Fox Studios in Los Angeles  
(Century City) for an R&D programming group.


Please email me privately if interested.

(again, apologies if this is not the right forum, I figure that  
people on this list have the right set of skills for the position).


thanks,
-lev


bugreport: test suite fails to recognize when the server is running

2007-04-12 Thread Glenn Pavlovic

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

When starting the test suite the server is not recognized as being ready.
Note that I am building this in a chroot jail for auditing purposes.

JAILED:[EMAIL PROTECTED]:make test

/usr/bin/perl -Iblib/arch -Iblib/lib \
t/TEST -clean
[warning] setting ulimit to allow core files
ulimit -c unlimited; /usr/bin/perl /usr/local/src/modperl-2.0/t/TEST -clean
APACHE_TEST_GROUP= APACHE_TEST_HTTPD= APACHE_TEST_PORT= 
APACHE_TEST_USER= APACHE_TEST_APXS= \

/usr/bin/perl -Iblib/arch -Iblib/lib \
t/TEST -bugreport -verbose=0
[warning] setting ulimit to allow core files
ulimit -c unlimited; /usr/bin/perl /usr/local/src/modperl-2.0/t/TEST 
-bugreport -verbose=0

[warning] root mode: changing the files ownership to 'nobody' (99:99)
[warning] testing whether 'nobody' is able to -rwx 
/usr/local/src/modperl-2.0/t
"/usr/bin/perl" -Mlib=/usr/local/src/modperl-2.0/Apache-Test/lib 
-MApache::TestRun -e 'eval { Apache::TestRun::run_root_fs_test(99, 99, 
q[/usr/local/src/modperl-2.0/t]) }';



[warning] result: OK
[warning] the client side drops 'root' permissions and becomes 'nobody'
/usr/sbin/httpd  -d /usr/local/src/modperl-2.0/t -f 
/usr/local/src/modperl-2.0/t/conf/httpd.conf -D APACHE2

using Apache/2.2.4 (prefork MPM)

waiting 120 seconds for server to start: .[Thu Apr 12 22:54:31 2007] 
[info] 6 Apache2:: modules loaded

[Thu Apr 12 22:54:31 2007] [info] 0 APR:: modules loaded
[Thu Apr 12 22:54:31 2007] [info] base server + 30 vhosts ready to run tests
..[  error] Failed to find a config file to save the custom configuration in
..
waiting 120 seconds for server to start: not ok
[  error] giving up after 121 secs. If you think that your system
is slow or overloaded try again with a longer timeout value.
by setting the environment variable APACHE_TEST_STARTUP_TIMEOUT
to a high value (e.g. 420) and repeat the last command.

[  error] server failed to start! (please examine t/logs/error_log)
++
| Please file a bug report: http://perl.apache.org/bugs/ |
++
make: *** [run_tests] Error 1
JAILED:[EMAIL PROTECTED]:~/src/modperl-2.0# cat t/logs/error_log
[Thu Apr 12 22:54:34 2007] [info] mod_unique_id: using ip addr 192.168.0.102
END in modperl_extra.pl, pid=4696
[Thu Apr 12 22:54:36 2007] [crit] (13)Permission denied: apr_proc_detach 
failed

Pre-configuration failed

2. Used Components and their Configuration:

*** mod_perl version 2.04

*** using /usr/local/src/modperl-2.0/lib/Apache2/BuildConfig.pm

*** Makefile.PL options:
 MP_APR_LIB => aprext
 MP_APXS=> /usr/sbin/apxs
 MP_COMPAT_1X   => 1
 MP_GENERATE_XS => 1
 MP_LIBNAME => mod_perl
 MP_USE_DSO => 1


*** /usr/sbin/httpd -V
Server version: Apache/2.2.4 (Unix)
Server built:   Apr  4 2007 00:13:35
Server's Module Magic Number: 20051115:4
Server loaded:  APR 1.2.8, APR-Util 1.2.8
Compiled using: APR 1.2.8, APR-Util 1.2.8
Architecture:   32-bit
Server MPM: Prefork
 threaded: no
   forked: yes (variable process count)
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_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=128
-D HTTPD_ROOT="/usr"
-D SUEXEC_BIN="/usr/bin/suexec"
-D DEFAULT_PIDLOG="/var/run/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="/var/run/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="/etc/apache/mime.types"
-D SERVER_CONFIG_FILE="/etc/apache/httpd.conf"

*** /usr/bin/ldd /usr/sbin/httpd
   libm.so.6 => /lib/libm.so.6 (0x40019000)
   libaprutil.so.0 => /usr/lib/libaprutil.so.0 (0x4003b000)
   libexpat.so.0 => /usr/lib/libexpat.so.0 (0x4004f000)
   libapr.so.0 => /usr/lib/libapr.so.0 (0x4006c000)
   librt.so.1 => /lib/librt.so.1 (0x4008d000)
   libcrypt.so.1 => /lib/libcrypt.so.1 (0x4009f000)
   libpthread.so.0 => /lib/libpthread.so.0 (0x400cd000)
   libdl.so.2 => /lib/libdl.so.2 (0x400e4000)
   libc.so.6 => /lib/libc.so.6 (0x400e8000)
   /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x4000)


*** (apr|apu)-config linking info

-L/usr/lib -laprutil -lexpat -L/usr/lib
-L/usr/lib -lapr -lrt -lcrypt  -lpthread -ldl



*** /usr/bin/perl -V
Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
 Platform:
   osname=linux, osvers=2.4.33, archname=i386-linux
   uname='linux adrigale 2.4.33 #6 sun dec 10 15:27:41 pst 2006 i686 
unknown '

   config_args=''
   hint=recommended, useposix=true, d_sigaction=define
   usethreads=undef use5005threads=undef useithreads=undef 
usemultiplicity=undef

   useperlio=define d_sfio=undef u

Charts and Graphs

2007-04-12 Thread Bill Whillers
Hello,

I'm wondering what people are using for efficiently generating charts and 
graphs on the fly from within a mod_perl environment.  I've been using 
GD::Graph for a while but I'm hoping to get a bit more feature-deep.  I'm not 
terribly concerned about getting a bit more complicated if it means better 
efficiency and/or better control, etc.

Any suggestions?



Re: 200 vhosts, 5 sets of libs, 2GB RAM, 1 httpd (seeking advice)

2007-04-12 Thread Chris Hagglund
Thanks everyone for the suggestions. I appreciate it. Will ponder the 
options.


Regards,
Chris Hagglund.


Perrin Harkins wrote:

On 4/11/07, Jonathan Vanasco <[EMAIL PROTECTED]> wrote:

Are you aware of the dangers in namespace collision this can cause?


I'd guess that he is, and that's why uses PerlOptions +Parent.  See
http://perl.apache.org/docs/2.0/user/config/config.html#C_Parent_

The problem with that strategy is that it means your 100 PROD vhosts
don't share anything.  The idea to set up the interpreter once for all
the PROD vhosts is a good one, but I'm not aware of any context level
in between vhost and global, so I don't think it will work.

The proxy idea will work, and is not all that hard really.  You could
probably even rig the servers to all share the same config file and
just have them choose which block to follow by passing -D options on
the command line.

- Perrin