vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| >Is this running in a multi-threaded environment? Yes it is. >If so, are there measures in place to ensure that only one thread uses the connection at a time? I'm using a thread pool so normally one thread takes one connection out of the pool and operates on it. From what I see the borrowObject() appears to contains a synchronized block to that 2 threads could not take a same connection at the same time. However, just to be sure, I added synchronization to the methods of the GenericObjectPool (you can see the -locked below). If it ever was a synchronization problem I think that now there is none. >It would also be useful if you could do a thread dump while it's hanging >and send a stack trace of the affected thread. Here it is. This time, the sql statement that blocked is "select true" which I do before returning the connection from the pool to make sure that the connection is ok. None of the other threads where in the org.postgresql package when I did the thread dump. "Thread-11" prio=6 tid=0x25499dd0 nid=0x868 runnable [0x2801f000..0x2801fa64] at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream. java:129) at java.io.BufferedInputStream.fill(BufferedInputStre am.java:218) at java.io.BufferedInputStream.read(BufferedInputStre am.java:235) - locked <0x115fcf88> (a java.io.BufferedInputStream) at org.postgresql.core.PGStream.ReceiveIntegerR(PGStr eam.java:275) at org.postgresql.core.v3.QueryExecutorImpl.processRe sults(QueryExecutorImpl.java:1171) at org.postgresql.core.v3.QueryExecutorImpl.execute(Q ueryExecutorImpl.java:188) - locked <0x115f8210> (a org.postgresql.core.v3.QueryExecutorImpl) at org.postgresql.jdbc2.AbstractJdbc2Statement.execut e(AbstractJdbc2Statement.java:452) at org.postgresql.jdbc2.AbstractJdbc2Statement.execut eWithFlags(AbstractJdbc2Statement.java:340) at org.postgresql.jdbc2.AbstractJdbc2Statement.execut eQuery(AbstractJdbc2Statement.java:239) at services.jdbc.StatementWrapper.executeQuery(Unknow n Source) at services.jdbc.ConnectionWrapper.validateObject(Unk nown Source) at services.pool.GenericObjectPool.testObject(Unknown Source) at services.pool.GenericObjectPool.borrowObject(Unkno wn Source) - locked <0x115875c0> (a services.pool.GenericObjectPool) at services.jdbc.DataSource.getConnection(Unknown Source) at services.jdbc.GlobalJdbc.getConnection(Unknown Source) at common.BuildTreeListingCommon.rebuildListing(Unkno wn Source) at common.BuildTreeListingCommon.rebuildListing(Unkno wn Source) at client.BuildTreeListing.getPage(Unknown Source) at common.WebDispatcher.start(Unknown Source) at java.lang.Thread.run(Thread.java:595) __________________________________________________ _______________ Download din yndlingsmusik på MSN Music: http://www.msn.dk/music - det er nemt og billigt ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org |