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

Java 21 and Virtual Threads: Timeout waiting for idle object #3905

Open
qyyxl opened this issue Jul 25, 2024 · 5 comments
Open

Java 21 and Virtual Threads: Timeout waiting for idle object #3905

qyyxl opened this issue Jul 25, 2024 · 5 comments
Labels
dependencies Pull request that updates a dependency

Comments

@qyyxl
Copy link

qyyxl commented Jul 25, 2024

Actual behavior

The following error occurs when I change the application's business thread to a virtual thread and the traffic suddenly increases:

	Caused by: java.util.NoSuchElementException: Timeout waiting for idle object
		at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:461)
		at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:375)
		at redis.clients.util.Pool.getResource(Pool.java:49)
		at credis.java.client.pool.impl.CRedisJedisPool.getResource(CRedisJedisPool.java:103)

Redis / Jedis Configuration

Java version:jdk21

@sazzad16
Copy link
Collaborator

@qyyxl

First of all, please mention relevant versions.

Jedis does not have any official release supporting virtual threads. But it expected from 5.2.0. In the mean time, the support is available in latest 5.2.0-SNAPSHOTs.

@sazzad16
Copy link
Collaborator

Could be related to #3927

@BinaryIgor
Copy link

@sazzad16 is it fixed already in the 5.2.0-SNAPSHOT version? At our company, we want to ditch Redisson in favor of Jedis simplicity and this bug is the only thing preventing us from doing it, because we do use Java 21 with Virtual Threads quite extensively.

@MaciejLipinski
Copy link

I second @BinaryIgor 's question about the fix in the 5.2.0 snapshot – it did not seem to be fixed in our tests with the 5.2.0-beta5 version.

@sazzad16
Copy link
Collaborator

@BinaryIgor @MaciejLipinski We did our part AFAIK. If you find something within Jedis code base, please let us know.

But one of our dependencies, commons-pool, is yet to update.

@sazzad16 sazzad16 added the dependencies Pull request that updates a dependency label Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull request that updates a dependency
Projects
None yet
Development

No branches or pull requests

4 participants