You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Mike Zatko <mz...@boscovs.com> on 2004/01/23 21:42:30 UTC
[DBCP] Hanging
Hello,
I am using DBCP to connect to a MySQL 4.0.14-max-nt database. The
program is a web application. It works fine until the app sits idle for
a period of time. When that happens, my call to the DriverManager for a
getConnection just hangs indefinately. No error or anything. Does anyone
have an idea of how to prevent this?
Thanks,
Mike
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [DBCP] Hanging
Posted by John Zoetebier <jo...@transparent.co.nz>.
On Mon, 26 Jan 2004 10:01:27 -0500, Mike Zatko <mz...@boscovs.com> wrote:
> The following code is called upon the initialization of my Web
> Application:
>
> System.out.println("Loading underlying JDBC driver.");
> try {
> Class.forName("org.gjt.mm.mysql.Driver");
> Class.forName("org.apache.commons.dbcp.PoolingDriver");
> } catch (ClassNotFoundException e) {
> e.printStackTrace();
> }
> System.out.println("Done.");
> System.setProperty("org.xml.sax.driver",
> "org.apache.xerces.parsers.SAXParser");
In a web app you should use a JNDI lookup for the DataSoure.
Furthermore, see copy of related message below:
==>
Frank:
I had a similar problem, first you have to change your resource param =
to use the org.apache.commons.dbcp.BasicDataSourceFactory. If you do not =
use org.apache.commons.dbcp.BasicDataSourceFactory, you will get stuck =
with the default, which did not seem to work well for me. Use this as an =
example, and of course check you code for leaks, and race conditions.
-Jerry
<!-- JNDI Name for the DataSource -->
<Resource name="jdbc/SOMENAME" auth="Container" =
type="javax.sql.DataSource" />
<ResourceParams name="jdbc/SOMENAME">
<parameter>
<name>factory</name>
=
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>=09
=20
<parameter>
<name>username</name>
<value>88888</value>
</parameter>
<parameter>
<name>password</name>
<value>888888</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>com.sybase.jdbc2.jdbc.SybDriver</value>
</parameter>
=20
<parameter>
<name>testOnBorrow</name>
<value>true</value>
</parameter>
=20
<parameter>
<name>testOnReturn</name>
<value>false</value>
</parameter>
=20
=20
<parameter>
<name>validationQuery</name>
<value>SELECT count(*) FROM MYTABLE</value>
</parameter>=09
=20
<parameter>
<name>url</name>
<value>url</value>
</parameter>
=20
<!-- Maximum number of dB connections in pool. Make sure you
configure your DB max connections large enough to handle
all of your db connections. Set to 0 for no limit.
-->
<parameter>
<name>maxActive</name>
<value>40</value>
</parameter>
<!-- Maximum number of idle dB connections to retain in pool.
Set to 0 for no limit.=20
-->
<parameter>
<name>maxIdle</name>
<value>5</value>
</parameter>
=20
<!-- Maximum time to wait for a dB connection to =
become available
in ms, in this example 10 seconds. An Exception is thrown =
if
this timeout is exceeded. Set to -1 to wait =
indefinitely.=20
-->
<parameter>
<name>maxWait</name>
<value>-1</value>
</parameter>
=20
</ResourceParams>
-----Original Message-----
From: Frank Stolze [mailto:frank@directlyhome.com]
Sent: Tuesday, December 02, 2003 11:28 AM
To: commons-user@jakarta.apache.org
Subject: [DBCP] Deadlock problem?
Hi,
I have been having some problems with Tomcat + DBCP for some time now. I
made every effort to find the problem myself and also look through the
mailing list archives, but it seems that I'm at a dead end now. Here is
my problem:
Tomcat 4.1.27
Commons-Pool 1.1
Commons-DBCP 1.1
PostgreSQL 7.3.3
While everything works beautifully for a while, at some (seemingly)
random point in time getting a db connection from the pool fails.
Database connections are available, both idle and not yet established.
Configuration:
<Resource auth="Container" name="jdbc/Public"
scope="Shareable" type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/Public">
<parameter>
<name>password</name>
<value>xxxx</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:postgresql://localhost:5432/bfth_db</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>org.postgresql.Driver</value>
</parameter>
<parameter>
<name>username</name>
<value>xxxx</value>
</parameter>
</ResourceParams>
Here are two representative thread dumps:
===
Full thread dump Java HotSpot(TM) Server VM (1.4.2-b28 mixed mode):
"MonitorRunnable" daemon prio=1 tid=0x08669ad0 nid=0x722c in
Object.wait() [4f7a2000..4f7a28b8]
at java.lang.Object.wait(Native Method)
- waiting on <0x464199f0> (a
org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable)
at
org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable.run(ThreadPool.=
java:503)
- locked <0x464199f0> (a
org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable)
at java.lang.Thread.run(Thread.java:534)
"Thread-10" daemon prio=1 tid=0x0857f988 nid=0x722b runnable
[4f721000..4f7218b8]
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:353)
- locked <0x46419a70> (a java.net.PlainSocketImpl)
at java.net.ServerSocket.implAccept(ServerSocket.java:448)
at java.net.ServerSocket.accept(ServerSocket.java:419)
at org.apache.jk.common.ChannelSocket.accept(ChannelSocket.java:268)
at
org.apache.jk.common.ChannelSocket.acceptConnections(ChannelSocket.java:5=
31)
at org.apache.jk.common.SocketAcceptor.runIt(ChannelSocket.java:660)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.=
java:619)
at java.lang.Thread.run(Thread.java:534)
"Thread-9" daemon prio=1 tid=0x087342c0 nid=0x722a in =
Object.wait()
[4f6a0000..4f6a08b8]
at java.lang.Object.wait(Native Method)
- waiting on <0x46419c68> (a
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
at java.lang.Object.wait(Object.java:429)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.=
java:595)
- locked <0x46419c68> (a
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
at java.lang.Thread.run(Thread.java:534)
"Thread-8" daemon prio=1 tid=0x08734008 nid=0x7229 in =
Object.wait()
[4f61f000..4f61f8b8]
at java.lang.Object.wait(Native Method)
- waiting on <0x46419ce0> (a
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
at java.lang.Object.wait(Object.java:429)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.=
java:595)
- locked <0x46419ce0> (a
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
at java.lang.Thread.run(Thread.java:534)
"Thread-7" daemon prio=1 tid=0x0857ffe0 nid=0x7228 in =
Object.wait()
[4f59e000..4f59e8b8]
at java.lang.Object.wait(Native Method)
- waiting on <0x46419d58> (a
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
at java.lang.Object.wait(Object.java:429)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.=
java:595)
- locked <0x46419d58> (a
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
at java.lang.Thread.run(Thread.java:534)
"MonitorRunnable" daemon prio=1 tid=0x4e4f8818 nid=0x7227 in
Object.wait() [4f51d000..4f51d8b8]
at java.lang.Object.wait(Native Method)
- waiting on <0x466dd8> (a
org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable)
at
org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable.run(ThreadPool.=
java:503)
- locked <0x466dd8> (a
org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable)
at java.lang.Thread.run(Thread.java:534)
"Thread-5" daemon prio=1 tid=0x4e2b60c8 nid=0x7226 in =
Object.wait()
[4f49b000..4f49c8b8]
at java.lang.Object.wait(Native Method)
- waiting on <0x46514830> (a
org.apache.commons.pool.impl.GenericObjectPool)
at java.lang.Object.wait(Object.java:429)
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObject=
Pool.java:793)
- locked <0x46514830> (a
org.apache.commons.pool.impl.GenericObjectPool)
at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource=
.java:140)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.jav=
a:518)
at com.bfth.util.DBBean.getTotalProductCount(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java=
:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI=
mpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.taglibs.standard.lang.jstl.ArraySuffix.evaluate(ArraySuffix.ja=
va:317)
at
org.apache.taglibs.standard.lang.jstl.ComplexValue.evaluate(ComplexValue.=
java:146)
at
org.apache.taglibs.standard.lang.jstl.ELEvaluator.evaluate(ELEvaluator.ja=
va:242)
at
org.apache.taglibs.standard.lang.jstl.ELEvaluator.evaluate(ELEvaluator.ja=
va:201)
at
org.apache.taglibs.standard.lang.jstl.Evaluator.evaluate(Evaluator.java:1=
38)
at
org.apache.taglibs.standard.lang.jstl.Evaluator.evaluate(Evaluator.java:1=
66)
at
org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager.evalu=
ate(ExpressionEvaluatorManager.java:112)
at
org.apache.taglibs.standard.tag.el.core.ExpressionUtil.evalNotNull(Expres=
sionUtil.java:85)
at
org.apache.taglibs.standard.tag.el.core.OutTag.evaluateExpressions(OutTag=
.java:137)
at
org.apache.taglibs.standard.tag.el.core.OutTag.doStartTag(OutTag.java:95)=
at
org.apache.jsp.products_jsp._jspx_meth_c_out_0(products_jsp.java:336)
at org.apache.jsp.products_jsp._jspService(products_jsp.java:147)
at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServletWrapper.service(Unknown Source)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown Source)
at org.apache.jasper.servlet.JspServlet.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown
Source)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown
Source)
at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.in=
vokeNext(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.StandardContextValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.in=
vokeNext(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.StandardContext.invoke(Unknown Source)
at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.in=
vokeNext(Unknown Source)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown
Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.in=
vokeNext(Unknown Source)
at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.in=
vokeNext(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.in=
vokeNext(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.coyote.http11.Http11Processor.process(Http11Processor.java:601=
)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processCo=
nnection(Http11Protocol.java:392)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565=
)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.=
java:619)
at java.lang.Thread.run(Thread.java:534)
"Thread-4" daemon prio=1 tid=0x4e24b3e8 nid=0x7225 runnable
[4f41b000..4f41b8b8]
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:353)
- locked <0x462d5758> (a java.net.PlainSocketImpl)
at java.net.ServerSocket.implAccept(ServerSocket.java:448)
at java.net.ServerSocket.accept(ServerSocket.java:419)
at
org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(Defaul=
tServerSocketFactory.java:107)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.j=
ava:356)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:529=
)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.=
java:619)
at java.lang.Thread.run(Thread.java:534)
"Thread-3" daemon prio=1 tid=0x4e24b288 nid=0x7224 in =
Object.wait()
[4f399000..4f39a8b8]
at java.lang.Object.wait(Native Method)
- waiting on <0x46514830> (a
org.apache.commons.pool.impl.GenericObjectPool)
at java.lang.Object.wait(Object.java:429)
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObject=
Pool.java:793)
- locked <0x46514830> (a
org.apache.commons.pool.impl.GenericObjectPool)
at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource=
.java:140)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.jav=
a:518)
at com.bfth.export.CSVGenerator.prepare(Unknown Source)
at
com.bfth.export.DataFileGeneratorFactory.getDataFileGenerator(Unknown
Source)
at com.bfth.export.DataFileGeneratorServlet.doGet(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown
Source)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown
Source)
at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.in=
vokeNext(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.StandardContextValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.in=
vokeNext(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.StandardContext.invoke(Unknown Source)
at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.in=
vokeNext(Unknown Source)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown
Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.in=
vokeNext(Unknown Source)
at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.in=
vokeNext(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.in=
vokeNext(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.coyote.http11.Http11Processor.process(Http11Processor.java:601=
)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processCo=
nnection(Http11Protocol.java:392)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565=
)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.=
java:619)
at java.lang.Thread.run(Thread.java:534)
"Thread-2" daemon prio=1 tid=0x4e24b068 nid=0x7223 in =
Object.wait()
[4f319000..4f3198b8]
at java.lang.Object.wait(Native Method)
- waiting on <0x466ff0> (a
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
at java.lang.Object.wait(Object.java:429)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.=
java:595)
- locked <0x466ff0> (a
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
at java.lang.Thread.run(Thread.java:534)
"HostConfig[localhost]" daemon prio=1 tid=0x4e24ae18 nid=0x7222 =
waiting
on condition [4f298000..4f2988b8]
at java.lang.Thread.sleep(Native Method)
at org.apache.catalina.startup.HostConfig.threadSleep(Unknown Source)
at org.apache.catalina.startup.HostConfig.run(Unknown Source)
at java.lang.Thread.run(Thread.java:534)
"StandardManager[/manager]" daemon prio=1 tid=0x4e266450 =
nid=0x7221
waiting on condition [4f217000..4f2178b8]
at java.lang.Thread.sleep(Native Method)
at org.apache.catalina.session.StandardManager.threadSleep(Unknown
Source)
at org.apache.catalina.session.StandardManager.run(Unknown Source)
at java.lang.Thread.run(Thread.java:534)
"StandardManager[/prodmgr]" daemon prio=1 tid=0x4e200748 =
nid=0x7220
waiting on condition [4e3ff000..4e3ff8b8]
at java.lang.Thread.sleep(Native Method)
at org.apache.catalina.session.StandardManager.threadSleep(Unknown
Source)
at org.apache.catalina.session.StandardManager.run(Unknown Source)
at java.lang.Thread.run(Thread.java:534)
"WebappLoader[/prodmgr]" daemon prio=1 tid=0x4e276518 nid=0x721f =
waiting
on condition [4f117000..4f1178b8]
at java.lang.Thread.sleep(Native Method)
at org.apache.catalina.loader.WebappLoader.threadSleep(Unknown Source)
at org.apache.catalina.loader.WebappLoader.run(Unknown Source)
at java.lang.Thread.run(Thread.java:534)
"Signal Dispatcher" daemon prio=1 tid=0x080bc0d8 nid=0x7218 =
waiting on
condition [0..0]
"Finalizer" daemon prio=1 tid=0x080b7710 nid=0x7216 in =
Object.wait()
[4107c000..4107c8b8]
at java.lang.Object.wait(Native Method)
- waiting on <0x461e83e8> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:111)
- locked <0x461e83e8> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:127)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
"Reference Handler" daemon prio=1 tid=0x080b7358 nid=0x7215 in
Object.wait() [40ffb000..40ffb8b8]
at java.lang.Object.wait(Native Method)
- waiting on <0x461e8450> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:429)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:115)
- locked <0x461e8450> (a java.lang.ref.Reference$Lock)
"main" prio=1 tid=0x08052500 nid=0x7210 runnable =
[bfffc000..bfffcf78]
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:353)
- locked <0x46419e40> (a java.net.PlainSocketImpl)
at java.net.ServerSocket.implAccept(ServerSocket.java:448)
at java.net.ServerSocket.accept(ServerSocket.java:419)
at org.apache.catalina.core.StandardServer.await(Unknown Source)
at org.apache.catalina.startup.Catalina.start(Unknown Source)
at org.apache.catalina.startup.Catalina.execute(Unknown Source)
at org.apache.catalina.startup.Catalina.process(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java=
:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI=
mpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Unknown Source)
"VM Thread" prio=1 tid=0x080b48e0 nid=0x7214 runnable=20
"VM Periodic Task Thread" prio=1 tid=0x080c0420 nid=0x721c waiting =
on
condition=20
"Suspend Checker Thread" prio=1 tid=0x080bb780 nid=0x7217 runnable =
===
And another one:
====
Full thread dump Java HotSpot(TM) Server VM (1.4.2-b28 mixed mode):
"MonitorRunnable" daemon prio=1 tid=0x0809afc0 nid=0x668c in
Object.wait() [4f418000..4f4188b8]
at java.lang.Object.wait(Native Method)
- waiting on <0x46417918> (a
org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable)
at
org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable.run(ThreadPool.=
java:503)
- locked <0x46417918> (a
org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable)
at java.lang.Thread.run(Thread.java:534)
"Thread-10" daemon prio=1 tid=0x08348538 nid=0x668b runnable
[4f397000..4f3978b8]
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:353)
- locked <0x46417998> (a java.net.PlainSocketImpl)
at java.net.ServerSocket.implAccept(ServerSocket.java:448)
at java.net.ServerSocket.accept(ServerSocket.java:419)
at org.apache.jk.common.ChannelSocket.accept(ChannelSocket.java:268)
at
org.apache.jk.common.ChannelSocket.acceptConnections(ChannelSocket.java:5=
31)
at org.apache.jk.common.SocketAcceptor.runIt(ChannelSocket.java:660)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.=
java:619)
at java.lang.Thread.run(Thread.java:534)
"Thread-9" daemon prio=1 tid=0x083479f0 nid=0x668a in =
Object.wait()
[4f316000..4f3168b8]
at java.lang.Object.wait(Native Method)
- waiting on <0x46417b90> (a
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
at java.lang.Object.wait(Object.java:429)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.=
java:595)
- locked <0x46417b90> (a
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
at java.lang.Thread.run(Thread.java:534)
"Thread-8" daemon prio=1 tid=0x08347008 nid=0x6689 in =
Object.wait()
[4f295000..4f2958b8]
at java.lang.Object.wait(Native Method)
- waiting on <0x46417c08> (a
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
at java.lang.Object.wait(Object.java:429)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.=
java:595)
- locked <0x46417c08> (a
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
at java.lang.Thread.run(Thread.java:534)
"Thread-7" daemon prio=1 tid=0x08348958 nid=0x6688 in =
Object.wait()
[4f214000..4f2148b8]
at java.lang.Object.wait(Native Method)
- waiting on <0x46417c80> (a
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
at java.lang.Object.wait(Object.java:429)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.=
java:595)
- locked <0x46417c80> (a
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
at java.lang.Thread.run(Thread.java:534)
"MonitorRunnable" daemon prio=1 tid=0x08349060 nid=0x6687 in
Object.wait() [4f193000..4f1938b8]
at java.lang.Object.wait(Native Method)
- waiting on <0x465740> (a
org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable)
at
org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable.run(ThreadPool.=
java:503)
- locked <0x465740> (a
org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable)
at java.lang.Thread.run(Thread.java:534)
"Thread-5" daemon prio=1 tid=0x08345cd8 nid=0x6686 runnable
[4f112000..4f1128b8]
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:353)
- locked <0x462d5798> (a java.net.PlainSocketImpl)
at java.net.ServerSocket.implAccept(ServerSocket.java:448)
at java.net.ServerSocket.accept(ServerSocket.java:419)
at
org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(Defaul=
tServerSocketFactory.java:107)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.j=
ava:356)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:529=
)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.=
java:619)
at java.lang.Thread.run(Thread.java:534)
"Thread-4" daemon prio=1 tid=0x085158b8 nid=0x6685 in =
Object.wait()
[4f090000..4f0918b8]
at java.lang.Object.wait(Native Method)
- waiting on <0x4656cad8> (a
org.apache.commons.pool.impl.GenericObjectPool)
at java.lang.Object.wait(Object.java:429)
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObject=
Pool.java:793)
- locked <0x4656cad8> (a
org.apache.commons.pool.impl.GenericObjectPool)
at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource=
.java:140)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.jav=
a:518)
at com.bfth.util.DBBean.getSiteCategories(Unknown Source)
at com.bfth.export.CSVGenerator.generate(Unknown Source)
at com.bfth.export.DataFileGeneratorServlet.doGet(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown
Source)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown
Source)
at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.in=
vokeNext(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.StandardContextValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.in=
vokeNext(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.StandardContext.invoke(Unknown Source)
at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.in=
vokeNext(Unknown Source)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown
Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.in=
vokeNext(Unknown Source)
at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.in=
vokeNext(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.in=
vokeNext(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.coyote.http11.Http11Processor.process(Http11Processor.java:601=
)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processCo=
nnection(Http11Protocol.java:392)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565=
)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.=
java:619)
at java.lang.Thread.run(Thread.java:534)
"Thread-3" daemon prio=1 tid=0x081c63e0 nid=0x6684 in =
Object.wait()
[4f00f000..4f0108b8]
at java.lang.Object.wait(Native Method)
- waiting on <0x4656cad8> (a
org.apache.commons.pool.impl.GenericObjectPool)
at java.lang.Object.wait(Object.java:429)
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObject=
Pool.java:793)
- locked <0x4656cad8> (a
org.apache.commons.pool.impl.GenericObjectPool)
at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource=
.java:140)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.jav=
a:518)
at com.bfth.util.DBBean.getTotalProductCount(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java=
:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI=
mpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.taglibs.standard.lang.jstl.ArraySuffix.evaluate(ArraySuffix.ja=
va:317)
at
org.apache.taglibs.standard.lang.jstl.ComplexValue.evaluate(ComplexValue.=
java:146)
at
org.apache.taglibs.standard.lang.jstl.ELEvaluator.evaluate(ELEvaluator.ja=
va:242)
at
org.apache.taglibs.standard.lang.jstl.ELEvaluator.evaluate(ELEvaluator.ja=
va:201)
at
org.apache.taglibs.standard.lang.jstl.Evaluator.evaluate(Evaluator.java:1=
38)
at
org.apache.taglibs.standard.lang.jstl.Evaluator.evaluate(Evaluator.java:1=
66)
at
org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager.evalu=
ate(ExpressionEvaluatorManager.java:112)
at
org.apache.taglibs.standard.tag.el.core.ExpressionUtil.evalNotNull(Expres=
sionUtil.java:85)
at
org.apache.taglibs.standard.tag.el.core.OutTag.evaluateExpressions(OutTag=
.java:137)
at
org.apache.taglibs.standard.tag.el.core.OutTag.doStartTag(OutTag.java:95)=
at
org.apache.jsp.products_jsp._jspx_meth_c_out_0(products_jsp.java:336)
at org.apache.jsp.products_jsp._jspService(products_jsp.java:147)
at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServletWrapper.service(Unknown Source)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown Source)
at org.apache.jasper.servlet.JspServlet.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown
Source)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown
Source)
at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.in=
vokeNext(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.StandardContextValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.in=
vokeNext(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.StandardContext.invoke(Unknown Source)
at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.in=
vokeNext(Unknown Source)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown
Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.in=
vokeNext(Unknown Source)
at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.in=
vokeNext(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.in=
vokeNext(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.coyote.http11.Http11Processor.process(Http11Processor.java:601=
)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processCo=
nnection(Http11Protocol.java:392)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565=
)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.=
java:619)
at java.lang.Thread.run(Thread.java:534)
"Thread-2" daemon prio=1 tid=0x081c5df8 nid=0x6683 in =
Object.wait()
[4ef8f000..4ef8f8b8]
at java.lang.Object.wait(Native Method)
- waiting on <0x465958> (a
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
at java.lang.Object.wait(Object.java:429)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.=
java:595)
- locked <0x465958> (a
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
at java.lang.Thread.run(Thread.java:534)
"HostConfig[localhost]" daemon prio=1 tid=0x08343658 nid=0x6682 =
waiting
on condition [4ef0e000..4ef0e8b8]
at java.lang.Thread.sleep(Native Method)
at org.apache.catalina.startup.HostConfig.threadSleep(Unknown Source)
at org.apache.catalina.startup.HostConfig.run(Unknown Source)
at java.lang.Thread.run(Thread.java:534)
"StandardManager[/manager]" daemon prio=1 tid=0x083433e0 =
nid=0x6681
waiting on condition [4ee8d000..4ee8d8b8]
at java.lang.Thread.sleep(Native Method)
at org.apache.catalina.session.StandardManager.threadSleep(Unknown
Source)
at org.apache.catalina.session.StandardManager.run(Unknown Source)
at java.lang.Thread.run(Thread.java:534)
"StandardManager[/prodmgr]" daemon prio=1 tid=0x08091f98 =
nid=0x6680
waiting on condition [4ee0c000..4ee0c8b8]
at java.lang.Thread.sleep(Native Method)
at org.apache.catalina.session.StandardManager.threadSleep(Unknown
Source)
at org.apache.catalina.session.StandardManager.run(Unknown Source)
at java.lang.Thread.run(Thread.java:534)
"WebappLoader[/prodmgr]" daemon prio=1 tid=0x4e70ddd0 nid=0x667f =
waiting
on condition [4ed0c000..4ed0c8b8]
at java.lang.Thread.sleep(Native Method)
at org.apache.catalina.loader.WebappLoader.threadSleep(Unknown Source)
at org.apache.catalina.loader.WebappLoader.run(Unknown Source)
at java.lang.Thread.run(Thread.java:534)
"Signal Dispatcher" daemon prio=1 tid=0x080bc0d0 nid=0x664f =
waiting on
condition [0..0]
"Finalizer" daemon prio=1 tid=0x080b7710 nid=0x664d in =
Object.wait()
[4107c000..4107c8b8]
at java.lang.Object.wait(Native Method)
- waiting on <0x461e83e8> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:111)
- locked <0x461e83e8> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:127)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
"Reference Handler" daemon prio=1 tid=0x080b7358 nid=0x664c in
Object.wait() [40ffb000..40ffb8b8]
at java.lang.Object.wait(Native Method)
- waiting on <0x461e8450> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:429)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:115)
- locked <0x461e8450> (a java.lang.ref.Reference$Lock)
"main" prio=1 tid=0x08052500 nid=0x6641 runnable =
[bfffd000..bfffd8d8]
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:353)
- locked <0x46417cb0> (a java.net.PlainSocketImpl)
at java.net.ServerSocket.implAccept(ServerSocket.java:448)
at java.net.ServerSocket.accept(ServerSocket.java:419)
at org.apache.catalina.core.StandardServer.await(Unknown Source)
at org.apache.catalina.startup.Catalina.start(Unknown Source)
at org.apache.catalina.startup.Catalina.execute(Unknown Source)
at org.apache.catalina.startup.Catalina.process(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java=
:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI=
mpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Unknown Source)
"VM Thread" prio=1 tid=0x080b48e0 nid=0x664b runnable=20
"VM Periodic Task Thread" prio=1 tid=0x080c0418 nid=0x6653 waiting =
on
condition=20
"Suspend Checker Thread" prio=1 tid=0x080bb778 nid=0x664e runnable =
===
Any advice would be appreciated!
Frank
==>
--
John Zoetebier
Web site: http://www.transparent.co.nz
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [DBCP] Hanging
Posted by Mike Zatko <mz...@boscovs.com>.
The following code is called upon the initialization of my Web Application:
System.out.println("Loading underlying JDBC driver.");
try {
Class.forName("org.gjt.mm.mysql.Driver");
Class.forName("org.apache.commons.dbcp.PoolingDriver");
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
System.out.println("Done.");
System.setProperty("org.xml.sax.driver",
"org.apache.xerces.parsers.SAXParser");
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [DBCP] Hanging
Posted by Mike Zatko <mz...@boscovs.com>.
The following code is where I acutally use the pool. The line "conn =
DriverManager.getConnection(conUrl);" is where it hangs. To reiterate,
it never returns. No exceptions thrown or stackstrace printouts. I
eventually get a transaction timeout from the server after 120 seconds.
Also, to reiterate once more, it works great as long as it is being
used. I recently had a 1 to 2 day period where the app was probably not
getting any traffic, and when I went back, it was hung. This problem was
also reproduced on both Windows and Linux machines. I havn't been able
to put an exact time that it takes for this to occur. Right now, I have
2 instances of the app running on two different servers, and in about 7
hours of idle time, one is hung and the other is still working. One last
thing, I have multiple Connection pools for different databases. I
editted my code for simplicity, but normally the conUrl String is built
dynamically to invoke the appropriate connection pool.
Connection conn = null;
try {
String conUrl = "jdbc:apache:commons:dbcp:/inventoryDB";
conn = DriverManager.getConnection(conUrl);
.....
}
catch(SQLException sql)
{
log.error(sql.getMessage(), sql);
throw new InventoryMonitorException(sql.getMessage());
}
finally
{
if(conn!=null) {
try {
conn.close();
log.debug("conn closed.");
}
catch (SQLException e)
{
e.printStackTrace();
}
}
Thanks,
Mike Zatko
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [DBCP] Hanging
Posted by Martin van den Bemt <ml...@mvdb.net>.
Most attachments get stripped from the message. I think only txt is
allowed or something...
Mvgr,
Martin
On Mon, 2004-01-26 at 21:32, Mike Zatko wrote:
> John Zoetebier wrote:
>
> > On Mon, 26 Jan 2004 09:21:39 -0500, Mike Zatko <mz...@boscovs.com>
> > wrote:
> >
> >> Dirk Verbeeck wrote:
> >>
> >>> Some questions:
> >>> What is the DBCP configuration you use? DriverManager?
> >>> Are there network connection between you application and the
> >>> database when the getConnection hangs?
> >>> How much idle time?
> >>>
> >>> -- Dirk
> >>>
> >>> Mike Zatko wrote:
> >>>
> >>>> Hello,
> >>>> I am using DBCP to connect to a MySQL 4.0.14-max-nt database.
> >>>> The program is a web application. It works fine until the app sits
> >>>> idle for a period of time. When that happens, my call to the
> >>>> DriverManager for a getConnection just hangs indefinately. No error
> >>>> or anything. Does anyone have an idea of how to prevent this?
> >>>
> >
> > Must be a problem at your side.
> > My messages come throgh each and every time.
> > Check your PC, TCP/IP setting, firewall, proxy server and ISP.
> > Use an other PC on the same network or an other PC outside your network.
> >
> I'm in contact with Henri Yandell about it. It appears to be a problem
> posting XML such as a JOCL script like this:
>
> http://www.apache.org/~bayard/mike.xml
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
--
Mvgr,
Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [DBCP] Hanging
Posted by Mike Zatko <mz...@boscovs.com>.
John Zoetebier wrote:
> On Mon, 26 Jan 2004 09:21:39 -0500, Mike Zatko <mz...@boscovs.com>
> wrote:
>
>> Dirk Verbeeck wrote:
>>
>>> Some questions:
>>> What is the DBCP configuration you use? DriverManager?
>>> Are there network connection between you application and the
>>> database when the getConnection hangs?
>>> How much idle time?
>>>
>>> -- Dirk
>>>
>>> Mike Zatko wrote:
>>>
>>>> Hello,
>>>> I am using DBCP to connect to a MySQL 4.0.14-max-nt database.
>>>> The program is a web application. It works fine until the app sits
>>>> idle for a period of time. When that happens, my call to the
>>>> DriverManager for a getConnection just hangs indefinately. No error
>>>> or anything. Does anyone have an idea of how to prevent this?
>>>
>
> Must be a problem at your side.
> My messages come throgh each and every time.
> Check your PC, TCP/IP setting, firewall, proxy server and ISP.
> Use an other PC on the same network or an other PC outside your network.
>
I'm in contact with Henri Yandell about it. It appears to be a problem
posting XML such as a JOCL script like this:
http://www.apache.org/~bayard/mike.xml
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [DBCP] Hanging
Posted by John Zoetebier <jo...@transparent.co.nz>.
On Mon, 26 Jan 2004 09:21:39 -0500, Mike Zatko <mz...@boscovs.com> wrote:
> Dirk Verbeeck wrote:
>
>> Some questions:
>> What is the DBCP configuration you use? DriverManager?
>> Are there network connection between you application and the database
>> when the getConnection hangs?
>> How much idle time?
>>
>> -- Dirk
>>
>> Mike Zatko wrote:
>>
>>> Hello,
>>> I am using DBCP to connect to a MySQL 4.0.14-max-nt database. The
>>> program is a web application. It works fine until the app sits idle
>>> for a period of time. When that happens, my call to the DriverManager
>>> for a getConnection just hangs indefinately. No error or anything.
>>> Does anyone have an idea of how to prevent this?
Must be a problem at your side.
My messages come throgh each and every time.
Check your PC, TCP/IP setting, firewall, proxy server and ISP.
Use an other PC on the same network or an other PC outside your network.
--
John Zoetebier
Web site: http://www.transparent.co.nz
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [DBCP] Hanging
Posted by Mike Zatko <mz...@boscovs.com>.
Dirk Verbeeck wrote:
> Some questions:
> What is the DBCP configuration you use? DriverManager?
> Are there network connection between you application and the database
> when the getConnection hangs?
> How much idle time?
>
> -- Dirk
>
> Mike Zatko wrote:
>
>> Hello,
>> I am using DBCP to connect to a MySQL 4.0.14-max-nt database. The
>> program is a web application. It works fine until the app sits idle
>> for a period of time. When that happens, my call to the DriverManager
>> for a getConnection just hangs indefinately. No error or anything.
>> Does anyone have an idea of how to prevent this?
>>
>> Thanks,
>> Mike
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>
Does anybody have any idea why I send messages to this list and they
only "go through" like maybe 1 out of 10 times? Is there something
special you have to do to guarantee that a message gets posted?
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [DBCP] Hanging
Posted by Mike Zatko <mz...@boscovs.com>.
Here is my configuration. First, I am using JOCL. I am using a script
that I used the following example as a basis:
http://cvs.apache.org/viewcvs.cgi/*checkout*/jakarta-commons/dbcp/doc/poolingDriverExample.jocl.sample?rev=1.1.1.1
I can't seem to paste the contents of my jocl script into this email,
becuase the email will not be posted. Any ideas why?
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [DBCP] Hanging
Posted by Dirk Verbeeck <di...@pandora.be>.
Some questions:
What is the DBCP configuration you use? DriverManager?
Are there network connection between you application and the database
when the getConnection hangs?
How much idle time?
-- Dirk
Mike Zatko wrote:
> Hello,
> I am using DBCP to connect to a MySQL 4.0.14-max-nt database. The
> program is a web application. It works fine until the app sits idle for
> a period of time. When that happens, my call to the DriverManager for a
> getConnection just hangs indefinately. No error or anything. Does anyone
> have an idea of how to prevent this?
>
> Thanks,
> Mike
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [DBCP] Hanging
Posted by John Zoetebier <jo...@transparent.co.nz>.
On Fri, 23 Jan 2004 15:42:30 -0500, Mike Zatko <mz...@boscovs.com> wrote:
> Hello,
> I am using DBCP to connect to a MySQL 4.0.14-max-nt database. The
> program is a web application. It works fine until the app sits idle for
> a period of time. When that happens, my call to the DriverManager for a
> getConnection just hangs indefinately. No error or anything. Does anyone
> have an idea of how to prevent this?
This is a well know problem with off the shelf solutions.
Search web site of MySQL and mail archives for connection timeout problem.
--
John Zoetebier
Web site: http://www.transparent.co.nz
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org