Bobby
Bobby

Reputation: 1676

Running out of c3p0 pooled connections lead to high CPU?

I'm pretty sure I'm leaking connections over time, leading to the Tomcat process (Windows) locking up.

Symptoms when in a locked-up state:

If the theory is correct and we're leaking connections, and eventually running out of them, could this lead to high CPU usage?

I've noticed the busy threads are actually mostly GC.

Upvotes: 0

Views: 1086

Answers (1)

Steve Waldman
Steve Waldman

Reputation: 14083

It's not obvious why a Connection leak would lead to high CPU usage, unless you have a very large maxPoolSize and there is some overhead to the outstanding Connections.

Regardless, the thing to do is to fix your Connection leak. See e.g. C3P0 Spring Hibernate: Pool maxed out. How to debug?

If there is still a CPU issue once the Connection leak is resolved, well, then you'll have less confusion and noise to deal with tracking down the issue. But the Connection leak may well be the issue, somehow.

Upvotes: 1

Related Questions