Bogdanp/django_dramatiq

InterfaceError: connection already closed

开放

#106 创建于 2021年6月7日

 (18 条评论) (0 个反应) (0 位负责人)Python (86 个派生)github user discovery
help wanted

仓库指标

星标
 (384 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

I'm pushing 500+ tasks per minute through Dramatiq as part of a Django app and occasionally (once every 1-2 days) I suddenly get hundreds instances of this error from the workers and the only way to fix it is to restart the worker process.

Sentry reports that it's triggered in both before_process_message() and after_process_message() when they both call Task.tasks.create_or_update_from_message().

I have CONN_MAX_AGE set to 0 and database connections are pooled via PgBouncer.

Please let me know if I'm missing any other information.

贡献者指南