You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jose María Zaragoza <de...@gmail.com> on 2013/02/27 14:02:12 UTC

[users@httpd] The timeout specified has expired: proxy: prefetch request body failed

Hello:

I'm using a HTTP server  Apache/2.2.15 (Unix), as frontend and Tomcat
6.0.23 as backend server.
Both of them running on the same machine ( Linux CentOS 6.3)

Apache HTTP listens on 8080 and Tomcat server listens on 8081

Apache HTTP server configuration is setted up like

<VirtualHost *:8080>
    ServerAdmin admin@company.es
    DocumentRoot /var/www/html
    ServerName www.company.es
    ServerAlias company.es
    ProxyPass / http://localhost:8081/
    ProxyPassReverse / http://localhost:8081/
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\"
\"%{User-Agent}i\"" combined
    LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b
\"%{Referer}i\" \"%{User-Agent}i\" proxy:%h" proxy
    SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" client-ip-request

    CustomLog /var/log/httpd/company-access_log combined env=!client-ip-request
    CustomLog /var/log/httpd/company-access_log proxy env=client-ip-request
    ErrorLog /var/log/httpd/company-error_log

</VirtualHost>

And Tomcat's server.xml configuration file has defined
<!-- Define an AJP 1.3 Connector on port 8009 -->
 <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />


>From time to time, I get this error message in Apache HTTP log files

[Thu Feb 14 11:11:26 2013] [error] (70007)The timeout specified has
expired: proxy: prefetch request body failed to [::1]:8081 (localhost)
from xx.xx.xx.xx ()

In the Apache HTTP server's access log , I see that
xx.xx.xx.xx - - [14/Feb/2013:11:10:26 +0100] "POST
/mycompany/doMyAction.dwr HTTP/1.1" 400 307

(Note: Failed URL is not always the same and former failed URLs don't
always fail )

**Look at the time and response error code**:  there is an 400 HTTP
response error code ( Bad request ) after 60 seconds ( when "The
timeout specified has expired: proxy: prefetch request body failed"
error  is thrown )

When this error happens , Tomcat's access logs don't show any access
message, so I guess that the request doesn't arrive to Tomcat server (
remember , at the same machine)


I don't know how I could to debug more . I would like to use tcpdump
but the error occurs randomly and  I don't know what parameters to use
with tcpdump .

Is it a reported bug ? Is there any W/A ?
What could I monitorize/watch ?


Thanks and regards

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache monitoring MPM

Posted by Tom Evans <te...@googlemail.com>.
On Tue, Mar 5, 2013 at 1:37 PM, vicky <vi...@yahoo.co.in> wrote:
> Hi GUys,
>
> can you please suggest that for monitoring the number of threads/server
> processes created via MPM worker do we have any tool  or any status page ..?
>
>
> Thanks
> Vicky

mod_status

http://httpd.apache.org/docs/2.2/mod/mod_status.html

Cheers

Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache monitoring MPM

Posted by vishesh kumar <li...@gmail.com>.
1. 48 concurrent request .More worker get created and can reach upto
MaxClient(httpd.conf) depends on concurrent request,.
2. Server-status can be enabled without any security concern , just ensure
it remain accessible to limited internal IPs

Thanks

On Tue, Mar 5, 2013 at 9:17 PM, vicky <vi...@yahoo.co.in> wrote:

>
> Thanks guys for responding , i am making use of  "*server-status*" it
> looks good :-
> *few queries ,kindly suggest :-*
> **
> *1.  My status page is showing 48 idle workers , does that means these 48
> workers can service individual 48 requests ???*
> **
> *2.   by default status module/tag entry is disabled  in httpd.conf, are
> there any trade offs if i keep this status module enabled in my apache
> instance*
> **
> *Vicky*
>
>    *From:* Peter Phaal <pe...@gmail.com>
> *To:* users@httpd.apache.org
> *Cc:* vicky <vi...@yahoo.co.in>
> *Sent:* Tuesday, 5 March 2013 8:20 PM
> *Subject:* Re: [users@httpd] Apache monitoring MPM
>
> Another alternative to consider is mod_sflow and Ganglia, particularly if
> you want to monitor large Apache clusters:
>
> http://blog.sflow.com/2012/10/thread-pools.html
>
> On Tue, Mar 5, 2013 at 6:31 AM, vishesh kumar <li...@gmail.com>wrote:
>
> Hello Vicky ,
>
> You can use Server-Status handler for this .
>
> <Location /server-status>
> SetHandler Server-Status
> order deny,allow
> allow from 127.0.0.1
> deny from all
> </Location>
>
> In above given setting , you can use http://localhost/server-status from
> localhost
>
> Thanks
> Vishesh kumar
> http://www.linuxmantra.com/
>
> On Tue, Mar 5, 2013 at 7:07 PM, vicky <vi...@yahoo.co.in>wrote:
>
> Hi GUys,
>
> can you please suggest that for monitoring the number of threads/server
> processes created via MPM worker do we have any tool  or any status page
> ..?
>
>
> Thanks
> Vicky
>
>
>
>
> --
> http://linuxmantra.com/
>
>
>
>
>


-- 
http://linuxmantra.com

Re: [users@httpd] Apache monitoring MPM

Posted by vicky <vi...@yahoo.co.in>.
 
Thanks guys for responding , i am making use of  "server-status" it looks good :-
few queries ,kindly suggest :-
 
1.  My status page is showing 48 idle workers , does that means these 48 workers can service individual 48 requests ???
 
2.   by default status module/tag entry is disabled  in httpd.conf, are there any trade offs if i keep this status module enabled in my apache instance
 
Vicky
 

________________________________
 From: Peter Phaal <pe...@gmail.com>
To: users@httpd.apache.org 
Cc: vicky <vi...@yahoo.co.in> 
Sent: Tuesday, 5 March 2013 8:20 PM
Subject: Re: [users@httpd] Apache monitoring MPM
  

Another alternative to consider is mod_sflow and Ganglia, particularly if you want to monitor large Apache clusters:

http://blog.sflow.com/2012/10/thread-pools.html


On Tue, Mar 5, 2013 at 6:31 AM, vishesh kumar <li...@gmail.com> wrote:

Hello Vicky ,
>
>You can use Server-Status handler for this .
>
><Location /server-status>
>SetHandler Server-Status
>order deny,allow
>allow from 127.0.0.1 
>deny from all
></Location>
>
>In above given setting , you can use http://localhost/server-status from localhost 
> 
>Thanks 
>Vishesh kumar
>http://www.linuxmantra.com/
>
>
>On Tue, Mar 5, 2013 at 7:07 PM, vicky <vi...@yahoo.co.in> wrote:
>
>Hi GUys,
>>
>>can you please suggest that for monitoring the number of threads/server processes created via MPM worker do we have any tool  or any status page ..?
>>
>>
>>ThanksVicky
>
>
>-- 
>http://linuxmantra.com/ 

Re: [users@httpd] Apache monitoring MPM

Posted by Peter Phaal <pe...@gmail.com>.
Another alternative to consider is mod_sflow and Ganglia, particularly if
you want to monitor large Apache clusters:

http://blog.sflow.com/2012/10/thread-pools.html

On Tue, Mar 5, 2013 at 6:31 AM, vishesh kumar <li...@gmail.com>wrote:

> Hello Vicky ,
>
> You can use Server-Status handler for this .
>
> <Location /server-status>
> SetHandler Server-Status
> order deny,allow
> allow from 127.0.0.1
> deny from all
> </Location>
>
> In above given setting , you can use http://localhost/server-status from
> localhost
>
> Thanks
> Vishesh kumar
> http://www.linuxmantra.com/
>
> On Tue, Mar 5, 2013 at 7:07 PM, vicky <vi...@yahoo.co.in>wrote:
>
>> Hi GUys,
>>
>> can you please suggest that for monitoring the number of threads/server
>> processes created via MPM worker do we have any tool  or any status page
>> ..?
>>
>>
>> Thanks
>> Vicky
>>
>
>
>
> --
> http://linuxmantra.com

Re: [users@httpd] Apache monitoring MPM

Posted by vishesh kumar <li...@gmail.com>.
Hello Vicky ,

You can use Server-Status handler for this .

<Location /server-status>
SetHandler Server-Status
order deny,allow
allow from 127.0.0.1
deny from all
</Location>

In above given setting , you can use http://localhost/server-status from
localhost

Thanks
Vishesh kumar
http://www.linuxmantra.com/

On Tue, Mar 5, 2013 at 7:07 PM, vicky <vi...@yahoo.co.in> wrote:

> Hi GUys,
>
> can you please suggest that for monitoring the number of threads/server
> processes created via MPM worker do we have any tool  or any status page
> ..?
>
>
> Thanks
> Vicky
>



-- 
http://linuxmantra.com

[users@httpd] Apache monitoring MPM

Posted by vicky <vi...@yahoo.co.in>.
Hi GUys,
 
can you please suggest that for monitoring the number of threads/server processes created via MPM worker do we have any tool  or any status page ..?
 
 
Thanks
Vicky

[users@httpd] Re: The timeout specified has expired: proxy: prefetch request body failed

Posted by Jose María Zaragoza <de...@gmail.com>.
> From time to time, I get this error message in Apache HTTP log files
>
> [Thu Feb 14 11:11:26 2013] [error] (70007)The timeout specified has
> expired: proxy: prefetch request body failed to [::1]:8081 (localhost)
> from xx.xx.xx.xx ()
>


Any ideas about this issue ?
I don't know if there is a patch that fixes this problem , or Apache
Server 2.4 do it ....

We tried this configuration

BrowserMatch ".*MSIE.*" \
 nokeepalive ssl-unclean-shutdown \
 downgrade-1.0 force-response-1.0


but it didn't work.


Thanks and regards

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] The timeout specified has expired: proxy: prefetch request body failed

Posted by Igor Cicimov <ic...@gmail.com>.
On 28/02/2013 12:03 AM, "Jose María Zaragoza" <de...@gmail.com> wrote:
>
> Hello:
>
> I'm using a HTTP server  Apache/2.2.15 (Unix), as frontend and Tomcat
> 6.0.23 as backend server.
> Both of them running on the same machine ( Linux CentOS 6.3)
>
> Apache HTTP listens on 8080 and Tomcat server listens on 8081
>
> Apache HTTP server configuration is setted up like
>
> <VirtualHost *:8080>
>     ServerAdmin admin@company.es
>     DocumentRoot /var/www/html
>     ServerName www.company.es
>     ServerAlias company.es
>     ProxyPass / http://localhost:8081/
>     ProxyPassReverse / http://localhost:8081/
>     LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\"
> \"%{User-Agent}i\"" combined
>     LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b
> \"%{Referer}i\" \"%{User-Agent}i\" proxy:%h" proxy
>     SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" client-ip-request
>
>     CustomLog /var/log/httpd/company-access_log combined
env=!client-ip-request
>     CustomLog /var/log/httpd/company-access_log proxy
env=client-ip-request
>     ErrorLog /var/log/httpd/company-error_log
>
> </VirtualHost>
>
> And Tomcat's server.xml configuration file has defined
> <!-- Define an AJP 1.3 Connector on port 8009 -->
>  <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
>
>
> From time to time, I get this error message in Apache HTTP log files
>
> [Thu Feb 14 11:11:26 2013] [error] (70007)The timeout specified has
> expired: proxy: prefetch request body failed to [::1]:8081 (localhost)
> from xx.xx.xx.xx ()
>
> In the Apache HTTP server's access log , I see that
> xx.xx.xx.xx - - [14/Feb/2013:11:10:26 +0100] "POST
> /mycompany/doMyAction.dwr HTTP/1.1" 400 307
>
> (Note: Failed URL is not always the same and former failed URLs don't
> always fail )
>
> **Look at the time and response error code**:  there is an 400 HTTP
> response error code ( Bad request ) after 60 seconds ( when "The
> timeout specified has expired: proxy: prefetch request body failed"
> error  is thrown )
>
> When this error happens , Tomcat's access logs don't show any access
> message, so I guess that the request doesn't arrive to Tomcat server (
> remember , at the same machine)
>
>
> I don't know how I could to debug more . I would like to use tcpdump
> but the error occurs randomly and  I don't know what parameters to use
> with tcpdump .
>
> Is it a reported bug ? Is there any W/A ?
> What could I monitorize/watch ?
>
>
> Thanks and regards
You are probably running out of worker threads in tomcat. Tune your tomcat
properly so it can handle all the connections coming from apache.