Hi, some read http://commons.apache.org/proper/commons-dbcp/configuration.html ;) Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau
2014-02-13 16:21 GMT+01:00 José Luis Cetina <maxtorz...@gmail.com>: > Hi, im having about 180 users at the same time connected to my webapp, > yesterday i got an mysql exception saying "Ton many connections" then i > read in blogs and update the property max_connections in my.cnf to 500 > connections (i have a stand alone server for database only that has 16gb of > ram just for the OS and the DB) then in that post recommend to adjust that > value (max_connections) accord to my pool connection. I use a datasource > resource configured in tomee.xml and i have this > > <Resource id="any" type="DataSource"> > JdbcDriver com.mysql.jdbc.Driver > JdbcUrl ... > UserName xxx > Password xxx > jtaManaged true > initialSize=30 > MaxActive=500 (my old value was 250) > MaxIdle=50 > MaxWait=90000 > MaxWaitTime=90000 > validationQuery=SELECT 1 > testOnBorrow=true > </Resource> > > Then i have this questions: > > 1.What advice can you give me for handle around 180 users that use my app > an hit the database with each action. > I use JSF (@NamedBeans) + EJB (All my EJBS are statless) + 1 SessionBean > (@Named) for each users. > > 2. Which is the difference between MaxIdle and MaxActive? > > 3. Which is the default timeout for close inactive connections and what is > the name of the property? > > > > I will be happy with any kind of advice. > > I use 2 servers with this configuration and tomee and both of them read to > other server where the database is (2 webapp server + 1 db server). > > > > > ------------------------------------------------------------------- > *José Luis Cetina* > -------------------------------------------------------------------