openpolis / django-uwsgi-taskmanager

Django application to monitor and manage long and/or recurring tasks through uWSGI.
GNU Affero General Public License v3.0
24 stars 3 forks source link

Respawning uwsgi processes causes multiple task invocations #21

Open guglielmo opened 4 years ago

guglielmo commented 4 years ago

Whenever a uwsgi process dies, in the middle of a spooled task execution, it is respawned.

Since this happens before the task is marked as processed, and removed from the spooler (or re-spooled with a later execution time), the respawned uwsgi process proceeds with reading the file in the spooler once again, untill the crash causes are resolved.

This can potentially cause hundreds of invocations per minutes, flooding the disk with log files.

A mechanism to control the re-spawning should be used.

guglielmo commented 4 years ago

There is maybe a configuration parameter in uwsgi.