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

[BUG] Druid 连接池ActiveCount大于了poolingCount #6193

Open
lawmansoft opened this issue Oct 23, 2024 · 1 comment
Open

[BUG] Druid 连接池ActiveCount大于了poolingCount #6193

lawmansoft opened this issue Oct 23, 2024 · 1 comment

Comments

@lawmansoft
Copy link

Database Type

MySQL

Database Version

MySQL5.7

Druid Version

1.2.6

JDK Version

OpenJDK 8

Error SQL


Testcase Code

No response

Stacktrace Info

No response

Error Info

No response

@lawmansoft
Copy link
Author

线上系统发生了大量的线程卡顿,通过 MAT 分析内存,查看连接池
maxActive=200 activeCount=40 poolingCount=15
image
image

大量线程卡在等待连接池的lock.lock()
"http-nio-8089-exec-2380" #4614 daemon prio=5 os_prio=0 tid=0x00007fb0e04cc800 nid=0x789e waiting on condition [0x00007fb07b8f4000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x0000000702050fd0> (a java.util.concurrent.locks.ReentrantLock$FairSync)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:870)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1199)
at java.util.concurrent.locks.ReentrantLock$FairSync.lock(ReentrantLock.java:224)
at java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:285)
at com.alibaba.druid.pool.DruidDataSource.getConnectCount(DruidDataSource.java:2325)

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