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#... 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#... 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