I believe that your hypothesis is right.I created the attached two versions of a test to reproduce this. One works, one doesn't. The only difference between them is that the working one synchronizes on the shared counter object.The failing test always gets through about 16-18 connects before hanging.All of the hung threads are hanging in the same place, on SocketInputStream.socketRead, which was ultimately called from MapiSocket.connect(). Below is a copy of the stack.I'm running the 11.13.7 release with the 2.8 JDBC driver, server on Ubuntu Linux, client on MacOS. The database to which I'm connecting is configured to accept 64 connections.Cheers,PercyThread [Thread-28] (Suspended)owns: BufferedInputStream (id=78)owns: InputStreamReader (id=79)SocketInputStream.socketRead0(FileDescriptor, byte[], int, int, int) line: not available [native method]SocketInputStream.read(byte[], int, int, int) line: 150SocketInputStream.read(byte[], int, int) line: 121BufferedInputStream.fill() line: 235BufferedInputStream.read1(byte[], int, int) line: 275BufferedInputStream.read(byte[], int, int) line: 334MapiSocket$BlockInputStream._read(byte[], int) line: 846MapiSocket$BlockInputStream.readBlock() line: 895MapiSocket$BlockInputStream.read(byte[], int, int) line: 965StreamDecoder.readBytes() line: 283StreamDecoder.implRead(char[], int, int) line: 325StreamDecoder.read(char[], int, int) line: 177InputStreamReader.read(char[], int, int) line: 184BufferedMCLReader(BufferedReader).fill() line: 154BufferedMCLReader(BufferedReader).readLine(boolean) line: 317BufferedMCLReader(BufferedReader).readLine() line: 382BufferedMCLReader.readLine() line: 119MapiSocket.connect(String, int, String, String, boolean) line: 275MapiSocket.connect(String, int, String, String) line: 248MonetConnection.<init>(Properties) line: 232MonetDriver.connect(String, Properties) line: 171DriverManager.getConnection(String, Properties, ClassLoader) line: 579DriverManager.getConnection(String, String, String) line: 221GetConnectionTest$DoGetConnection.run() line: 37Thread.run() line: 722On Thu, Jan 10, 2013 at 3:33 AM, Fabian Groffen <fabian@monetdb.org> wrote:
Hi Percy,
If would be useful to know what the threads are hanging on when you feel
On 09-01-2013 15:04:17 -0600, Percy Wegmann wrote:
> Dear Monet Team,
>
> I've been using the JDBC driver and have recently noticed that under load,
> calls to DriverManager.getConnection() will sometimes appear to hang.
>
> I was able to resolve this problem by serializing access to getConnection()
> using a synchronized block. I haven't had a chance to dig through the JDBC
> driver code to see what would account for this, but I figured I'd make you
> aware just in case someone else runs into this.
they are stuck. I suspect that the server doesn't like you bombarding
it in parallel. The code you reference is all pretty object oriented,
and not using any shared resources.
--
Fabian Groffen fabian@monetdb.org
column-store pioneer http://www.monetdb.org/Home
_______________________________________________
users-list mailing list
users-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/users-list