After making that change and doing some testing. So far I’ve not had any issues and the sync are working as expected now.
-Simon
From: Mark Sapiro <mark@msapiro.net> Date: Wednesday, 24 March 2021 at 4:10 am To: "mailman-users@mailman3.org" <mailman-users@mailman3.org> Subject: [MM3-users] Re: [EXTERNAL] Re: Database deadlock when trying to delete a member.
On 3/22/21 9:53 PM, Simon Coggins wrote:
Ok after bit tracking I’ve worked out that the bouncer is dangling transactions when it’s sending warning messages. When https://gitlab.com/mailman/mailman/-/blob/3.3.4/src/mailman/model/bounce.py#L258<https://gitlab.com/mailman/mailman/-/blob/3.3.4/src/mailman/model/bounce.py#L258> is called and it get to update last_warn_sent it does the following in the DB:
2021-03-23 14:42:50.622 AEST [11693] LOG: statement: UPDATE member SET last_warning_sent='2021-03-23T04:42:50.622015'::timestamp, total_warnings_sent=1 WHERE member.id = 169331
But it never COMMITs this transaction. So all write operations are now hung waiting for the transction to be closed as the member record has been modified. As a test I added config.db.commit() after https://gitlab.com/mailman/mailman/-/blob/3.3.4/src/mailman/model/bounce.py#L277<https://gitlab.com/mailman/mailman/-/blob/3.3.4/src/mailman/model/bounce.py#L277> and restarted. And my mailman syncmembers worked perfectly and I didn’t have any hangs it correctly removed everyone it should have. In the database logs I can see the COMMIT.
I’m pretty sure this is not the right spot for a config.db.commit() but hopefully this helps point to what might be going wrong.
Thank you for all the research on this. It is extremely helpful.
Instead of adding a commit after line 277 please try adding the @transactional decorator to the send_warnings_and_remove method at line 210
@transactional @dbconnection def send_warnings_and_remove(self, store):
I think that is the proper fix. Let us know if that works.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/<https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org>