Re: Apache::DB - What am I doing wrong?

2006-03-06 Thread Tom Nagel
Hi Steve,

>>  
>>PerlInitHandler Apache::DB
>>  

Just being curious:

I've seen PerlInitHandler Apache::DB a couple of times now, while the POD
recommends PerlFixupHandler +Apache::DB

Any specific reason for that?


-Thomas



Re: Apache::DB - What am I doing wrong?

2006-03-06 Thread Steve Thames
Yeah, it turns out it works using the fixup handler.  Odd thing is, it
works in the Init handler if I am debugging perl-status--just not
anything else.



Re: Apache::DB - What am I doing wrong?

2006-03-06 Thread Perrin Harkins
On Mon, 2006-03-06 at 11:31 -0800, Gokul P. Nair wrote:
> In other words, is there any way to attach the perl debugger with a
> specific httpd pid, without having to restart Apache in a single
> worker thread mode to ensure that the perl debugger attaches to the
> right httpd pid?

No.  You have no control over which process will handle a request if you
are running with multiple processes.

- Perrin



RE: Apache::DB - What am I doing wrong?

2006-03-06 Thread Chris Werner
Title: RE: Apache::DB - What am I doing wrong?





I don't think that is what he was asking... He asked if there was a way to attache the DEBUGGER to a specific pid; he did not address the issue of getting the correct input to that pid.

I do not use the debugger [but embed debugging code to be switched on/off], I cannot answer the question.


Christian Werner


-Original Message-
From: Perrin Harkins [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 06, 2006 1:44 PM
To: Gokul P. Nair
Cc: modperl_users
Subject: Re: Apache::DB - What am I doing wrong?



On Mon, 2006-03-06 at 11:31 -0800, Gokul P. Nair wrote:
> In other words, is there any way to attach the perl debugger with a
> specific httpd pid, without having to restart Apache in a single
> worker thread mode to ensure that the perl debugger attaches to the
> right httpd pid?


No.  You have no control over which process will handle a request if you
are running with multiple processes.


- Perrin





Re: Apache::DB - What am I doing wrong?

2006-03-06 Thread Andy Armstrong

On 6 Mar 2006, at 19:54, Chris Werner wrote:
I don't think that is what he was asking... He asked if there was a  
way to attache the DEBUGGER to a specific pid; he did not address  
the issue of getting the correct input to that pid.
The point is that you could not know which pid to attach to - you  
don't know which pid will handle the request.


--
Andy Armstrong, hexten.net



RE: Apache::DB - What am I doing wrong?

2006-03-06 Thread Perrin Harkins
On Mon, 2006-03-06 at 13:54 -0600, Chris Werner wrote:
> I don't think that is what he was asking... He asked if there was a
way to attache the
> DEBUGGER to a specific pid; he did not address the issue of getting
the correct input to
> that pid.

The one isn't much good without the other.

In theory, something elaborate could be done with signals in order to
tell the debugger to activate (you'd have to write some XS code), or you
could put something in the URL that triggers it in a handler, but you
still have to send a request to that specific process.

In short, it's a lot of trouble.  What's the problem you're trying to
solve, Gokul?  Restarting with -X is usually not a big deal for a
developer.

- Perrin



Re: Apache::DB - What am I doing wrong?

2006-03-06 Thread Gokul P. Nair
Since we are on this topic, is there any way to get Apache::DB to start the perl debugger without having to restart Apache with a single worker thread (i.e. httpd -X ... option)?In other words, is there any way to attach the perl debugger with a specific httpd pid, without having to restart Apache in a single worker thread mode to ensure that the perl debugger attaches to the right httpd pid?Thanks,GokulSteve Thames <[EMAIL PROTECTED]> wrote: Yeah, it turns out it works using the fixup handler.  Odd thing is, itworks in the Init handler if I am debugging perl-status--just notanything else.   Yahoo! Mail Bring photos to life! New PhotoMail  makes sharing a breeze.  
		Brings words and photos together (easily) with 
PhotoMail  - it's free and works with Yahoo! Mail.

Re: Apache::DB - What am I doing wrong?

2006-03-06 Thread Jonathan Vanasco

i've never used the debugger, so this is a shot in the dark:

push the pid into a textfile / sql / sqlite
do a sql/sqlite lookup at the start of the request
	attach the debugger if the current pid is in the result, detach/ 
notihing otherwise





On Mar 6, 2006, at 3:00 PM, Perrin Harkins wrote:


The one isn't much good without the other.

In theory, something elaborate could be done with signals in order to
tell the debugger to activate (you'd have to write some XS code),  
or you

could put something in the URL that triggers it in a handler, but you
still have to send a request to that specific process.

In short, it's a lot of trouble.  What's the problem you're trying to
solve, Gokul?  Restarting with -X is usually not a big deal for a
developer.

- Perrin




RE: Apache::DB - What am I doing wrong?

2006-03-06 Thread Gokul P. Nair
Well, here's the deal. I would like to view a stack trace of everything that's being called in my web application, starting from when the web page is loaded to browsing through the different pages. Starting with the -X is certainly not an option in my case since the Apache server I'm using is maintained by another dept and all i have is access to start, stop or restart the server though a script. I could certainly have Apache, mod_perl etc running on my own development box and have root access to it, but the above question stems more out of curiousity and an intention to experiment given the circumstances, rather than having to solve some immediate problem.Now, I could certainly use Carp::Cluck to obtain a stack trace but that also means that I would have to 'use Carp' in every module that could ever get called, right?Also, since this is just an experiment, I certainly don't mind having to write my own XS or C code. Just curious.Thanks
 again,GokulPerrin Harkins <[EMAIL PROTECTED]> wrote: On Mon, 2006-03-06 at 13:54 -0600, Chris Werner wrote:> I don't think that is what he was asking... He asked if there was away to attache the> DEBUGGER to a specific pid; he did not address the issue of gettingthe correct input to> that pid.The one isn't much good without the other.In theory, something elaborate could be done with signals in order totell the debugger to activate (you'd have to write some XS code), or youcould put something in the URL that triggers it in a handler, but youstill have to send a request to that specific process.In short, it's a lot of trouble.  What's the problem you're trying tosolve, Gokul?  Restarting with -X is usually not a big deal for adeveloper.-
 Perrin
	
		 Yahoo! Mail 
Use Photomail to share photos without annoying attachments.

RE: Apache::DB - What am I doing wrong?

2006-03-06 Thread Joe Breeden








You may want to use the Apache::DProf module
from CPAN - http://search.cpan.org/~fwiles/Apache-DB-0.11/lib/Apache/DProf.pm.
I find it useful when I want to know that kind of information.

 









From: Gokul P. Nair
[mailto:[EMAIL PROTECTED] 
Sent: Monday, March 06, 2006 2:39
PM
To: Perrin Harkins; Chris Werner
Cc: Gokul P. Nair; modperl_users
Subject: RE: Apache::DB - What am
I doing wrong?



 

Well, here's the deal. I would like to view a stack trace of everything
that's being called in my web application, starting from when the web page is
loaded to browsing through the different pages. Starting with the -X is
certainly not an option in my case since the Apache server I'm using is
maintained by another dept and all i have is access to start, stop or restart the
server though a script. 

I could certainly have Apache, mod_perl etc running on my own development box
and have root access to it, but the above question stems more out of curiousity
and an intention to experiment given the circumstances, rather than having to
solve some immediate problem.

Now, I could certainly use Carp::Cluck to obtain a stack trace but that also
means that I would have to 'use Carp' in every module that could ever get
called, right?

Also, since this is just an experiment, I certainly don't mind having to write
my own XS or C code. Just curious.

Thanks again,

Gokul











RE: Apache::DB - What am I doing wrong?

2006-03-06 Thread Gokul P. Nair
Also, when I said "use Carp in every module", I meant 'call Carp::Cluck'. Sorry for that confusion.  Gokul"Gokul P. Nair" <[EMAIL PROTECTED]> wrote: Well, here's the deal. I would like to view a stack trace of everything that's being called in my web application, starting from when the web page is loaded to browsing through the different pages. Starting with the -X is certainly not an option in my case since the Apache server I'm using is maintained by another dept and all i have is access to start, stop or restart the server though a script. I could certainly have Apache, mod_perl etc running on my own development box and have root access to it, but the above question stems more out of curiousity and an intention to experiment given the circumstances, rather than having to solve some immediate problem.Now, I cou
 ld
 certainly use Carp::Cluck to obtain a stack trace but that also means that I would have to 'use Carp' in every module that could ever get called, right?Also, since this is just an experiment, I certainly don't mind having to write my own XS or C code. Just curious.Thanks  again,GokulPerrin Harkins <[EMAIL PROTECTED]> wrote: On Mon, 2006-03-06 at 13:54 -0600, Chris Werner wrote:> I don't think that is what he was asking... He asked if there was away to attache the> DEBUGGER to a specific pid; he did not address the issue of gettingthe correct input to> that pid.The one isn't much good without the other.In theory, something elaborate could be done with signals in order totell the debugger to activate (you'd have to write some XS code), or youcould put something in 
 the URL
 that triggers it in a handler, but youstill have to send a request to that specific process.In short, it's a lot of trouble.  What's the problem you're trying tosolve, Gokul?  Restarting with -X is usually not a big deal for adeveloper.-  Perrin  Yahoo! Mail  Use Photomail to share photos without annoying attachments.
		 Yahoo! Mail 
Use Photomail to share photos without annoying attachments.

RE: Apache::DB - What am I doing wrong?

2006-03-06 Thread Perrin Harkins
On Mon, 2006-03-06 at 12:38 -0800, Gokul P. Nair wrote:
> Starting with the -X is certainly not an option in my case since the
> Apache server I'm using is maintained by another dept and all i have
> is access to start, stop or restart the server though a script. 

Unless they've gone to a lot of trouble to prevent it, you can probably
change that script, or make your own.  The apachectl script is just a
simple shell script and easy to modify.

- Perrin



Re: [OT] modperl vs. Ruby

2006-03-06 Thread Harry Zhu


- Original Message - 
From: "Jonathan" <[EMAIL PROTECTED]>

To: "mod_perl List" 
Sent: Saturday, February 25, 2006 6:26 PM
Subject: Re: [OT] modperl vs. Ruby




there's been a popular link critiquing rails floating around

http://discuss.joelonsoftware.com/default.asp?joel.3.309321.3

personally, I hate rails.   i'm seeing a lot of colleagues adopt it,  
with a combination of this reasoning:

it 'sucks less than php' ( from someone with a php book )
its perfect for doing small sites regardless of traffic
remember, there are 2 types of scaling :
a- lots of users / content
b- lots of hits
rails can scale on b reasonably well behind lighty w/fcgi.  just  
loadbalance and toss server after server into a cluster.

the bulk of its use is design shop stuff

but all my colleagues/friends work for design shops

not to knock rails, but the biggest project they've been implemented  
with , as far as i can tell, is odeo. lots of other projects are done  
in it, but none that scale in use and content like that one, and it  
doesn't really impress me.  there could  be something else out there,  
but i've yet to see it.  all the projects i've seen done on it are  
blogs, small sharing apps, design agency stuff, etc.  it does that  
stuff really well and really fast, but there's no breadth to it.   
AFAIK the big blog implementation service that touts rails is run as  
multiple installations each behind their own lighty instance with  
fcgi support.


this fall, I quit my FT job to start an online sharing / syndication  
service that will hopefully go live within the month.


i evaluated a ton of frameworks and languages, here's how i felt:

ruby - rails was getting all the hype. i tried rails and had a  
webapp running in minutes.  it was a sheer pleasure as promised.   
except rails couldn't do what i wanted to do for my project.  it was  
way to strict. its made for building a certain type of application -  
not every application.
c - would have been the fastest to run and scale the best.   
nightmare to write.
php - i found it a nightmare to maintain code and enforce MVC, and i  
intensely dislike the model of everything essentially being a cgi  
script.  i wanted everything compiled into the server, as i'm running  
a single service, not 20 differentn projects for 20 clients like I  
managed at my old design agency.
python - the spec on the  twisted framework kept changing.  django  
was too Rail's-ish in scope.  turbogears didn't exist yet, but also a  
bit too rails-ish for me.
perl - i don't like template toolkit or mason.  i know many do.  i  
just don't.  they're both very perlish in the templates.  catalyst  
wasn't really around yet - maypole was, but also too rails ish.


i ended up building my own MVC 'framework' under mp2.  i get all the  
speed and server integration that I wanted.   i'm tossing framework  
in quotes, because everything is too built-into my app.  i'd love to  
pull it out and release it, but its not there yet.  it basically just  
does url dispatching to perl modules + session control in a  
standardized manner, and has an abstracted api for content  
rendering.all html pages are written TAL, because I  use python  
to prototype objects and methods and handle admin tasks.  this lets  
me use the same exact templates for prototyping.one might  think  
that perl or ruby is fast/easy to write - well (for me)python is a  
fraction of it -- and program/test in python than port to mod_perl is  
way faster (again for me than ) doing everything in mod_perl.


i think the reasons why rails gets so much hype are this:
it makes building a certain type of project easy.  those projects  
are 'popular' as are the companies building them.  so when people  
talk about it, others listen.
its gaining a lot of ground w/newcomers to web building, as its easy  
and intuitive.  so more people talk about it.
it converts a lot of people from .NET or java, who hear the hype and  
give it a shot.  truth be told, they find it a dream.  who wouldn't  
after that conversion?


so depending on what  you're building, RoR may be the best framework  
for you, or a complete nightmare.  its certainly not the jack-of-all- 
trades, and neither is catalyst.  using any framework or language,  
your milage WILL vary compared to others.



On Feb 25, 2006, at 5:23 PM, Mark Galbreath wrote:


which then begs the question, why RoR and not Catalyst?




--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 268.1.0/269 - Release Date: 2/24/2006




Re: [OT] modperl vs. Ruby

2006-03-06 Thread Harry Zhu

Sorry, it's an accident to reply to the list.

Harry

- Original Message - 
From: "Harry Zhu" <[EMAIL PROTECTED]>
To: "Jonathan" <[EMAIL PROTECTED]>; "mod_perl List" 


Sent: Monday, March 06, 2006 4:41 PM
Subject: Re: [OT] modperl vs. Ruby




- Original Message - 
From: "Jonathan" <[EMAIL PROTECTED]>

To: "mod_perl List" 
Sent: Saturday, February 25, 2006 6:26 PM
Subject: Re: [OT] modperl vs. Ruby




there's been a popular link critiquing rails floating around

http://discuss.joelonsoftware.com/default.asp?joel.3.309321.3

personally, I hate rails.   i'm seeing a lot of colleagues adopt it, 
with a combination of this reasoning:

it 'sucks less than php' ( from someone with a php book )
its perfect for doing small sites regardless of traffic
remember, there are 2 types of scaling :
a- lots of users / content
b- lots of hits
rails can scale on b reasonably well behind lighty w/fcgi.  just 
loadbalance and toss server after server into a cluster.

the bulk of its use is design shop stuff

but all my colleagues/friends work for design shops

not to knock rails, but the biggest project they've been implemented 
with , as far as i can tell, is odeo. lots of other projects are done  in 
it, but none that scale in use and content like that one, and it  doesn't 
really impress me.  there could  be something else out there,  but i've 
yet to see it.  all the projects i've seen done on it are  blogs, small 
sharing apps, design agency stuff, etc.  it does that  stuff really well 
and really fast, but there's no breadth to it.   AFAIK the big blog 
implementation service that touts rails is run as  multiple installations 
each behind their own lighty instance with  fcgi support.


this fall, I quit my FT job to start an online sharing / syndication 
service that will hopefully go live within the month.


i evaluated a ton of frameworks and languages, here's how i felt:

ruby - rails was getting all the hype. i tried rails and had a  webapp 
running in minutes.  it was a sheer pleasure as promised.   except rails 
couldn't do what i wanted to do for my project.  it was  way to strict. 
its made for building a certain type of application -  not every 
application.
c - would have been the fastest to run and scale the best.   nightmare to 
write.
php - i found it a nightmare to maintain code and enforce MVC, and i 
intensely dislike the model of everything essentially being a cgi 
script.  i wanted everything compiled into the server, as i'm running  a 
single service, not 20 differentn projects for 20 clients like I  managed 
at my old design agency.
python - the spec on the  twisted framework kept changing.  django  was 
too Rail's-ish in scope.  turbogears didn't exist yet, but also a  bit 
too rails-ish for me.
perl - i don't like template toolkit or mason.  i know many do.  i  just 
don't.  they're both very perlish in the templates.  catalyst  wasn't 
really around yet - maypole was, but also too rails ish.


i ended up building my own MVC 'framework' under mp2.  i get all the 
speed and server integration that I wanted.   i'm tossing framework  in 
quotes, because everything is too built-into my app.  i'd love to  pull 
it out and release it, but its not there yet.  it basically just  does 
url dispatching to perl modules + session control in a  standardized 
manner, and has an abstracted api for content  rendering.all html 
pages are written TAL, because I  use python  to prototype objects and 
methods and handle admin tasks.  this lets  me use the same exact 
templates for prototyping.one might  think  that perl or ruby is 
fast/easy to write - well (for me)python is a  fraction of it -- and 
program/test in python than port to mod_perl is  way faster (again for me 
than ) doing everything in mod_perl.


i think the reasons why rails gets so much hype are this:
it makes building a certain type of project easy.  those projects  are 
'popular' as are the companies building them.  so when people  talk about 
it, others listen.
its gaining a lot of ground w/newcomers to web building, as its easy  and 
intuitive.  so more people talk about it.
it converts a lot of people from .NET or java, who hear the hype and 
give it a shot.  truth be told, they find it a dream.  who wouldn't 
after that conversion?


so depending on what  you're building, RoR may be the best framework  for 
you, or a complete nightmare.  its certainly not the jack-of-all- trades, 
and neither is catalyst.  using any framework or language,  your milage 
WILL vary compared to others.



On Feb 25, 2006, at 5:23 PM, Mark Galbreath wrote:


which then begs the question, why RoR and not Catalyst?




--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 268.1.0/269 - Release Date: 2/24/2006





--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 268.2.0/275 - Release Date: 3/6/2006






Concurrency with mod_perl 2.01 on Windows

2006-03-06 Thread Rod Morris
Hi all,I'm porting some old perl code to a new installation of Apache/2.0.54 (Win32) mod_perl/2.0.1 on Windows 2003 Server. In testing some file locking code, I noticed that response seemed very slow when I dumped in multiple jobs via multiple browsers to the server. I added a timer and saw the scripts waiting for one to finish before the next started as if they were queued waiting for the server.
I've got another server running freeBSD and it's set up to run mutilple instance of Apache which seems to deal with this. But on Windows, I haven't added anything for this and it comes up by default with 2 instances of Apache. 
It's my impression that threading should be used to deal with mutilple requests for one script, but that's not what I'm seeing. I'm seeing one script wait and then start when the last one finishes. MY script just gets the time, sleeps and then gets the time again.
Am I missing a configuration option or do I need a different version of perl? I installed for the standard combined Apache/mod_perl distribution.Thanks,Rod Morris 


Re: Module::Build + Apache2 oddity

2006-03-06 Thread Randy W. Sims

Tyler MacDonald wrote:

I have a function that does this to get database settings, to test an
apache2 handler that uses a database:

sub test_db {
my $build = Apache::TestMB->current;
return unless $build->notes('DBI_DSN');
return map {
defined $build->notes($_) ? $build->notes($_) : ''
} qw(DBI_DSN DBI_USER DBI_PASS);
}

When I grab these values from within extra.last.conf.in, the function
returns successfully and gives me the right settings right away. However,
Apache::Test's apache2 times out waiting for the server to start. I get the
same result with Module::Build->current.

When I set these in my extra.conf.last.in manually, everything works and my
tests pass.

I'm kind of confused as to how invoking a Module::Build object could cause
the server to hang long after the object has been destroyed. Any ideas?

For now, I'm just doing to do() the _build/notes file to get this config
data.


Hmm, not sure I know enough about web servers to help out. Which part of 
the above method is causing it to hang? If you take out the call to 
notes, so it only loads the MB object does it succeed? Can you construct 
a simple test case that exhibits the problem?


Randy.



Bug report $r->read() fail

2006-03-06 Thread Khai Doan

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

  Calling $r->read($buf,0) result in an internal server error, and an entry 
in error_log: The LENGTH argument can't be negative at .


2. Used Components and their Configuration:

*** mod_perl version 2.02

*** using /home/khai/mod_perl-2.0.2/lib/Apache2/BuildConfig.pm

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


*** /usr/sbin/httpd -V
Server version: Apache/2.0.52
Server built:   Dec 15 2005 04:09:14
Server's Module Magic Number: 20020903:9
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_SYSVSEM_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="/etc/httpd"
-D SUEXEC_BIN="/usr/sbin/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/ldd /usr/sbin/httpd
libpcre.so.0 => /lib/libpcre.so.0 (0x00e1c000)
libpcreposix.so.0 => /usr/lib/libpcreposix.so.0 (0x00509000)
libaprutil-0.so.0 => /usr/lib/libaprutil-0.so.0 (0x00343000)
libldap-2.2.so.7 => /usr/lib/libldap-2.2.so.7 (0x00af3000)
liblber-2.2.so.7 => /usr/lib/liblber-2.2.so.7 (0x00bf6000)
libdb-4.2.so => /lib/tls/i686/libdb-4.2.so (0x00111000)
libexpat.so.0 => /usr/lib/libexpat.so.0 (0x00bc5000)
libapr-0.so.0 => /usr/lib/libapr-0.so.0 (0x001df000)
librt.so.1 => /lib/tls/librt.so.1 (0x00201000)
libm.so.6 => /lib/tls/libm.so.6 (0x00edd000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x0089e000)
libpthread.so.0 => /lib/tls/libpthread.so.0 (0x00215000)
libdl.so.2 => /lib/libdl.so.2 (0x005ce000)
libc.so.6 => /lib/tls/libc.so.6 (0x00357000)
libresolv.so.2 => /lib/libresolv.so.2 (0x0027d000)
libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0x00227000)
libssl.so.4 => /lib/libssl.so.4 (0x00d48000)
libcrypto.so.4 => /lib/libcrypto.so.4 (0x00693000)
/lib/ld-linux.so.2 (0x0067c000)
libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0x0023b000)
libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0x007c1000)
libcom_err.so.2 => /lib/libcom_err.so.2 (0x00e9d000)
libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0x00d85000)
libz.so.1 => /usr/lib/libz.so.1 (0x005af000)


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

-laprutil-0 -lldap -llber -ldb-4.2 -lexpat
-lapr-0 -lrt -lm -lcrypt  -lpthread -ldl



*** /usr/bin/perl -V
Summary of my perl5 (revision 5 version 8 subversion 5) configuration:
 Platform:
   osname=linux, osvers=2.6.9-22.18.bz155725.elsmp, 
archname=i386-linux-thread-multi
   uname='linux hs20-bc1-4.build.redhat.com 2.6.9-22.18.bz155725.elsmp #1 
smp thu nov 17 15:34:08 est 2005 i686 i686 i386 gnulinux '
   config_args='-des -Doptimize=-O2 -g -pipe -m32 -march=i386 
-mtune=pentium4 -Dversion=5.8.5 -Dmyhostname=localhost 
[EMAIL PROTECTED] -Dcc=gcc -Dcf_by=Red Hat, Inc. 
-Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux -Dvendorprefix=/usr 
-Dsiteprefix=/usr -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles 
-Dd_dosuid -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog 
-Dman3ext=3pm -Duseperlio -Dinstallusrbinperl -Ubincompat5005 -Uversiononly 
-Dpager=/usr/bin/less -isr -Dinc_version_list=5.8.4 5.8.3 5.8.2 5.8.1 5.8.0'

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

   useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
   use64bitint=undef use64bitall=undef uselongdouble=undef
   usemymalloc=n, bincompat5005=undef
 Compiler:
   cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DDEBUGGING 
-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',

   optimize='-O2 -g -pipe -m32 -march=i386 -mtune=pentium4',
   cppflags='-D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing 
-pipe -I/usr/local/include -I/usr/include/gdbm'
   ccversion='', gccversion='3.4.5 20051201 (Red Hat 3.4.5-1)', 
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='gcc', ldflags =' -L/usr/local/lib'
   libpth=/usr/local/lib /lib /usr/lib
   libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc
   perllibs=-lnsl -l

Re: Concurrency with mod_perl 2.01 on Windows

2006-03-06 Thread William A. Rowe, Jr.

One thing that causes a significant performance degredation on Win32 is
fixed, we are looking at the second issue.

In APR, unbuffered writes were system-level flushing.  I believe this
had to do with some early network testing and multiple-writer concurrency
issues, but the end result is unacceptable, and you may be seeing this.
2.0.56 and 2.2.1 will likely incorporate this fix.

The other is multi-process concurrency using file level locking from byte
0 to -1 (unlimited).  This too has proven very slow, although I'm not yet
sure how much the previous issue impacted this apparent performance.

Effectively, on Unix write() is atomic, and in append mode, safe across
processes/threads.  On win32, we need to emulate this behavior.  That said,
just be aware that we are researching this.

The patch to the already committed quirk for 2.0 windows is here;

http://svn.apache.org/viewcvs?rev=378055&view=rev

Let us know if this alters your observed performance.

Yours,

Bill


Rod Morris wrote:

Hi all,

I'm porting some old perl code to a new installation of Apache/2.0.54 
(Win32) mod_perl/2.0.1 on Windows 2003 Server. In testing some file 
locking code, I noticed that response seemed very slow when I dumped in 
multiple jobs via multiple browsers to the server. I added a timer and 
saw the scripts waiting for one to finish before the next started as if 
they were queued waiting for the server.


I've got another server running freeBSD and it's set up to run mutilple 
instance of Apache which seems to deal with this. But on Windows, I 
haven't added anything for this and it comes up by default with 2 
instances of Apache.


It's my impression that threading should be used to deal with mutilple 
requests for one script, but that's not what I'm seeing. I'm seeing one 
script wait and then start when the last one finishes. MY script just 
gets the time, sleeps and then gets the time again.


Am I missing a configuration option or do I need a different version of 
perl? I installed for the standard combined Apache/mod_perl distribution.


Thanks,
Rod Morris