-
Notifications
You must be signed in to change notification settings - Fork 169
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
Getting "Could not open JPA EntityManager" because of "Connection is not available, request timed out after 30000ms" with HikariCP Datasource in Spring #2219
Comments
FYI: I just tried EclipseLink 4.0.3 and this version works also great for me, so the bug must have been introduced in 4.0.4 |
I'm having a similar issue around locking after the upgrade from 4.0.3 to 4.0.4. Unfortunately, I went with DBCP's default no-timeout behaviour, causing my entire fleet of servers to deadlock every few minutes to hours. My guess is that it is caused by #2181 -- this pull request replaces the synchronized methods The issue seems to be that the new I seriously wonder as to why this is triggered now, the locking schema looks exactly the same. I guess we got lucky before because of some minor semantic difference between Starved thread:
Multiple threads trying to return the connection objects (just an example here):
|
eclipse-ee4j/eclipselink#2219 Signed-off-by: Marinov Avgustin <[email protected]>
eclipse-ee4j/eclipselink#2219 Signed-off-by: Marinov Avgustin <[email protected]>
eclipse-ee4j/eclipselink#2219 Signed-off-by: Marinov Avgustin <[email protected]>
Maybe try latest snapshot from https://jakarta.oss.sonatype.org/content/groups/staging/org/eclipse/persistence/eclipselink/4.0.5-SNAPSHOT/ . |
@fwiesweg: I'm encountering the exact same deadlocks during load tests. Replacing Downgrading to 4.0.3 for now. |
@rfelcman This issue seems to be introduced with #2181 Now the following seems to happen: Stacktraces:
Thread 2
|
Could You please provide complete stack trace, or at least into |
@rfelcman I have updated my original comment with the extended stacktrace: |
…of "Connection is not available, request timed out after 30000ms" with HikariCP Datasource in Spring eclipse-ee4j#2219 Signed-off-by: Radek Felcman <[email protected]>
Hello, in the attachment You can find initial test project which is passing now (simple test with one thread). |
Describe the bug
Recently I updated to EclipseLink 4.0.4 since then I get this error while booting my Spring Boot 3.3.2 app:
I have no idea where this could come from, I just know as soon as I downgrade to EclipseLink 4.0.2 (didn't test with 4.0.3 as I can only reproduce this error on my production environment, it's not happening on my local machine nor on our testing environment).
It seems the EntityManager cannot get a database connection before a timeout kicks in. My HikariCP database connection pool has no special configurations except that I set the MaximumPoolSize to 30, everything else (besides the DB connection settings) are default values.
As mentioned before, it works on my local machine and in our testing environment, the only difference I can think of is the load on the service. As soon as the service starts up in production, it will be called by around 2k IoT devices which is not the case on my local machine and on testing, everything else is pretty much the same. I did not change anything but the EclipseLink version from 4.0.4 to 4.0.2 and the error was gone and everything worked perfectly well again.
To Reproduce
Steps/resources to reproduce the behavior:
I have no idea how this could be reproduced, I just thought you should know about the issue, I'll might be able to come up with a test application.
Cheers,
Fabian
The text was updated successfully, but these errors were encountered: