Re: [mp2] "make test" failure in t/api/access2

2005-08-16 Thread Michael G Schwern
On Tue, Aug 16, 2005 at 04:05:21PM -0700, Stas Bekman wrote: > Looks fine. Dunno why it doesn't end up in the right place. Do you load > some module that overrides SIG{__WARN__}? Nope. -- Michael G Schwern [EMAIL PROTECTED] http://www.pobox.com/~schwern 'All anyone gets in a mirror is

Re: win32, mod_perl/2.0.1, Apache/2.0.54 - ithreads problem

2005-08-16 Thread Randy Kobes
On Fri, 5 Aug 2005, Plymouth Rock wrote: Could you post a complete (but minimal) script that illustrates the problem you're encountering? From what you wrote above, I tried this Registry script: Here is a simplest ithread-based perl-script I'd testing. At first, run it just with Perl (or, it'

Re: apache children waits for each other?

2005-08-16 Thread Badai Aqrandista
Apache::DProf uses the debugger hooks. You can also try Sam Tregar's Devel::Profiler::Apache which is somewhat slower but easier to use since it doesn't use the debugger. I'll look into that... Thanks for your suggestions... --- Badai Aqrandista Cheepy (?)

Re: apache children waits for each other?

2005-08-16 Thread Perrin Harkins
Badai Aqrandista wrote: use lib '/i4u/web/elres-mp'; #require Apache::DB; #Apache::DB->init; PerlRequire /i4u/web/elres-mp/etc/startup.pl PerlModule Apache::DProf PerlModule ELRes::ELRes PerlModule ELRes::ApacheHandler PerlTransHandler ELRes::Apache

Re: apache children waits for each other?

2005-08-16 Thread Badai Aqrandista
It does look odd. Maybe you are still loading some code before calling Apache::DB->init(). Can you post your httpd.conf, or at least the mod_perl part of it? start of mod_perl configuration ... use lib '/i4u/web/elres-mp'; #require Apache::DB; #Apache::DB->i

Re: apache children waits for each other?

2005-08-16 Thread Perrin Harkins
Badai Aqrandista wrote: As I said previously, the handler itself tops everything... I don't know why it happens... It does look odd. Maybe you are still loading some code before calling Apache::DB->init(). Can you post your httpd.conf, or at least the mod_perl part of it? If I use Devel::

Re: apache children waits for each other?

2005-08-16 Thread Badai Aqrandista
Okay, send it again with the top 10, sorted by -r then. Maybe we can make more suggestions. Exclusive Times %Time ExclSec CumulS #Calls sec/call Csec/c Name 20.5 14.30 15.222 1 14.305 15.222 ELRes::ApacheHandler::handler 0.37 0.261 0.261 99576 0. 0. Date::Simple::as_

Re: mod_perl touted in company press release

2005-08-16 Thread Frank Wiles
On Tue, 16 Aug 2005 16:14:56 -0700 Stas Bekman <[EMAIL PROTECTED]> wrote: > Perrin Harkins wrote: > > http://home.businesswire.com/portal/site/google/index.jsp? > > ndmViewId=news_view&newsId=20050816005237&newsLang=en > > > > "Increased Performance and Scalability with Mod_Perl: FootPrints 7.0 >

Re: apache children waits for each other?

2005-08-16 Thread Perrin Harkins
On Wed, 2005-08-17 at 10:15 +1000, Badai Aqrandista wrote: > >Was the previous output sorted with the -r flag though? > > No. Okay, send it again with the top 10, sorted by -r then. Maybe we can make more suggestions. - Perrin

Re: apache children waits for each other?

2005-08-16 Thread Badai Aqrandista
Was the previous output sorted with the -r flag though? No. There's no trick, it's the same as in any language: find out what the slow parts are by using a profiler and tinker with them until they are faster. You can look at the tuning information on http://modperlbook.org/ for some advice

Re: apache children waits for each other?

2005-08-16 Thread Perrin Harkins
On Wed, 2005-08-17 at 09:23 +1000, Badai Aqrandista wrote: > I got the previous output because I put in the debugger initialization... Was the previous output sorted with the -r flag though? It just seems so unlikely that Params::Validate would take significant time. If it was sorted with -r, it

Re: apache children waits for each other?

2005-08-16 Thread Badai Aqrandista
I do all of my memcached stuff , including sessions, with mysql failover. its barely more code - i just make every public function address two private functions. ie: sub save { $_[0]->_save_memcached(); $_[0]->_save_mysql(); } sub load { if ( !$_[0]->_load_memcache

Re: apache children waits for each other?

2005-08-16 Thread Badai Aqrandista
I also suspect that you didn't initialize the debugger before compiling your code, since none of your code appears in this output. I got the previous output because I put in the debugger initialization... Without initialization (Apache::DB->init), this is the top 5 output before the cache is f

Re: mod_perl2 bug report

2005-08-16 Thread Philip M. Gollucci
Stas Bekman wrote: Philip M. Gollucci wrote: Well, the diagnostics are not exactly correct, Philip. as the problem has little to do with perl having ithreads enabled. apr_os_thread_current is used only if APR_HAS_THREADS is defined. When mod_perl is being built it gets this define from the ap

Re: mod_perl touted in company press release

2005-08-16 Thread Stas Bekman
Perrin Harkins wrote: http://home.businesswire.com/portal/site/google/index.jsp? ndmViewId=news_view&newsId=20050816005237&newsLang=en "Increased Performance and Scalability with Mod_Perl: FootPrints 7.0 offers significantly improved performance and speed when a large number of agents are using

Re: mod_perl2 bug report

2005-08-16 Thread Stas Bekman
Philip M. Gollucci wrote: During the tests i've an error: /home/asm/apache2054/bin/bin/httpd -d /usr/home/asm/soft/Apache/mod_perl-2.0.1/t -f /usr/home/asm/soft/Apache/mod_perl-2.0.1/t/conf/httpd.conf -D APACHE2 -D PERL_USEITHREADS using Apache/2.0.54 (prefork MPM) waiting 120 seconds for

Re: [mp2] "make test" failure in t/api/access2

2005-08-16 Thread Stas Bekman
Michael G Schwern wrote: On Mon, Aug 15, 2005 at 05:54:53PM -0700, Stas Bekman wrote: Where does it go then? Are you sure you've applied the patch and the warn statement is there? Grepping the source tree the only instance of "myip" is in t/response/TestAPI/access2.pm which I put in there

Re: apache children waits for each other?

2005-08-16 Thread Badai Aqrandista
Hi, I'm assuming that each client database is contained within the same MySQL server, and that you're not running 300 MySQL servers on different machines or different ports? Yes, why would I do that? If so, you can reuse the same connections, and just reference the different database in the

Re: mod_perl2 bug report

2005-08-16 Thread Philip M. Gollucci
During the tests i've an error: /home/asm/apache2054/bin/bin/httpd -d /usr/home/asm/soft/Apache/mod_perl-2.0.1/t -f /usr/home/asm/soft/Apache/mod_perl-2.0.1/t/conf/httpd.conf -D APACHE2 -D PERL_USEITHREADS using Apache/2.0.54 (prefork MPM) waiting 120 seconds for server to start: .Syntax err

mod_perl2 bug report

2005-08-16 Thread Alexander Smotrov
1. Problem Description: I'm trying to install mod_perl2, but i've got a problem. I've successfully compiled apache 2.054, mod_perl2, and the next step is running 'make test' command into for mod_perl. During the tests i've an error: /home/asm/apache2054/bin/bin/httpd -d /usr/home/asm/soft/A

Re: Adding Directives At Runtime

2005-08-16 Thread Christopher H. Laco
Philippe M. Chiasson wrote: A sample example of what I _think_ you are trying to do would look like: PerlModule Catalyst package Catalyst; use Apache2::ServerUtil qw(); [... figure out where/what to configure ...] Apache2::ServerUtil->server->add_config([ '', ' SetHandler perl-script', '

RE: Mod_perl Apache to encapsulate legacy protocol

2005-08-16 Thread Chris Werner
Title: RE: Mod_perl Apache to encapsulate legacy protocol One of these approaches should fit my need. Thank you, Christian Werner -Original Message- From: Stas Bekman [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 16, 2005 10:56 AM To: Tom Schindl Cc: Chris Werner; modperl@perl.apa

Re: Adding Directives At Runtime

2005-08-16 Thread Philippe M. Chiasson
Christopher H. Laco wrote: > Perrin Harkins wrote: > >> On Tue, 2005-08-16 at 12:07 -0400, Christopher H. Laco wrote: >> >>> There are various plugins and httpd.conf changes that can be made to >>> disuade this behaviour, but I would like to take it a step further >>> and make it Just Work(TM) so

Re: Hanging apache child on fork

2005-08-16 Thread Philippe M. Chiasson
Benoit Caron wrote: > Hello. > > I'm having trouble with a new setup on a RedHat Entreprise Linux 4 box. > The problem is that whenever there is perl code that fork to execute > something, the apache child hang. Have you read: http://perl.apache.org/docs/1.0/guide/performance.html#Forking_and_Ex

mod_perl touted in company press release

2005-08-16 Thread Perrin Harkins
http://home.businesswire.com/portal/site/google/index.jsp? ndmViewId=news_view&newsId=20050816005237&newsLang=en "Increased Performance and Scalability with Mod_Perl: FootPrints 7.0 offers significantly improved performance and speed when a large number of agents are using the system. Mod_Perl ver

Hanging apache child on fork

2005-08-16 Thread Benoit Caron
Hello. I'm having trouble with a new setup on a RedHat Entreprise Linux 4 box. The problem is that whenever there is perl code that fork to execute something, the apache child hang. The problem occur with a specific function is called. But the weird part is that the hang don't occur when that fun

RE: Mod_Perl 2.0 Header question

2005-08-16 Thread Justin Luster
Perrin responded to my question below. His response works with what I'm trying to do. Let me know if you think this is a bad idea. On Tue, 2005-08-16 at 09:20 -0700, Justin Luster wrote: > The way it relates is that in the previous code I was doing this: > > my $r = Apache->request; > > $r

Re: Adding Directives At Runtime

2005-08-16 Thread Christopher H. Laco
Perrin Harkins wrote: On Tue, 2005-08-16 at 12:07 -0400, Christopher H. Laco wrote: There are various plugins and httpd.conf changes that can be made to disuade this behaviour, but I would like to take it a step further and make it Just Work(TM) so I don't have to tweak the httpd.conf or the

Re: apache -X on win32 vs mod_perl

2005-08-16 Thread Philip M. Gollucci
Bjoern Hoehrmann wrote: Now when launching Apache with -X or -DONE_PROCESS it works fine when accessing normal files but as soon as a client requests /script the web server will exit, no error message, nothing in the error_log, the .pid file is not removed, it basically crashes. Is this known and

Re: Mod_Perl 2.0 Header question

2005-08-16 Thread Philip M. Gollucci
>I find that this breaks under some versions of Mod_Perl 2.0. I’m >working with two older versions: 1.99_07-dev and 1.99_12 both on Linux >machines. You should really try to use at least RC 5+ My confusion is how to send the proper 2.0 header. In my in-house version Apache->request; does not

Apache crash when using next outside loop

2005-08-16 Thread Bjoern Hoehrmann
Hi, http://dev.w3.org/cvsweb/validator/httpd/cgi-bin/check v1.437, there is a callback with 'return; # Don't report this as a normal error.' at the end of the script. If the return is changed into a "next" it will crash Apache when running under mod_perl 2.0.1 / Apache/2.0.54 on w2k3 though I co

apache -X on win32 vs mod_perl

2005-08-16 Thread Bjoern Hoehrmann
Hi, Apache/2.0.54 with mod_perl 2.0.1 on Windows Server 2003, mostly standard configuration using mod_perl like SetHandler perl-script PerlOptions +ParseHeaders PerlResponseHandler ModPerl::Registry LoadFile "d:/Perl/bin/perl58.dll" LoadModule perl_modu

Mod_Perl 2.0 Header question

2005-08-16 Thread Justin Luster
Hi, I was hoping to get a bit of help on how to send the proper HTTP headers using Mod_Perl.  We create Perl scripts and then ship them out to our clients for them to run on their servers.  The script should work on regular CGI and Mod_Perl if they have it.  Things have worked fine so far. 

Re: Adding Directives At Runtime

2005-08-16 Thread Perrin Harkins
On Tue, 2005-08-16 at 12:07 -0400, Christopher H. Laco wrote: > There are various plugins and httpd.conf changes that can be made to > disuade this behaviour, but I would like to take it a step further and > make it Just Work(TM) so I don't have to tweak the httpd.conf or the > static plugin eve

Re: Adding Directives At Runtime

2005-08-16 Thread Frank Wiles
On Tue, 16 Aug 2005 12:23:04 -0400 "Christopher H. Laco" <[EMAIL PROTECTED]> wrote: > Yes, and No. Read it. It seems to cover more of doing things like that > > in sections. What I'm more curious is if it can be done during > this phase: > > PerlModule MyCatalystApp > > What I don't ye

Re: Adding Directives At Runtime

2005-08-16 Thread Christopher H. Laco
Geoffrey Young wrote: What I don't yet grasp is if adding to the httpd.conf at runtime is limited to a particular phase of if I could have any mod_perl handler actually alter the http config while serving live requests. well, you probably wouldn't want to do the latter - once you're serving

Re: Adding Directives At Runtime

2005-08-16 Thread Geoffrey Young
> Yes, and No. Read it. It seems to cover more of doing things like that > in sections. What I'm more curious is if it can be done during > this phase: > > PerlModule MyCatalystApp yes. at least in mp1. see http://www.modperlcookbook.org/~geoff/modules/experimental/Apache-ReverseLocation

Re: Adding Directives At Runtime

2005-08-16 Thread Christopher H. Laco
Frank Wiles wrote: On Tue, 16 Aug 2005 12:07:51 -0400 "Christopher H. Laco" <[EMAIL PROTECTED]> wrote: So, given a list of urls, is it possible to dynamically add /somemethod> tags to Apache? I think so, I just don't know where to start. I think this is what you are looking for: http:/

Re: Adding Directives At Runtime

2005-08-16 Thread Frank Wiles
On Tue, 16 Aug 2005 12:07:51 -0400 "Christopher H. Laco" <[EMAIL PROTECTED]> wrote: > So, given a list of urls, is it possible to dynamically add /somemethod> tags to Apache? I think so, I just don't know where to > start. I think this is what you are looking for: http://perl.apache.org/docs

Adding Directives At Runtime

2005-08-16 Thread Christopher H. Laco
Are there any phase or scope limitations when adding directives to apache at runtime? I've never done it, but I'm looking into a hack that would require it. The scenerio. In a Catalyst based app, Catalyst is setup to handle all requests; be they for dynamic urls, or for physical files with sta

Re: apache children waits for each other?

2005-08-16 Thread Jonathan Vanasco
On Aug 16, 2005, at 11:17 AM, Perrin Harkins wrote: Good plan. This would make a nice addition (as a separate module) to the Apache::Session::Memcached distribution. I'll see if I can figure out how to make: Apache::Session::Memcached::WithFailover where it does that behavior, but then allo

Re: Mod_perl Apache to encapsulate legacy protocol

2005-08-16 Thread Stas Bekman
Tom Schindl wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Is this what you are searching for: http://perl.apache.org/docs/2.0/user/handlers/protocols.html There are projects already online which use MP2 to implement their own protocol e.g. SMTP, ... . And sometimes you can extend the H

Re: Mod_perl Apache to encapsulate legacy protocol

2005-08-16 Thread Tom Schindl
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Is this what you are searching for: http://perl.apache.org/docs/2.0/user/handlers/protocols.html There are projects already online which use MP2 to implement their own protocol e.g. SMTP, ... . Tom Chris Werner wrote: > I am in process of porting an

Re: apache children waits for each other?

2005-08-16 Thread Perrin Harkins
Jonathan Vanasco wrote: I do all of my memcached stuff , including sessions, with mysql failover. Good plan. This would make a nice addition (as a separate module) to the Apache::Session::Memcached distribution. - Perrin

Re: apache children waits for each other?

2005-08-16 Thread Jonathan Vanasco
On Aug 16, 2005, at 9:49 AM, Perrin Harkins wrote: If you can use Apache::Session::Memcached, why can't you use Apache::Session::MySQL with a common database login? That will mean one connection per apache process. You can also raise the connection limit on your database server if it isn't dy

Mod_perl Apache to encapsulate legacy protocol

2005-08-16 Thread Chris Werner
Title: Mod_perl Apache to encapsulate legacy protocol I am in process of porting an existing cgi database application over to Mod_perl2 Apache [and learning Mod_perl at the same time]. I have moved all cgi scripts over to registry scripts and am working on moving to handlers. The app is a ser

Re: apache children waits for each other?

2005-08-16 Thread Perrin Harkins
Badai Aqrandista wrote: Yes, I'm aware of that. The problem is that the database structure is a reminiscent of the old version, which creates one database per client. It used to be only 40 clients and one web server. Now we have 300+ clients (=300+ databases) and 2 web servers. I always get 'To

Re: [mp2] "make test" failure in t/api/access2

2005-08-16 Thread Geoffrey Young
Stas Bekman wrote: > Or may be we could just: > > Index: t/response/TestAPI/access2.pm > === > --- t/response/TestAPI/access2.pm (revision 225490) > +++ t/response/TestAPI/access2.pm (working copy) > @@ -98,9 +98,7 @@ >

Re: apache children waits for each other?

2005-08-16 Thread Clinton Gormley
> Yes, I'm aware of that. The problem is that the database structure is a > reminiscent of the old version, which creates one database per client. It > used to be only 40 clients and one web server. Now we have 300+ clients > (=300+ databases) and 2 web servers. I always get 'Too many connectio

Re: apache children waits for each other?

2005-08-16 Thread David Hodgkinson
On 16 Aug 2005, at 06:55, Badai Aqrandista wrote: Badai Aqrandista wrote: My mod_perl web app uses memcached to cache most of the (MySQL) database query results and as the session storage (Apache::Session::Memcached). Would it be a problem for your application if you suddenly lost