My django container keeps getting shutdown by oom-killer
Greetings,
Ok, I just updated the docker containers that are running my Mailman 3 installation over the weekend. mailman-core is now 3.3.10, with mailman-ngnix at 1.28.0, mailman-postfix at 3.10.5-r0 and mailman-django-uwsgi at "latest".
I think I have got everything working normally — messages seem to be processed correctly, and I can access the web pages on the web interface. And I have updated various scripts to use --run-as-root until I can get around to reconfiguring mailman-core to use a non-root user.
Anyway, since that time, the EC2 instance that the containers are running on becomes "unreachable", to use AWS's parlance. I can restore functionality by rebooting the instance. According to AWS, this is an application or operating system issue, not their instance. Which means auto-recovery doesn't get activated.
This always happens overnight, usually after midnight, though one time it was around 10:40. I don't see any crontab entries that correlate. And the after midnight issues don't always happen at the same time, so it seemed unlikely that it was a crontab job that was causing it
I finally looked at the host (rather than the logs of each container) and realized that the oom-killer was killing django-admin. As a temporary workaround, I've limited memory on the mailman-django-uwsgi container to 4 GiB (though, since I just did that this morning, I won't know until after midnight (presumably) if it worked or not), and set the RestartPolicy to always.
I'm thinking that this points to a memory leak or some kind?
I did have to add a bunch of packages to my Dockerfile when I rebuilt the container, since the last build was like 5 years ago, so I suppose it could be that django is just using more memory than it used to, though at the moment, I see that it is around 1 GiB:
FROM python:3.12-alpine3.22
RUN apk update && apk add --no-cache --virtual build-deps
cargo gcc libffi-dev musl-dev &&
apk add --no-cache gettext postgresql-dev sassc build-base pcre-dev python3-dev libc-dev linux-headers &&
pip install --upgrade pip setuptools wheel &&
pip --no-cache-dir install django-haystack==3.3.0 hyperkitty==1.3.12
postorius==1.3.13 psycopg2 uwsgi==2.0.25 whoosh &&
apk update && apk del --no-cache build-deps
WORKDIR /opt/mailman/mailman-suite/mailman-suite_project USER mail
EXPOSE 8000
CMD ["uwsgi", "--ini", "uwsgi.ini"]
Any insights, ideas or assistance would be appreciated.
Thanks!
Pat Hirayama Pronouns: he/him/his Systems Engineer IT | Systems Engineering - Infrastructure Fred Hutch Cancer Center O 206.667.4856
phirayam@fredhutch.org<mailto:phirayam@fredhutch.org>
Wed, 12 Nov 2025 21:57:00 +0000 "Hirayama, Pat" <phirayam@fredhutch.org> wrote:
Ok, I just updated the docker containers that are running my Mailman 3 installation over the weekend. mailman-core is now 3.3.10, with mailman-ngnix at 1.28.0, mailman-postfix at 3.10.5-r0 and mailman-django-uwsgi at "latest".
Footer:
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Strange, I run Mailman 2 & joined Mailman 2 list long ago, I didn't join the seperate Mailman 3 list.
https://mail.python.org/mailman3/lists/mailman-users.python.org/ "Mailman-Users mailman-users@python.org Summary Mailman 2.1 mailing list management users"
https://mail.python.org/archives/ "Mailman-Users mailman-users@python.org Mailman 2.1 mailing list management users"
Have lists been merged or remits jumbled ?
Cheers,
Julian Stacey http://berklix.org/jhs/mail/ gmail & yahoo block replies. Arm Ukraine. Contraception V. global warming.
Apologies — Outlook "helpfully" autocompleted the address and my message was sent to the wrong list! Resending to Mailman3.
Pat Hirayama Pronouns: he/him/his Systems Engineer IT | Systems Engineering Fred Hutchinson Cancer Center O 206.667.4856 phirayam@fredhutch.org
From: Julian H. Stacey <jhs@berklix.com> Sent: Wednesday, November 12, 2025 17:03 To: Hirayama, Pat <phirayam@fredhutch.org> Cc: mailman-users@python.org <mailman-users@python.org> Subject: List mixup between Mailman 2 & 3
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Wed, 12 Nov 2025 21:57:00 +0000 "Hirayama, Pat" <phirayam@fredhutch.org> wrote:
Ok, I just updated the docker containers that are running my Mailman 3 installation over the weekend. mailman-core is now 3.3.10, with mailman-ngnix at 1.28.0, mailman-postfix at 3.10.5-r0 and mailman-django-uwsgi at "latest".
Footer:
https://urldefense.com/v3/__https://mail.python.org/mailman3/lists/mailman-u...
Strange, I run Mailman 2 & joined Mailman 2 list long ago, I didn't join the seperate Mailman 3 list.
https://urldefense.com/v3/__https://mail.python.org/mailman3/lists/mailman-u... "Mailman-Users mailman-users@python.org Summary Mailman 2.1 mailing list management users"
https://urldefense.com/v3/__https://mail.python.org/archives/__;!!GuAItXPztq... "Mailman-Users mailman-users@python.org Mailman 2.1 mailing list management users"
Have lists been merged or remits jumbled ?
Cheers,
Julian Stacey https://urldefense.com/v3/__http://berklix.org/jhs/mail/__;!!GuAItXPztq0!jHr... gmail & yahoo block replies. Arm Ukraine. Contraception V. global warming.
On 11/12/25 17:03, Julian H. Stacey wrote:
Strange, I run Mailman 2 & joined Mailman 2 list long ago, I didn't join the seperate Mailman 3 list.
https://mail.python.org/mailman3/lists/mailman-users.python.org/ "Mailman-Users mailman-users@python.org Summary Mailman 2.1 mailing list management users"
https://mail.python.org/archives/ "Mailman-Users mailman-users@python.org Mailman 2.1 mailing list management users"
Have lists been merged or remits jumbled ?
The mailman 2.1 users list, mailman-users@python.org used to be a Mailman 2.1 list. It is still the same list focusing on Mailman 2.1, but it was migrated to Mailman 3 over 5 years ago and has been a Mailman 3 list since May of 2020. Are you only just now noticing?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Wed, 12 Nov 2025 18:44:02 -0800 Mark Sapiro <mark@msapiro.net> wrote:
Mark Sapiro wrote:
On 11/12/25 17:03, Julian H. Stacey wrote:
Strange, I run Mailman 2 & joined Mailman 2 list long ago, I didn't join the seperate Mailman 3 list.
https://mail.python.org/mailman3/lists/mailman-users.python.org/ "Mailman-Users mailman-users@python.org Summary Mailman 2.1 mailing list management users"
https://mail.python.org/archives/ "Mailman-Users mailman-users@python.org Mailman 2.1 mailing list management users"
Have lists been merged or remits jumbled ?
The mailman 2.1 users list, mailman-users@python.org used to be a Mailman 2.1 list. It is still the same list focusing on Mailman 2.1, but it was migrated to Mailman 3 over 5 years ago and has been a Mailman 3 list since May of 2020. Are you only just now noticing?
I remember when Mailman2 list was moved to a Mailman3 server.
I just had wondered how Pat Hirayama had got the wrong '2' instead of '3' list, if a list remit might be misleading,
I thought I spotted a 3 in the text of the list remit description page https://mail.python.org/mailman3/lists/mailman-users.python.org/ but re-reading, I only see a 3 in the correct part of the URL, & eg To contact the list owners, use the following email address: mailman-users-owner@mailman3.org Which is also correct as Mailman2 is called mailman & not mailman2
Some new users who come straight to 3 may not know that. It might be worth adding a note to list remit to avoid some future '3' users posting to this '2' list ? Less work than renaming the list to mailman2-users@.
Cheers,
Julian Stacey http://berklix.org/jhs/mail/ gmail & yahoo block replies. Arm Ukraine. Contraception V. global warming.
On 11/20/25 4:32 PM, Julian H. Stacey wrote:
I remember when Mailman2 list was moved to a Mailman3 server.
I just had wondered how Pat Hirayama had got the wrong '2' instead of '3' list, if a list remit might be misleading,
Pat explained his mixup at https://mail.python.org/archives/list/mailman-users@python.org/message/FPFKQ... It was an MUA autocomplete that filled the wrong domain.
I thought I spotted a 3 in the text of the list remit description page https://mail.python.org/mailman3/lists/mailman-users.python.org/ but re-reading, I only see a 3 in the correct part of the URL, & eg To contact the list owners, use the following email address: mailman-users-owner@mailman3.org
That sentence is at the bottom of the info page for the MM 3 list at https://lists.mailman3.org/mailman3/lists/mailman-users@mailman3.org/
The page at https://mail.python.org/mailman3/lists/mailman-users.python.org/ says To contact the list owners, use the following email address: mailman-users-owner@python.org
Which is also correct as Mailman2 is called mailman & not mailman2
Actually, all versions are referred to generically as Mailman, and when talking about a specific version as Mailman 2.1 or Mailman 3.
Some new users who come straight to 3 may not know that. It might be worth adding a note to list remit to avoid some future '3' users posting to this '2' list ? Less work than renaming the list to mailman2-users@.
When we established the mailman-users@mailman3.org list, we considered whether that name would cause confusion with the existing mailman-users@python.org list and decided that the different domains provided enough distinction.
Note that the beginning of the Summary at the top of https://mail.python.org/mailman3/lists/mailman-users.python.org/ is
Mailman 2.1 mailing list management users
and that at https://lists.mailman3.org/mailman3/lists/mailman-users@mailman3.org/ is
General list for Mailman 3 users and others interested in Mailman 3
Mailman3 mailing list management users
Isn't that clear enough?
We do from time to time see posts to the wrong list, but that's not frequent enough to be a problem. That's usually handled by a response mentioning the other list, possibly with a Reply-To: the other list.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (3)
-
Hirayama, Pat -
Julian H. Stacey -
Mark Sapiro