OpenSQLConnection too many times causes complete hang.
- To: mathgroup at smc.vnet.net
- Subject: [mg96271] OpenSQLConnection too many times causes complete hang.
- From: Scott Morrison <scott.morrison at gmail.com>
- Date: Tue, 10 Feb 2009 05:55:11 -0500 (EST)
Running Mathematica 6 or Mathematica 7 on OSX 10.5, I have the following reproducible
problem that causes Mathematica to completely hang (ie, to close
either the frontend or kernel, I need to use Activity Monitor or the
terminal).
Needs["DatabaseLink`"]; Needs["JLink`"];
x := OpenSQLConnection[JDBC["mysql", url],
"Username" -> username, "Password" -> password,
"UseConnectionPool" -> True]
Do[Print[k, " ", x], {k, 1, 20}]
(You'll need an SQL server to connect to, and set url, username and
password appropriately.) At least on my machine, it manages the first
8 connections, and then totally hangs.
Of course, I don't really need to open this many connections; it was a
mistake in my code, but one that took a day to track down. Still, it's
a bug!
thanks,
Scott Morrison