cmu-db / ottertune

The automatic DBMS configuration tool
Other
1.21k stars 310 forks source link

Check celery on each request for result #354

Closed yangdsh closed 4 years ago

yangdsh commented 4 years ago

This is a further attempt to address the celery error which Sebastian still encounters. I think of 4 possible causes for this error:

I fixed the second kind of error in this PR:

Tests: I inserted codes in a few positions in async_task.py to kill Celery. Without the fixes in this PR the task fails. With the fixes here the task succeeds.

However, I am worried that Sebastian's error is more like the third kind, because there are error message as follows: Failed to start 'celery'. Failed to start 'celerybeat'. It means there is no pid file for celery worker and celerybeat. I do not really know what can be a potential cause for that. At least when rabbitmq is not running, celery can still come up and generate the pid files. The only reason I can think of is that the waiting time is shorter than needed. So I increased it from 15 seconds to 60 seconds, and I log the waiting time to see if it is long or not.