On 24.10.24 22:09, Mark Sapiro wrote:
On 10/23/24 23:36, vogt@spamcop.net wrote:
The only difference the last times is that with curl, the server side sends the ACK for the request and milliseconds later a PSH,ACK with the response headers. When it comes internally from mailman it sends the ACK for the request and then 5 seconds later it sends the PSH,ACK with the response headers.
I'm unable to explain what's going on. You could try one more thing in an attempt to duplicate this outside of Mailman. Invoke the same python3 that Mailman does - this may be in a venv or the system python3. If in a venv, you don't need to activate the venv, just run venv/bin/python.
Then in response to Python's prompts do
>>> import requests >>> res = requests.get('https://lists.example.org/mailman3/api/ templates/list/community.lists.example.com/list:user:action:subscribe', timeout=5)
and see what that does? I think it should time out because this is exactly what Mailman core is doing tho get the template, and if it does, perhaps you can determine why from this simple example.
I have tried it using the fqdn url as well as the localhost:8000 url but in both cases requests.get immediately returns the response. The server side pushes the response within milliseconds.
But that made me looking another time at the localhost tcpdump: I have noticed two connections to localhost:8000 where gunicorn with mailman_web.wsgi:application is running.
The first one is
POST /mailman3/lists/community.lists.example.com/anonymous_subscribe
the second one is
GET /mailman3/api/templates/list/community.lists.example.com/list:user:action:subscribe
Both take 5 seconds. First the first one responds then shortly after the second one. I have noticed that only two gunicorn processes are running which looked like only one is a worker.
Thus I have added workers=9 (2xncore+1) to /etc/mailman3/gunicorn.conf and restarted mailmanweb.service. Now it's working. So it must have been some kind of deadlock situation because it only had a single worker running.
I have just followed the docs from
https://docs.mailman3.org/en/latest/install/virtualenv.html#setting-up-gunic...
which doesn't mention anything about workers and I seriously don't have a clue about gunicorn. Maybe that could be added to the docs?
Thanks for the help!
Cheers,
Gerald