Apache2::Request fouls up content length?

2007-01-18 Thread craig

I'm still hoping for a good answer on my previous build problem.
But for now I'm proceeding with testing using the mod_perl that
my hosting provider set up.

The first script that I've tested that uses Apache2::Request gives
a problem.  The browser sits and waits for its timeout period,
then the complete expected response is available.  My limited
experience suggests this is probably because the response's
content-length value is fouled up (or the header isn't sent?).

My server signature is
Apache/2.2.3 (Unix) mod_ssl/2.2.3 OpenSSL/0.9.7e-p1  
mod_apreq2-20051231/2.5.7 mod_perl/2.0.2 Perl/v5.8.7 Server at  
mackenna1.securesites.net


OS is FreeBSD 6.  The problem happens under both http: and https:.

mod_deflate and mod_include are also active for the transaction.

Anyone can see the problem at
http://mackenna1.securesites.net/contact.html

which is the site's contact form.  If you just hit send without  
entering

anything, you'll get a response that says you didn't enter anything,
but it will take a long time.

Apache2::Request had bigger problems until I included the following
line in httpd.conf:
LoadModule apreq_module modules/mod_apreq2.so

That .so was also provided by my hosting provider (Verio).

Does this sound familiar?  Could it be avoided by newer versions of
any of the software?

Craig MacKenna
Los Gatos, CA



Re: Apache2::Request fouls up content length?

2007-01-18 Thread Jonathan Vanasco


it sounds to me like a keepalive problem

try
KeepAlive Off

if you really want it on, try
MaxKeepAliveRequests 10
KeepAliveTimeout 3

but you may not be able to specify either, as its an apache config  
option.




// Jonathan Vanasco

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

| 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
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - -





Re: Apache2::Request fouls up content length?

2007-01-18 Thread Jonathan Vanasco


On Jan 18, 2007, at 8:14 PM, [EMAIL PROTECTED] wrote:


You are correct.  Turning off keepalive fixes the problem.
(We're on a VPS so we have control of httpd.conf.)

My residual problem is that neither KeepAlive nor
MaxKeepAliveRequests is allowed in a Location block, so
I can't just do one of them for the scripts that use Apache2::Request.

Anyone have a way to keep KeepAlive and Apache2::Request?
Might newer versions of any of the software involved fix the problem?

Thanks much,
Craig MacKenna
www.animalhead.com


personally, I would suggest this:

forget about keepalive in modperl

	don't run mod_perl on port 80.  run a proxy on it -- either apache  
or something lightweight like nginx
	run your app on port  80xx using its own apache.  have keepalive  
turned off.

keepalive can be turn on in your port 80 dae,pm
serve static off the proxy, only hit up mp for dynamic content.

its not as fast as if you had keepalive on the proxied connection,  
but its still considerably faster than not-proxying , and you don't  
deal with any of the issues of a slow-client tying up your modperl  
process


there's a section in the modperl book explaining the multi-server /  
multi-apache setup in depth.  its online, via google



// Jonathan Vanasco

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

| 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
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - -





Re: Apache2::Request fouls up content length?

2007-01-18 Thread craig

Jonathan, thank you for your replies!

The client I'm testing with is, in most contexts, not slow.  It's a
dual-processor 1.25 MHz PowerMac on a DSL line, with the Safari
browser which does most things faster than any other PC or Mac
browser I've used.

Thought I had a solution: since my two pages containing forms
are both under SSL, I put KeepAlive On in the virtual host for 80,
and KeepAlive Off in the virtual host for 443.

Unfortunately this did not fix the problem, from an SSL page.

Apache::Request worked with KeepAlive under Apache 1 and
mod_perl 1.  So I feel like things have gone backward...

My front page downloads a series of 80+ small jpg's, and the impact
of a general KeepAlive Off on that operation is unacceptable.

The complexity of a multi-server / multi-apache setup is more than
I want to deal with.

I much prefer KeepAlive on a single Apache to using Apache2::Request
on a multi-server solution.  It's easy enough to get the form data and
parse it myself.

1. Do you think the problem is in mod_perl or apreq2?
2. Does that module have a bug reporting system (other than this
mailing list) ?
3. Is there a known bug for Apache2::Request vs. KeepAlive?
4. If not, where can I post one, so this can be fixed for other people?

Thanks for your help,
Craig MacKenna
www.animalhead.com


On Jan 18, 2007, at 5:26 PM, Jonathan Vanasco wrote:



On Jan 18, 2007, at 8:14 PM, [EMAIL PROTECTED] wrote:


You are correct.  Turning off keepalive fixes the problem.
(We're on a VPS so we have control of httpd.conf.)

My residual problem is that neither KeepAlive nor
MaxKeepAliveRequests is allowed in a Location block, so
I can't just do one of them for the scripts that use  
Apache2::Request.


Anyone have a way to keep KeepAlive and Apache2::Request?
Might newer versions of any of the software involved fix the problem?

Thanks much,
Craig MacKenna
www.animalhead.com


personally, I would suggest this:

forget about keepalive in modperl

	don't run mod_perl on port 80.  run a proxy on it -- either apache  
or something lightweight like nginx
	run your app on port  80xx using its own apache.  have keepalive  
turned off.

keepalive can be turn on in your port 80 dae,pm
serve static off the proxy, only hit up mp for dynamic content.

its not as fast as if you had keepalive on the proxied connection,  
but its still considerably faster than not-proxying , and you don't  
deal with any of the issues of a slow-client tying up your modperl  
process


there's a section in the modperl book explaining the multi-server /  
multi-apache setup in depth.  its online, via google



// Jonathan Vanasco

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

| 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
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - -