-
Notifications
You must be signed in to change notification settings - Fork 9
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
java.lang.IllegalStateException - Channel is closed #17
Comments
Here's the full stacktrace with your code:
|
Thanks, I'll try to reproduce the error. The connection pool needs connection validation support to catch cases like this. |
@alaisi here's my use case: when my |
More info: we have 2 services running but we only have this problem on one of them. After checking out heroku I noticed that the postgres versions are different. On |
Tracked issue: alaisi/postgres-async-driver#7 |
Hey @alaisi , |
Hi, can you test with the the master branch version to see if it fixes the problems you've been having. Configure the connection pool with: (open-db {:hostname ...
:validation-query "select 1" }) |
It's not easy to test this, we get this randomly on production and don't have a always fail test scenario. I did run this on one of our services and got no errors but a test suite that usually takes 6s ended up taking 65s. |
Thanks for the info. I'm looking into the performance issue. Is the test suite using a single db on an atom or is an instance opened/closed for each test or ns? close-db is now blocking until all sockets are closed and IO thread is stopped (usually several seconds) so that could be one possible cause. |
Hum.. on this particular service we do use component and start/stop the system on every test scenario that needs the DB. Any workaround for this? |
You could wrap close-db in (thread) or (thread-call) to get similiar semantics as before, eg. the component is considered closed when the db has started to shut down. |
@alaisi I tried close on another thread and the speed is back to normal. So we'll adjust our tests to a global conn. |
I can't replicate this and don't understand it yet. Sometimes I have the
java.lang.IllegalStateException - Channel is closed
exception when getting results. For example:(It's not only on
query!
, also got this onupdate!
.)Any ideas?
The text was updated successfully, but these errors were encountered: