-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Monica Ferrero wrote:
> Hi! > > I'm not sure if this is the most adequate mySQL list for this post. If not, > please indicat me which one I should use... > > I'm using Tomcat 4.1.24 with Apache 2 and MySQL 4.0.13. I have the mysql- > connector-java-2.0.14-bin.jar in commons/lib. > The application runs normally, and usually about once or twice a day I get > this exception org.apache.commons.dbcp.DbcpException: > java.sql.SQLException: Server configuration denies access to data source. > Once the exception occurs, it happens for every request and Tomcat needs > restarting. > > Before getting this exception, I used to run out of connections, and > therefore I added to the server.xml > > <parameter> > <name>logAbandoned</name> > <value>true</value> > </parameter> > <parameter> > <name>removeAbandoned</name> > <value>true</value> > </parameter> > > I guess it could be related... > > I include the exception and my server.xml file. > > Any help appreciated. > > > Monica [snip] > <ResourceParams name="jdbc/allukmasterDB"> > <parameter> > <name>factory</name> > <value>org.apache.commons.dbcp.BasicDataSourceFactory</value> > </parameter> > <parameter> > <name>maxActive</name> > <value>500</value> > </parameter> > <parameter> > <name>maxIdle</name> > <value>30</value> > </parameter> [snip] Hi! Any reason you need to support _500_ active connections? MySQL will not let you do this out of the box (the limit is set to 100 'max_connections'), you'll need to re-configure MySQL to support more, see: http://www.mysql.com/doc/en/Too_many_connections.html If you cross the default limit, you'll get the 'access denied' exception you are getting. One of the main concepts behind connection pooling is to put a cap on resource usage, 500 connections is awfully high for a properly designed application...You should be able to get by with 25 or less in a well-constructed Java app. You might find my 'connection pooling with Connector/J' article helpful, see: http://www.mysql.com/articles/connection_pooling_with_connectorj.html Regards, Mark - -- Mr. Mark Matthews MySQL AB, Software Development Manager, J2EE and Windows Platforms Office: +1 708 557 2388 www.mysql.com Are you MySQL Certified? http://www.mysql.com/certification/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQE/N8TJtvXNTca6JD8RAg0kAKC6R1MgttLGvo7gHfqUbD6Kyh4WRwCgjlwY P3dPqZbPkZ0ku98fN7pfpWk= =T3xw -----END PGP SIGNATURE----- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]