Skip to main content
18-Opal
March 3, 2025
Solved

ERROR: canceling statement due to user request

  • March 3, 2025
  • 2 replies
  • 988 views

Hi,

 

I have recently upgraded from Thingworx 9.1 to 9.7. The DB also got upgraded.

 

I did a dump of the DB and restored it to my local environment, and the instance is working fine. But when I do a restore, it does not work fine in the QA Environment.

pshashipreetham_0-1740988183360.png

Below is the Error I get in the logs:

2025-02-28 11:04:13.242+0000 [L: ERROR] [O: E.c.q.l.c.Logger] [I: ] [U: Bindhu] [S: ] [P: ] [T: http-nio-8080-exec-9] Unable to Invoke Service QueryNamedPropertyHistory on Postman_Thing : com.thingworx.common.exceptions.DataAccessException: [1,018] Data store unknown error: [Error occurred while accessing the data provider.] org.postgresql.util.PSQLException: ERROR: canceling statement due to user request
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2676)
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2366)
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:356)
	at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:496)
	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:413)
	at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:190)
	at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:134)
	at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:431)
	at com.thingworx.persistence.common.SQLStatementUtilities.executeQuery(SQLStatementUtilities.java:107)
	at com.thingworx.persistence.postgres.dao.BasePostgresDao.executeQuery(BasePostgresDao.java:137)
	... 78 common frames omitted
Wrapped by: com.thingworx.common.exceptions.DataAccessException: [1,018] Data store unknown error: [Error occurred while accessing the data provider.]
	at com.thingworx.persistence.postgres.PostgresDataExceptionTranslator.rethrowTranslated(PostgresDataExceptionTranslator.java:48)
	at com.thingworx.persistence.postgres.dao.BasePostgresDao.executeQuery(BasePostgresDao.java:139)
	at com.thingworx.persistence.postgres.dao.PostgresValueStreamDao.getMultiPropertyIterator(PostgresValueStreamDao.java:351)
	at com.thingworx.persistence.postgres.dao.PostgresValueStreamDao.getMultiPropertyEntries(PostgresValueStreamDao.java:308)
	at com.thingworx.persistence.postgres.dataprovider.PostgresValueStreamDataProvider.getMultiPropertyStreamEntries(PostgresValueStreamDataProvider.java:560)
	at com.thingworx.persistence.postgres.dataprovider.PostgresValueStreamDataProvider.processMultipropertyNotLazy(PostgresValueStreamDataProvider.java:370)
	at com.thingworx.persistence.postgres.dataprovider.PostgresValueStreamDataProvider.queryMultiPropertyValueCollections(PostgresValueStreamDataProvider.java:478)
	at com.thingworx.persistence.common.ValueStreamEngine.lambda$queryMultiPropertyEntries$12(ValueStreamEngine.java:362)
	... 72 common frames omitted
Wrapped by: java.lang.RuntimeException: com.thingworx.common.exceptions.DataAccessException: [1,018] Data store unknown error: [Error occurred while accessing the data provider.]
	at com.thingworx.persistence.common.ValueStreamEngine.lambda$queryMultiPropertyEntries$12(ValueStreamEngine.java:391)
	at com.thingworx.persistence.TransactionFactory.supplyInTransaction(TransactionFactory.java:187)
	at com.thingworx.persistence.TransactionFactory.createEagerDataTransactionAndReturn(TransactionFactory.java:161)
	at com.thingworx.persistence.common.BaseEngine.createEagerTransactionAndReturn(BaseEngine.java:199)
	at com.thingworx.persistence.common.ValueStreamEngine.queryMultiPropertyEntries(ValueStreamEngine.java:354)
	at com.thingworx.valuestreams.ValueStreamThing.queryMultiPropertyStreamEntries(ValueStreamThing.java:340)
	at com.thingworx.things.Thing.doQueryPropertyHistoryLocal(Thing.java:11856)
	at com.thingworx.things.Thing.doQueryPropertyHistory(Thing.java:11805)
	at com.thingworx.things.Thing.QueryNamedPropertyHistory(Thing.java:9785)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at com.thingworx.common.processors.ReflectionProcessor.processService(ReflectionProcessor.java:232)
	at com.thingworx.handlers.ReflectionServiceHandler.processService(ReflectionServiceHandler.java:54)
	at com.thingworx.handlers.ServiceHandlerBase.processServiceWithMetrics(ServiceHandlerBase.java:62)
	at com.thingworx.things.Thing.executeServiceWithServiceHandler(Thing.java:9074)
	at com.thingworx.things.Thing.processServiceRequestDirect(Thing.java:9053)
	at com.thingworx.things.Thing.processAPIServiceRequest(Thing.java:9027)
	at com.thingworx.webservices.BaseService.handleInvoke(BaseService.java:3430)
	... 53 common frames omitted
Wrapped by: com.thingworx.common.exceptions.InvalidRequestException: Unable to Invoke Service QueryNamedPropertyHistory on Postman_Thing : com.thingworx.common.exceptions.DataAccessException: [1,018] Data store unknown error: [Error occurred while accessing the data provider.]
	at com.thingworx.webservices.BaseService.handleInvoke(BaseService.java:3487)
	at com.thingworx.webservices.BaseService.service(BaseService.java:487)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:623)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:199)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:168)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
	at com.thingworx.security.authentication.sso.SSOSecurityContextFilter.doFilter(SSOSecurityContextFilter.java:47)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:168)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
	at com.thingworx.security.contenttype.ContentTypeFilter.doFilter(ContentTypeFilter.java:145)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:168)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
	at com.thingworx.security.contenttype.ContentLengthFilter.doFilter(ContentLengthFilter.java:73)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:168)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
	at com.thingworx.security.filter.ValidationFilter.doFilter(ValidationFilter.java:22)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:168)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
	at com.thingworx.security.authentication.AuthenticationFilter.propagateRequest(AuthenticationFilter.java:772)
	at com.thingworx.security.authentication.AuthenticationFilter.authenticate(AuthenticationFilter.java:612)
	at com.thingworx.security.authentication.AuthenticationFilter.doFilter(AuthenticationFilter.java:278)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:168)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
	at com.thingworx.security.authentication.sso.SSORPUrlRewriteFilter.doFilter(SSORPUrlRewriteFilter.java:82)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:168)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
	at com.thingworx.security.filter.ContentSecurityPolicyFilter.doFilter(ContentSecurityPolicyFilter.java:82)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:168)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
	at com.thingworx.security.filter.ClickjackFilter.doFilter(ClickjackFilter.java:329)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:168)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
	at com.thingworx.security.filter.HttpResponseHeadersFilter.doFilter(HttpResponseHeadersFilter.java:172)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:168)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:168)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:660)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:346)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:383)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:937)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1791)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
	at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1190)
	at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
	at java.base/java.lang.Thread.run(Thread.java:829)

 

Thanks,

Best answer by pshashipreetham

Hi,

 

Thanks, @smainente, for the response. My mistake was upgrading the DB (by dump and restore) to a separate server instead of the server where the Postgres DB was installed and running.

 

I re-done the upgrade on the same server where the DB is existing. It was working fine. Seems like a permission or something. 

 

Thanks,

2 replies

16-Pearl
March 3, 2025
canceling statement due to user request

This usually happens when the platform times out the request. Either your QA database is slow to respond, or the QA environment has shorter timeouts. These timeouts are set on the PersistenceProvider.

pshashipreetham18-OpalAuthorAnswer
18-Opal
March 4, 2025

Hi,

 

Thanks, @smainente, for the response. My mistake was upgrading the DB (by dump and restore) to a separate server instead of the server where the Postgres DB was installed and running.

 

I re-done the upgrade on the same server where the DB is existing. It was working fine. Seems like a permission or something. 

 

Thanks,