On 5/3/21 1:45 PM, summersan@nclack.k12.or.us wrote:
Hello,
I've been setting up a new Mailman 3 installation earlier this year, and I think things have been going okay so far.
I've noticed, however, that after a long amount of time passes (for example, a weekend), when I try to visit the local Mailman 3 web application (e.g., example.mailman.site/mailman3/lists/, where it says "Postorius" at the top left corner of the page and shows a list of mailing lists in the body of the page), I sometimes get a 502 Bad Gateway type of error (referenced from my notes). As far as I can tell, this looks like a normal web server (nginx?) error. If I try visiting the Mailman 3 server location again in a web browser shortly thereafter, I still might get a 502 Bad Gateway error. If I wait a while longer (maybe a minute or more?), the Mailman 3 web application appears to load as expected.
What is your configuration for accessing Mailman. I gather you are proxying from nginx to something. Is that something gunicorn or uwsgi? You mention gunicorn but this can be confusing as mailman core's REST API uses gunicorn, but that is separate from the web server's wsgi interface to Django.
In any case, this issue is probably with whatever nginx is proxying to (gunicorn or uwsgi) and not with Django or Mailman core.
I've tried looking at the gunicorn documentation (https://docs.gunicorn.org/en/stable/index.html) and searching online (including in this Mailman3 mailing list) to see if there's something that can be done to fix this issue. The closest thing I can find for now is advice for something that, while possibly being technologically unrelated, includes the idea of "warmup requests", which makes me think of simply setting up some sort of script to periodically load a page on the Mailman 3 web application in order to keep it more available for visitors (https://stackoverflow.com/a/57056170).
That's certainly a possibility and may be a solution. It would be simple enough to set up an hourly cron to do a curl or wget to retrieve example.mailman.site/mailman3/lists/ and see if that helps.
Is there a setting or something in any of the Mailman 3 related programs that could help with keeping the Mailman 3 web application up and running more often without having to resort to making an ongoing, automated request to the Mailman 3 web application?
Nothing that I'm aware of, but if so, it would most likely be a gunicorn or uwsgi setting rather than something in Mailman or Django, although it could be that gunicorn or uwsgi is timing out in trying to connect to Django in which case it could be a Django issue, but not one I've heard of.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan