java.sql.SQLException: ERROR: canceling query due to user request - Mailing list pgsql-jdbc
From | Kevin Grittner |
---|---|
Subject | java.sql.SQLException: ERROR: canceling query due to user request |
Date | |
Msg-id | s3037941.000@gwmta.wicourts.gov Whole thread Raw |
Responses |
Re: java.sql.SQLException: ERROR: canceling query due to user
|
List | pgsql-jdbc |
The server is 8.0.3 running on Windows. The client is using the 311 build with some patches we need (from the stable branch). There is nothing we know of which would be canceling things on the server side, and nothing we know of which wouldbe doing so on the JDBC client. (In fact, when this happens during invocation of the Connection.commit method, I don'tthink there is a way to cancel it programatically.) A handful of these exceptions may be sprinkled throughout a stream of thousands of queries in the course of a minute. Thereis nothing we've been able to identify which differentiates the failing queries form those which succeed. There isone clue, though -- except for the case where they happen on Connection.commit, they all seem to happen during attemptsto update a row through a ResultSet shortly after an exception (such as a duplicate key) was thrown, resulting inthe rollback of the previous database transaction. (That is, Connection.rollback was invoked after catching the exception.) Connection.autoCommit is set to false. Any suggestions regarding possible causes, possible workarounds, diagnostic steps we should pursue, etc. are welcome. Below are some typical stack traces, from the point where we invoke a JDBC method. The executeUpdate method was invokedfor an UPDATE statement. java.sql.SQLException: ERROR: canceling query due to user request at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1471) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1256) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:175) at org.postgresql.jdbc2.AbstractJdbc2Connection.executeTransactionCommand(AbstractJdbc2Connection.java:625) at org.postgresql.jdbc2.AbstractJdbc2Connection.commit(AbstractJdbc2Connection.java:645) java.sql.SQLException: ERROR: canceling query due to user request at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1471) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1256) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:175) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:389) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:314) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:221) at org.postgresql.jdbc2.AbstractJdbc2DatabaseMetaData.getPrimaryKeys(AbstractJdbc2DatabaseMetaData.java:3130) at org.postgresql.jdbc2.AbstractJdbc2ResultSet.isUpdateable(AbstractJdbc2ResultSet.java:1583) at org.postgresql.jdbc2.AbstractJdbc2ResultSet.checkUpdateable(AbstractJdbc2ResultSet.java:2444) at org.postgresql.jdbc2.AbstractJdbc2ResultSet.updateValue(AbstractJdbc2ResultSet.java:2682) at org.postgresql.jdbc2.AbstractJdbc2ResultSet.updateObject(AbstractJdbc2ResultSet.java:1149) at org.postgresql.jdbc2.AbstractJdbc2ResultSet.updateObject(AbstractJdbc2ResultSet.java:1511) java.sql.SQLException: ERROR: canceling query due to user request at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1471) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1256) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:175) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:389) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:330) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:240) at org.postgresql.core.Field.getColumnName(Field.java:247) at org.postgresql.jdbc2.AbstractJdbc2ResultSet.updateValue(AbstractJdbc2ResultSet.java:2693) at org.postgresql.jdbc2.AbstractJdbc2ResultSet.updateObject(AbstractJdbc2ResultSet.java:1149) at org.postgresql.jdbc2.AbstractJdbc2ResultSet.updateObject(AbstractJdbc2ResultSet.java:1511) java.sql.SQLException: ERROR: canceling query due to user request at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1471) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1256) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:175) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:389) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:330) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:282) java.sql.SQLException: ERROR: canceling query due to user request at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1471) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1256) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:175) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:389) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:330) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:282) at org.postgresql.jdbc2.AbstractJdbc2ResultSet.updateRow(AbstractJdbc2ResultSet.java:1307)
pgsql-jdbc by date: