Bug 62891 - apache doesn't close connection despite proxy worker ttl is lower than backend keep-alive
Summary: apache doesn't close connection despite proxy worker ttl is lower than backen...
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_proxy (show other bugs)
Version: 2.4.25
Hardware: Other Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-07 13:19 UTC by Tabby
Modified: 2018-11-07 14:37 UTC (History)
0 users



Attachments
wireshark capture (75.71 KB, image/png)
2018-11-07 13:19 UTC, Tabby
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tabby 2018-11-07 13:19:21 UTC
Created attachment 36250 [details]
wireshark capture

Scenario: 

-Apache 2.4.25 on Linux box as reverse proxy.
-ProxyPass /someurl  http://backend/someurl  smax=0 ttl=15
-Backend Keep-Alive timeout is 30".

In the attached wireshark capture, you can see backend closing after 35".
This socket stays in half-close status (CLOSE_WAIT) for the next 43".

Can someone please clarify to me whis this is happening?
Why apache is not closing its side when ttl expires?

Please note that apache is sending "Connection: keep-alive" request header, while backend is NOT sending the "Connection" response header, so I assume this is intended as "will keep it open as you requested".

Thanks.
Tabby.
Comment 1 Eric Covener 2018-11-07 14:37:32 UTC
The TTL is only checked when pulling a pooled connection out of the 
queue later. There is an issue discussed elsewhere I vaguely recall
about how the API we use here is not aggressive about getting old TTL's
out of the list when we can get any non-expired resource.

Maybe Yann recalls status quo better?