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

Background tasks are DB blocking #200

Closed
ghukill opened this issue Jun 15, 2018 · 0 comments
Closed

Background tasks are DB blocking #200

ghukill opened this issue Jun 15, 2018 · 0 comments
Labels

Comments

@ghukill
Copy link
Contributor

ghukill commented Jun 15, 2018

Tried to mitigate with ordering of actions, but deleting an Organization revealed this really isn't an option (as it loops through child Jobs and deletes).

So much so, even got this error form Record Group page, which attempts to update Job statuses:

(1205, 'Lock wait timeout exceeded; try restarting transaction')

It appears to only be when background tasks save model instances. Reading is just fine, but a single save seems to lock up the connection.

Spark doesn't appear to have this problem, potentially because:

  • it uses jdbc.write, which def. doesn't present a risk
  • where it does save, to JobTrack, is very fast and it's unlikely to cause a problem

There were situations early on, where spark tasks were attempting to use ORM, that it had incomplete or stale data. Believe it was a separate connection than the Django runtime. However, Background Tasks are using the same one.

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

No branches or pull requests

1 participant