-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
celery SQLAlchemy errors in celery tasks that use sqlalchemy pools #10530
Comments
Issue-Label Bot is automatically applying the label Links: app homepage, dashboard and code for this bot. |
It seems that celery is not happy to deal with the sqlalchemy pool & that's related to the process forking. The recommendation I found was to have 1 session per worker to avoid issues like this. Here is some read: |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue |
@bkyryliuk If I use
superset will report error:
Is this problem related to this PR #10819 ? |
I have the same issue with thumbnails. Would be nice to know, if this is a bug or if I have a wrong thumbnail configuration. |
@korpa |
@cdmikechen Thank you very much, will test this later |
I'm working on an app-level fix for this based on https://www.yangster.ca/post/not-the-same-pre-fork-worker-model/. This should also resolve #12766 |
#13350 contains a potential fix for this issue. Can you please test and confirm? |
While running multiple
alert.run_query
celery tasks, some tasks fail with asqlalchemy.exc.NoSuchColumnError
error here https://github.com/apache/incubator-superset/blob/ece91928a9339190163c0bc72b96e51217a90d1e/superset/tasks/schedules.py#L544 on the first few iterations of the celery beat schedule after its initialization. These errors eventually stop occurring if the celery worker and the beat schedule are left to run for a few iterations without stopping. Tests have shown that the errors stop occurring on average after around 2 iterations of the beat schedule.Expected results
Alerting celery tasks run without error
Actual results
How to reproduce the bug
Environment
Checklist
Make sure these boxes are checked before submitting your issue - thank you!
The text was updated successfully, but these errors were encountered: