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
PlaySlick with Postgres [info] play.api.UnexpectedException: Unexpected exception[SQLTimeoutException: Timeout after 30004ms of waiting for a connection.] #336
Comments
Hi @ngoctranfire, usage questions should be asked on the playframework-user mailing list. The issue tracker is for confirmed issues. The likely reason why you are getting a
That seems like a bug. Is this happening with the latest play-slick 1.1.1? I'm asking because it seems somewhat similar to #324, and the linked issue was fixed in 1.1.1. If you can reproduce the issue with 1.1.1, could you please open a ticket for it. Thanks! Cheers, |
As explained in my comment (first paragraph), I'm closing this ticket because a |
@dotta I don't think this is a usage mistake. I had a small project with play-slick and slick (latest), however I got a timeout on windows and only on windows when using postgres. also after downgrading i had another problem that he couldn't find the correct connection params (other configs worked). however after removing play-slick i used anorm and it worked flawless. |
@schmitch Interesting, and thanks for chiming in. I'd really appreciate if you could investigate further. If you happen to find the time, please have a look at brettwooldridge/HikariCP#104, as it contains a few tips on how to increase debugging. In fact, if the issue is not due to a wrong usage, then it may be something linked to way hikaricp work. One way to check if hikaricp is involved would be to set |
@dotta somehow my error is quite different and as said only on windows i'm running in prod mode (not tested dev mode) Stacktrace with slick.dbs.default.db.connectionPool = "disabled"
Stacktrace without
Also dropping postgres version to 9.3 things getting other errors, I also tried jdbc42, jdbc41 and jdbc4 (never tried jdbc3) Sorry I just figured out that when I use:
Just aweful stacktraces and if the user is not set it will use the default user. maybe thats why it worked on my mac/linux machine since I have a superuser like my user. Just an aweful stacktrace on PostgreSQL 9.4 (not on 9.3) However I think it would be great if we somehow give a warning if the user/password is not set. especially since postgresql-9.4 jdbc driver somehow has a different stacktrace than postgresql-9.3 jdbc driver |
Nice finding! I think it may make sense to have a warning if the user/password is not set, though the right place for doing it is in Slick itself. Before opening a ticket you may want to check on the slick mailing list what they think about it. |
@dotta okai I will raise a thread tomorrow on the slick mailing list. |
Thanks! |
Just wanted to chime in that I had the same issue due to setting the configuration property I was thinking that The way I came across the solution was by seeing this SO post and spotting the difference between the 'correct' settings mentioned there to the settings I was trying to use (I only mention this to point out that the solution frustratingly took me a while to find). I see that the use of the I'm guessing that jbdc changed from using the property |
I keep getting this error. Can you tell me why this happens. It happens specifically when I have this type of configuration
slick.dbs.default.driver="slick.driver.PostgresDriver$"
slick.dbs.default.db.driver="org.postgresql.Driver"
slick.dbs.default.db.dataSourceClass = "slick.jdbc.DatabaseUrlDataSource"
slick.dbs.default.db.url="jdbc:postgresql://localhost:5432/play_blog_sample"
slick.dbs.default.db.connectionTimeout = 30s
slick.dbs.default.db.user="my_user"
slick.dbs.default.db.password="new_password"
If I include:
slick.dbs.default.db.connectionPool = "disabled", it leads to the following error:
SQLException: Required parameter "url" missing in DriverDataSource
Can you help me figure out why this is happening T_T I can include the stack trace if u need it.
The text was updated successfully, but these errors were encountered: