Hello!

Sorry not to have given any signs of life...
Thank you for your answer. Changing the number of connections to 100 solved
the problem of the Server configuration error, but I've gone back to
getting java.sql.SQLException: DBCP could not obtain an idle db connection,
pool exhausted (whole exception follows).
I thought the configuration
        <parameter>
          <name>logAbandoned</name>
          <value>true</value>
        </parameter>
        <parameter>
          <name>removeAbandoned</name>
          <value>true</value>
        </parameter>
would free and log abandoned connections, but it doesn't seem to do it.
Anyway, I have checked over all my result sets, statements and connections
and I think they are all closed properly...

So I'm still a bit stuck here...
Some other person in this list, suggested that there might be some problems
with the DBCP, could it be so?
Any other suggestions?

Any help really appreciated.

Monica

2003-08-20 04:04:57 ApplicationDispatcher[] Servlet.service() for servlet
StructureServlet threw exception
javax.servlet.ServletException: Error initialising boxes
        at com.ah.auk.core.BoxManager.configureBoxes(BoxManager.java:72)
        at com.ah.auk.structure.StructureServlet.doGet
(StructureServlet.java:88)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java)
        at org.apache.catalina.core.ApplicationDispatcher.invoke(Unknown
Source)
        at org.apache.catalina.core.ApplicationDispatcher.doForward(Unknown
Source)
        at org.apache.catalina.core.ApplicationDispatcher.forward(Unknown
Source)
        at org.apache.catalina.valves.ErrorDispatcherValve.custom(Unknown
Source)
        at org.apache.catalina.valves.ErrorDispatcherValve.status(Unknown
Source)
        at org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown
Source)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(Unknown Source)
        at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown
Source)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(Unknown Source)
        at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
        at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
        at org.apache.catalina.core.StandardEngineValve.invoke(Unknown
Source)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(Unknown Source)
        at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
        at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
        at org.apache.coyote.tomcat4.CoyoteAdapter.service
(CoyoteAdapter.java:223)
        at org.apache.jk.server.JkCoyoteHandler.invoke
(JkCoyoteHandler.java:261)
        at org.apache.jk.common.HandlerRequest.invoke
(HandlerRequest.java:360)
        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:604)
        at org.apache.jk.common.ChannelSocket.processConnection
(ChannelSocket.java:562)
        at org.apache.jk.common.SocketConnection.runIt
(ChannelSocket.java:679)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(ThreadPool.java:619)
        at java.lang.Thread.run(Thread.java:534)
----- Root Cause -----
com.ah.auk.core.BoxException: java.sql.SQLException: DBCP could not obtain
an idle db connection, pool exhausted
        at com.ah.auk.box.CountyListBox.configure(CountyListBox.java:80)
        at com.ah.auk.core.BoxManager.configureBoxes(BoxManager.java:41)
        at com.ah.auk.structure.StructureServlet.doGet
(StructureServlet.java:88)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java)
        at org.apache.catalina.core.ApplicationDispatcher.invoke(Unknown
Source)
        at org.apache.catalina.core.ApplicationDispatcher.doForward(Unknown
Source)
        at org.apache.catalina.core.ApplicationDispatcher.forward(Unknown
Source)
        at org.apache.catalina.valves.ErrorDispatcherValve.custom(Unknown
Source)
        at org.apache.catalina.valves.ErrorDispatcherValve.status(Unknown
Source)
        at org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown
Source)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(Unknown Source)
        at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown
Source)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(Unknown Source)
        at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
        at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
        at org.apache.coyote.tomcat4.CoyoteAdapter.service
(CoyoteAdapter.java:223)
        at org.apache.jk.server.JkCoyoteHandler.invoke
(JkCoyoteHandler.java:261)
        at org.apache.jk.common.HandlerRequest.invoke
(HandlerRequest.java:360)
        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:604)
        at org.apache.jk.common.ChannelSocket.processConnection
(ChannelSocket.java:562)
        at org.apache.jk.common.SocketConnection.runIt
(ChannelSocket.java:679)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(ThreadPool.java:619)
        at java.lang.Thread.run(Thread.java:534)
Caused by: java.sql.SQLException: DBCP could not obtain an idle db
connection, pool exhausted
        at org.apache.commons.dbcp.AbandonedObjectPool.borrowObject
(AbandonedObjectPool.java:123)
        at org.apache.commons.dbcp.PoolingDataSource.getConnection
(PoolingDataSource.java:110)
        at org.apache.commons.dbcp.BasicDataSource.getConnection
(BasicDataSource.java:312)
        at com.ah.auk.db.DBUtil.getDBConnection(DBUtil.java:54)
        at com.ah.auk.db.DB.checkDBCon(DB.java:36)
        at com.ah.auk.db.GeoDBReader.getGeoId(GeoDBReader.java:40)
        at com.ah.auk.box.CountyListBox.getCountryId(CountyListBox.java:160)
        at com.ah.auk.box.CountyListBox.configure(CountyListBox.java:57)
        ... 27 more


> -----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]

Reply via email to