I have an application in Grails. I use Hibernate to access the database (per standard grails rules) I use MySql and the site works and is stable (for 6 months).
I am doing load testing, and recently discovered that the database rejects connections when under load.
Using MySQL Server 5, I can see threads connected hovering around 20. Thought i jumps between 11 - 30.
mysql> show status like '%con%';
+--------------------------+-------+
| Variable_name | Value |
+--------------------------+-------+
| Aborted_connects | 72 |
| Connections | 65539 |
| Max_used_connections | 101 |
| Ssl_client_connects | 0 |
| Ssl_connect_renegotiates | 0 |
| Ssl_finished_connects | 0 |
| Threads_connected | 1 |
+--------------------------+-------+
7 rows in set (0.00 sec)
My database configuration is standard. (The MySql server is installed locally, not shown)
dataSource {
pooled = false
driverClassName = "com.mysql.jdbc.Driver"
username = "username"
password = "secret"
maxIdle = 15
maxActive = 100
}
Should I investigate C3P0? Or should I ratched up my maxActive to 1000 and hope for the best?