Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Retry and timeout are misconfigured" warning #436

Closed
danil-smirnov opened this issue Feb 27, 2021 · 2 comments · Fixed by #437
Closed

"Retry and timeout are misconfigured" warning #436

danil-smirnov opened this issue Feb 27, 2021 · 2 comments · Fixed by #437
Labels

Comments

@danil-smirnov
Copy link
Contributor

Hi,

After the latest build of the mailman-web images I've got the following warning:

mailman-web_1            | /usr/lib/python3.8/site-packages/django_q/conf.py:136: UserWarning: Retry and timeout are misconfigured. Set retry larger than timeout,
mailman-web_1            |         failure to do so will cause the tasks to be retriggered before completion.
mailman-web_1            |         See https://django-q.readthedocs.io/en/latest/configure.html#retry for details.
mailman-web_1            |   warn("""Retry and timeout are misconfigured. Set retry larger than timeout,

As we can see in the code
https://github.com/maxking/docker-mailman/blob/master/web/mailman-web/settings.py#L411

there is a timeout of 300 sec defined, while the default retry value is 60 sec.

As per Django docs,

The value must be bigger than the time it takes to complete longest task, i.e. timeout must be less than retry value and all tasks must complete in less time than the selected retry time. If this does not hold, i.e. the retry value is less than timeout or less than it takes to finish a task, Django-Q will start the task again if the used broker supports receipts.

Reporting the issue here not the fix as I'm not sure of the internal mechanics of Hyperkitty workers.

@maxking
Copy link
Owner

maxking commented Feb 27, 2021

Ah, thanks for reporting the isssue @danil-smirnov! I guess the solution would be to make the retry value larger than timeout, there isn’t anything special about the Hyperkitty workers, although, in rare occasions, it is possible to take more than 60s for some tasks in HK (like indexing an entire MailingList after it was imported to HK). Can you propose a PR with a fix?

@danil-smirnov
Copy link
Contributor Author

Done @maxking

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants