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

Recommend users fork jobs with Async #65

Closed
codygman opened this issue Mar 10, 2021 · 1 comment
Closed

Recommend users fork jobs with Async #65

codygman opened this issue Mar 10, 2021 · 1 comment

Comments

@codygman
Copy link

This might sound kind of silly, but without it ResourceT based connection pools put the connection back too early.

In the real world this translates to:

If you use Persistent and postgresql with odd-jobs with a connection pool you get "libpq: failed another command already in progress" errors.

We had this issue in production and it debugging it led me to:

snoyberg/conduit#425

A more concise example you can play with yourself is at https://gist.github.com/codygman/d38a049092301ade8e8e1bb362cac778#file-main-hs-L23

I also created an issue on Persistent but I'm starting to think Persistent might not be able to fix this if it requires wrapping calls with Async:

yesodweb/persistent#1199

@codygman
Copy link
Author

This was a bit misguided... but I think an action item could be pointing out there may be asynchronous exception issues you should worry about while using odd-jobs.

Also see haskellari/postgresql-simple#69 which I believe affects odd-jobs as well.

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

No branches or pull requests

1 participant