2

i have web app running on GF 3.1.1 using MYSQL connection pool. When i check connections to DB using : "show processlist;" i can see everytime that only one connection is used. Why is this happening? There are a lot of threads that do something with DB. Please can someone answer my question? Thank you very much.

1 Answer 1

0

You're connection pool is a pool of available connections. You might have 32 connections available but that doesn't mean it will connect them all. It will manage the connections for you. As demand increases the number of open connections will increase till your max is reached. Likewise as demand decreases your open connections will decrease down to your minimum.

Assuming your queries are fast GF is probably deciding that 1 connection is all that's needed.

Having said all that, the default min connection is 8 so log into your Admin console and look at your connection pool settings. The number of open connections should be at least what the min is set too.

Connection Pool Settings

Sleeping connections in the db

1
  • problem is that when i check number of used connections via GF admin console it shows that i use let say 58 (MAX is 60) but when i check it via putty (show FULL PROCESSLIST;) it shows that i use only one connection.( i49.tinypic.com/35k0c2p.png ) What can be wrong??? and i believe that i use really only one connection coz sometimes i get " java.sql.SQLException: Error in allocating a connection. Cause: In-use connections equal max-pool-size and expired max-wait-time". Nov 11, 2012 at 4:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.