[opencms-dev] MySQLNonTransientConnectionException - too many connections
flakstad at npolar.no
Mon May 2 10:19:11 CEST 2011
We recently launched our primary website on OpenCms (yay!). It is curretly at ~3000 pageviews a day. Not _that_ much traffic, but every so often (way too often), it "hangs" - often for as long as a minute or more.
This is what happens:
com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: Data source rejected establishment of connection, message from server: "Too many connections"
... 75 more
The exception was not present in the several months of development and beta testing, so it's no doubt the traffic that's causing it. I've never seen this before, but then again, I've been working mostly on smaller sites with much less traffic.
After learning of the setting in MySQL, I have (just now) set max_connections to 2048. No max_connections was present in my.cnf from before, so I'm guessing it was 100 (the default value).
Will this fix things? Should I do anything else, in order to allow many concurrent users / avoid this exception?
More information about the opencms-dev