Hi,
I am running a mailman 3.3.9 server (pip installation). It's working fine so far. However, I have problems setting a template. I set a '[list:user:action:subscribe]' template for a list with some simple text like "test1234".
When someone wants to subscribe on the list page without creating an account, it takes five seconds until "HTTPSConnectionPool(host='lists.example.org', port=443): Read timed out. (read timeout=5)" appears on the page. The mail address has been added pending confirmation but no mail gets send.
mailman.log shows just exceptions about the timeout itself:
Sep 09 15:01:45 2024 (2070549) deque: do_confirm_verify Traceback (most recent call last): File "/opt/mailman/venv/lib64/python3.11/site-packages/urllib3/connectionpool.py", line 536, in _make_request response = conn.getresponse() ^^^^^^^^^^^^^^^^^^ ... requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='lists.dkrz.de', port=443): Read timed out. (read timeout=5) [09/Sep/2024:15:01:45 +0200] "POST /3.1/members HTTP/1.1" 400 132 "-" "GNU Mailman REST client v3.3.5"
The access log suggests that getting the template took 5s:
==> /opt/mailman/mm/var/logs/access.log <== 127.0.0.1 - - [09/Sep/2024:13:01:45 +0000] "GET /mailman3/api/templates/list/community.lists.example.org/list:user:action:subscribe HTTP/1.1" 200 8 "-" "python-requests/2.32.3"
Running curl on that url returns immediately $ curl -v 'http://localhost:8000/mailman3/api/templates/list/community.lists.example.or...'
I have captured the network traffic on localhost interface lo and I can see that the request is sent through the tcp connection and acknowledged. Then 5 seconds later the server (port 8000) sends a push data with the response and closes the connection with FIN.
The data exchanged on the connection looks like this:
GET /mailman3/api/templates/list/community.lists.example.org/list:user:action:subscribe HTTP/1.1 Host: lists.example.org User-Agent: python-requests/2.32.3 Accept-Encoding: gzip, deflate Accept: */* X-Forwarded-Proto: https X-Forwarded-For: 2001:638:1234:1224::111 X-Forwarded-Host: lists.example.org X-Forwarded-Server: lists.example.org Connection: Keep-Alive
HTTP/1.1 200 OK Server: gunicorn Date: Mon, 09 Sep 2024 13:01:45 GMT Connection: close Content-Type: text/plain; charset=utf-8 X-Content-Type-Options: nosniff Referrer-Policy: same-origin Cross-Origin-Opener-Policy: same-origin X-Frame-Options: DENY Vary: Accept-Language, Cookie Content-Language: en Content-Length: 8
test1234
The timestamp 13:01:45 is the time of the timeout. The request started five seconds before that. It looks to me as if the connection/keepalive handling is not working properly or the server isn't pushing the response immediately, but it gets buffered until the 5s timeout.
Occassionally, I have capture a requests, where the client side would send a FIN to the server and only then the server would send the http response with the final packets.
Does anyone have an idea how I can fix this?
Thanks,
Gerald