Hi Vanessa, Please confirm the Virtuoso version you are using (virtuoso-t -?) and version of the JDBC Driver (java virtuoso.jdbc3.Driver).
When you say the Virtuoso server totally stops, is it still running but just not responding to SQL or HTTP request or has the server actually shutdown ? If you can still connect via SQL with the Virtuoso "isql" command line tool can you run the "status('')" command to determine the status of the database and provide this also. A copy of the "virtuoso.log" would also be useful to see to check for any errors that might account for this behaviour. I would also direct you to the Virtuoso performance and tuning guide: http://docs.openlinksw.com/virtuoso/databaseadmsrv.html#ptune Section 6.1.7.5.4. JDBC, which details the new to set the appropriate transaction isolation level , which is read committed to minimise the possibility of locks/deadlocks. Best Regards Hugh Williams Professional Services OpenLink Software Web: http://www.openlinksw.com Support: http://support.openlinksw.com Forums: http://boards.openlinksw.com/support Twitter: http://twitter.com/OpenLink On 18 Feb 2011, at 12:52, Vanessa Lopez wrote: > Hi all! > > I seem to have problems when I have two clients of my program > accessing the same instance of virtuoso (even when the clients are > independent), eventually one fails and virtuoso totally stops running. > > Virtuoso.jdbc3.VirtuosoException: Activity on a closed connection > at virtuoso.jdbc3.VirtuosoConnection.getFuture(Unknown Source) > at virtuoso.jdbc3.VirtuosoFuture.sendCancelFuture(Unknown Source) > at virtuoso.jdbc3.VirtuosoFuture.nextResult(Unknown Source) > at virtuoso.jdbc3.VirtuosoResultSet.process_result(Unknown Source) > at virtuoso.jdbc3.VirtuosoResultSet.next(Unknown Source) > > Or: > virtuoso.jdbc3.VirtuosoException: Connection failed: Connection refused > at virtuoso.jdbc3.VirtuosoConnection.connect(Unknown Source) > at virtuoso.jdbc3.VirtuosoConnection.connect(Unknown Source) > at virtuoso.jdbc3.VirtuosoConnection.<init>(Unknown Source) > at virtuoso.jdbc3.Driver.connect(Unknown Source) > at java.sql.DriverManager.getConnection(DriverManager.java:582) > at java.sql.DriverManager.getConnection(DriverManager.java:207) > > Each client opens and closes its own connection every time it wants to > execute a query, I don't see how they can interfere with each other > ( there are not static variables): > > Connection con = null; > private ResultSet result; > > try{ > Class.forName(DRIVER); > if(this.con != null) > this.con.close(); // to close a previous connection > con = null; > > con = DriverManager.getConnection(PROTOCOL+ > repository.getServerURL() + "/UID=" + repository.getLogin() + "/PWD=" > + repository.getPassword()); > Statement stmt = con.createStatement(); > stmt.setQueryTimeout (query_timeout); > result = stmt.executeQuery("SPARQL " + sparql); > > }catch(Exception e){ > result = null; > System.out.println("Fail to execute: " + sparql); > e.printStackTrace(); > } > > // Do whatever with the results .. the connection will be closed next > time we want to get a connection > > Thanks!! :-) > Vanessa. > > -- > The Open University is incorporated by Royal Charter (RC 000391), an exempt > charity in England & Wales and a charity registered in Scotland (SC 038302). > > > ------------------------------------------------------------------------------ > The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: > Pinpoint memory and threading errors before they happen. > Find and fix more than 250 security defects in the development cycle. > Locate bottlenecks in serial and parallel code that limit performance. > http://p.sf.net/sfu/intel-dev2devfeb > _______________________________________________ > Virtuoso-users mailing list > Virtuoso-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/virtuoso-users