You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Tuomas J Rinta <tr...@cs.helsinki.fi> on 2005/09/08 07:59:15 UTC

[users@httpd] Apache 2.0.54 unable to read long POST requests

I'm running Apache 2.0.54 (Server signature: Apache/2.0.54 (Unix) PHP/4.4.0) 
on Linux 2.6.10 (running on a Xen virtual server). Currently I'm facing an 
odd problem where long POST-requests end up creating a "400 Bad request" 
response to the client. I'm running a weblog-service on the server and when 
an user posts a blog-entry, the saving of the request will fail if the post 
is long (I haven't been unable to pinpoint the exact length where it will 
fail). 

The error message that is generated in the error_log is:
[Tue Sep 06 22:01:42 2005] [error] [client <removed>] request failed: error 
reading the headers, referer: http://vuodatus.net/site/control/editblog 

It took me a while to actually even find the error message as the 
weblog-site is running as a virtual host and the request actually goes to 
the default website in the httpd.conf as the Host-header from the request 
disappears. 

The odd thing is that it seems that this isn't happening for everybody, just 
some so I feel like I should point a blaming finger at some ISP's but I am 
currently not sure. Does anybody know if some error or misconfiguration in 
Apache could be causing this? 

Thanks,
Tuomas Rinta

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: Apache 2.0.54 unable to read long POST requests

Posted by Tuomas J Rinta <tr...@cs.helsinki.fi>.
> Nick Kew writes:
>> That suggests the request headers exceeded a hard limit in the server 
>> (and
>> very possibly that it was a malformed request).  The size of the request 
>> is
>> irrelevant UNLESS something is broken, like the headers never being
>> terminated.   Setting your loglevel to debug or sniffing the request on 
>> the wire might tell you more, if perhaps you can identify where it's 
>> coming from to set up a test case.

And to add: most of the users are able to use the website just fine, even 
upload images so my guess is that it isn't the size of the POST request 
that's breaking it. 

More and more I'm considering pointing the finger at the ISP. 

Tuomas Rinta 

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: Apache 2.0.54 unable to read long POST requests

Posted by Tuomas J Rinta <tr...@cs.helsinki.fi>.
Nick Kew writes:
> That suggests the request headers exceeded a hard limit in the server (and
> very possibly that it was a malformed request).  The size of the request is
> irrelevant UNLESS something is broken, like the headers never being
> terminated.   Setting your loglevel to debug or sniffing the request on the 
> wire might tell you more, if perhaps you can identify where it's coming from 
> to set up a test case.

I turned on debugging and this is what I got: 

[Thu Sep 08 13:07:19 2005] [info] (32)Broken pipe: core_output_filter: 
writing data to the network
[Thu Sep 08 13:10:10 2005] [info] (32)Broken pipe: core_output_filter: 
writing data to the network
[Thu Sep 08 13:10:10 2005] [info] (32)Broken pipe: core_output_filter: 
writing data to the network
[Thu Sep 08 13:13:14 2005] [error] [client 80.223.254.148] request failed: 
error reading the headers, referer: 
http://vuodatus.net/site/control/editblog
[Thu Sep 08 13:13:37 2005] [info] (104)Connection reset by peer: 
core_output_filter: writing data to the network
[Thu Sep 08 13:13:37 2005] [info] (32)Broken pipe: core_output_filter: 
writing data to the network
[Thu Sep 08 13:14:47 2005] [info] (104)Connection reset by peer: 
core_output_filter: writing data to the network 


The "error reading headers" is there, but there is no other error message 
that matches the time. The Connection reset by peer and Broken pipe are, at 
least according to Google search results, results of Apache2 + PHP 
combination and seem to be harmless. 

Tuomas Rinta 

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache 2.0.54 unable to read long POST requests

Posted by Nick Kew <ni...@webthing.com>.
On Thursday 08 September 2005 06:59, Tuomas J Rinta wrote:

> The error message that is generated in the error_log is:
> [Tue Sep 06 22:01:42 2005] [error] [client <removed>] request failed: error
> reading the headers, referer: http://vuodatus.net/site/control/editblog

That suggests the request headers exceeded a hard limit in the server (and
very possibly that it was a malformed request).  The size of the request is
irrelevant UNLESS something is broken, like the headers never being
terminated.   Setting your loglevel to debug or sniffing the request on the 
wire might tell you more, if perhaps you can identify where it's coming from 
to set up a test case.

-- 
Nick Kew

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org