Bug 60990 - Default Proxytimeout value is 1 minute and not value of Timeout
Summary: Default Proxytimeout value is 1 minute and not value of Timeout
Status: RESOLVED INVALID
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_proxy (show other bugs)
Version: 2.4.6
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-14 08:12 UTC by eddy.vanoosterbosch
Modified: 2017-08-04 16:37 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description eddy.vanoosterbosch 2017-04-14 08:12:04 UTC
The mod_proxy 2.4 module Proxytimeout parameter has the default value of 60 seconds, and not the value of the apache Timeout parameter.
The mod_proxy 2.2 module does use the Timeout default value though.

I tested this with the latest apache on centos7: httpd-2.4.6-45.el7.centos.4.x86_64

How to reproduce:

-Create file /etc/httpd/conf.d/proxytest.conf:
ProxyPass /test http://localhost:8080/test
ProxyPassReverse /test http://localhost:8080/test

- listen on port 8080
nc -l 8080

- send http message to apache
date; echo "test123" | curl -X POST http://localhost:80/test -d @/dev/stdin; date

-After 1 minute the http socket is aborted.

I could reproduce the problem for proxy pass of http and ajp, so probably it is a general mod_proxy problem.

-Workaround, create /etc/httpd/conf.d/zz_defaults.conf

<IfDefine !Proxytimeout>
  #Set the default mod_proxy request timeout to 10 min. 
  Proxytimeout 600
</IfDefine>
Comment 1 Luca Toscano 2017-05-27 08:56:37 UTC
Hi,

I just tested the last httpd version with Timeout = 5 and your settings, it correctly returns a 504 after 5 seconds and not after 60.

One thing that I didn't get from your repro use case: you don't set neither Timeout nor ProxyTimeout, so I'd expect httpd to behave exactly as you described, namely timeout after 60 seconds (Timeout's directive default).

Maybe I am missing something, do you mind to clarify?

Thanks!
Comment 2 Luca Toscano 2017-08-04 16:37:52 UTC
Closing as invalid for the moment since there seems to be no follow up and I can't repro, please re-open if necessary :)