<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: cancelling statement due to user request getting an error in thingworx in ThingWorx Developers</title>
    <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/cancelling-statement-due-to-user-request-getting-an-error-in/m-p/872911#M62212</link>
    <description>&lt;P&gt;Hi &lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/313569"&gt;@Ru&lt;/a&gt; ,&lt;/P&gt;
&lt;P&gt;Could you please confirm if you tried using the SQL Thing approach I described? Or you are still using the Database Thing?&lt;/P&gt;
&lt;P&gt;It's not clear from your reply if you implemented the changes I suggested.&lt;/P&gt;</description>
    <pubDate>Tue, 02 May 2023 12:49:03 GMT</pubDate>
    <dc:creator>VladimirRosu</dc:creator>
    <dc:date>2023-05-02T12:49:03Z</dc:date>
    <item>
      <title>cancelling statement due to user request getting an error in thingworx</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/cancelling-statement-due-to-user-request-getting-an-error-in/m-p/872239#M62155</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;i am trying to execute postgres database store procedure in thingworx but unable to get the data, it is showing an error in database logs like&lt;STRONG&gt; "cancelling statement due to user request",&lt;/STRONG&gt; but if i am trying to execute the same store procedure in postgres it is giving me the data. i checked some thingworx articles and there they are saying to refresh the database connection or increase the database thing time limit, i tried these two approaches also but not getting the data. Please give me the solution on this as soon as possible.&lt;/P&gt;&lt;P&gt;&lt;FONT color="headerbuttontrackingcode"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 04:28:10 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/cancelling-statement-due-to-user-request-getting-an-error-in/m-p/872239#M62155</guid>
      <dc:creator>Ru</dc:creator>
      <dc:date>2023-04-28T04:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: cancelling statement due to user request getting an error in thingworx</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/cancelling-statement-due-to-user-request-getting-an-error-in/m-p/872257#M62159</link>
      <description>&lt;P&gt;What exactly is the average execution time of that stored procedure?&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 05:57:57 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/cancelling-statement-due-to-user-request-getting-an-error-in/m-p/872257#M62159</guid>
      <dc:creator>VladimirRosu</dc:creator>
      <dc:date>2023-04-28T05:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: cancelling statement due to user request getting an error in thingworx</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/cancelling-statement-due-to-user-request-getting-an-error-in/m-p/872260#M62160</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/116627"&gt;@VladimirRosu&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the avg time to execute the store procedure is 30 sec to 60 sec.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 06:29:36 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/cancelling-statement-due-to-user-request-getting-an-error-in/m-p/872260#M62160</guid>
      <dc:creator>Ru</dc:creator>
      <dc:date>2023-04-28T06:29:36Z</dc:date>
    </item>
    <item>
      <title>Re: cancelling statement due to user request getting an error in thingworx</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/cancelling-statement-due-to-user-request-getting-an-error-in/m-p/872276#M62164</link>
      <description>&lt;P&gt;1. First, I presume you modified the database Thing timeout already right? What value did you use there?&lt;/P&gt;
&lt;P&gt;2. Second, the Database Thing removes by default any existing connections that spend more than 60 seconds without receiving any data. This means any query that spends &amp;gt;= 60 seconds on the SQL server side, without sending data to ThingWorx. If you are curious how it's doing that, it is by using the standard JDBC parameter named "&lt;CODE class="attributeName"&gt;removeAbandoned&lt;/CODE&gt;".This parameter is set to "true", and also its value is 60 seconds, so if you set a big timeout, but the connection does not receive data because the SQL server spends time to process data internally, this will kick in. Typically, such a big time to process data is seen as way too high, and could overload the server fast, that's why this parameter is set to true.&lt;/P&gt;
&lt;P&gt;3. However, in 9.3.3 we introduced a new way to interact with SQL databases, that is using the SQLThing etc (not DatabaseThing). Info &lt;A href="https://support.ptc.com/help/thingworx/platform/r9/en/index.html#page/ThingWorx/Help/Release_Notes/FixedIssues/Fixed_Issues_in_ThingWorx_Platform_9.3.3.html#" target="_blank" rel="noopener"&gt;here.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Most important for you, this new interaction point does not enable the flag above, effectively removing that limitation. That being said, with great power comes great responsibility, so I would really optimize first that stored procedure, just in case it can be called too many times.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would suggest overall to switch to the new 9.3.3 SQL Thing way of interacting with the DB - if this is really the core issue you experience.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please let us know the results of your test&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 07:12:28 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/cancelling-statement-due-to-user-request-getting-an-error-in/m-p/872276#M62164</guid>
      <dc:creator>VladimirRosu</dc:creator>
      <dc:date>2023-04-28T07:12:28Z</dc:date>
    </item>
    <item>
      <title>Re: cancelling statement due to user request getting an error in thingworx</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/cancelling-statement-due-to-user-request-getting-an-error-in/m-p/872909#M62211</link>
      <description>&lt;P&gt;yes i already modify database thing timeout already please check below Screenshot&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ru_0-1683031096757.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/81283i59F2B5BA2AB7314C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ru_0-1683031096757.png" alt="Ru_0-1683031096757.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;also i tried to add scripttimeout on platform-settings.json but unable to execute the script like below&lt;/P&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;UL&gt;&lt;LI&gt;&lt;UL&gt;&lt;LI&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;"BasicSettings"&lt;/SPAN&gt;: {
            ...
            &lt;SPAN class=""&gt;"ScriptTimeout"&lt;/SPAN&gt;: 600
}&lt;/PRE&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;please let me know how i can resolve this issue.&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 12:43:20 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/cancelling-statement-due-to-user-request-getting-an-error-in/m-p/872909#M62211</guid>
      <dc:creator>Ru</dc:creator>
      <dc:date>2023-05-02T12:43:20Z</dc:date>
    </item>
    <item>
      <title>Re: cancelling statement due to user request getting an error in thingworx</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/cancelling-statement-due-to-user-request-getting-an-error-in/m-p/872911#M62212</link>
      <description>&lt;P&gt;Hi &lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/313569"&gt;@Ru&lt;/a&gt; ,&lt;/P&gt;
&lt;P&gt;Could you please confirm if you tried using the SQL Thing approach I described? Or you are still using the Database Thing?&lt;/P&gt;
&lt;P&gt;It's not clear from your reply if you implemented the changes I suggested.&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 12:49:03 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/cancelling-statement-due-to-user-request-getting-an-error-in/m-p/872911#M62212</guid>
      <dc:creator>VladimirRosu</dc:creator>
      <dc:date>2023-05-02T12:49:03Z</dc:date>
    </item>
    <item>
      <title>Re: cancelling statement due to user request getting an error in thingworx</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/cancelling-statement-due-to-user-request-getting-an-error-in/m-p/872990#M62213</link>
      <description>&lt;P&gt;Maybe also check the&amp;nbsp;&lt;A href="https://support.ptc.com/help/thingworx/platform/r9/en/#page/ThingWorx/Help/Installation/Installation/platform_settings_json_configuration_details.html" target="_blank" rel="noopener"&gt;Docs&lt;/A&gt;&amp;nbsp;-&amp;gt;&amp;nbsp;&lt;SPAN&gt;Persistence Provider Settings -&amp;gt;&amp;nbsp;PostgresPersistenceProviderPackage settings. E.g. "Query Timeout" - "The amount of time (in milliseconds) a query will wait to complete before it is cancelled." But by default it seems to be 600seconds. You should see the setting also in ther Configuration of Peristence Provider.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I would assume there is some error in some TWX logs when the query is cancelled? Is there anything in Application/Communication/Script..Log? Maybe it tells what the issue is.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 17:07:17 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/cancelling-statement-due-to-user-request-getting-an-error-in/m-p/872990#M62213</guid>
      <dc:creator>nmutter</dc:creator>
      <dc:date>2023-05-02T17:07:17Z</dc:date>
    </item>
    <item>
      <title>Re: cancelling statement due to user request getting an error in thingworx</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/cancelling-statement-due-to-user-request-getting-an-error-in/m-p/872994#M62214</link>
      <description>&lt;P&gt;That setting would not apply to queries done through the Database Thing. It's valid only for queries the platform generates directly (QueryPropertyHistory etc.).&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 17:55:13 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/cancelling-statement-due-to-user-request-getting-an-error-in/m-p/872994#M62214</guid>
      <dc:creator>VladimirRosu</dc:creator>
      <dc:date>2023-05-02T17:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: cancelling statement due to user request getting an error in thingworx</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/cancelling-statement-due-to-user-request-getting-an-error-in/m-p/873110#M62225</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/116627"&gt;@VladimirRosu&lt;/a&gt;&amp;nbsp;, i didn't try the approach you suggested.&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2023 08:21:13 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/cancelling-statement-due-to-user-request-getting-an-error-in/m-p/873110#M62225</guid>
      <dc:creator>Ru</dc:creator>
      <dc:date>2023-05-03T08:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: cancelling statement due to user request getting an error in thingworx</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/cancelling-statement-due-to-user-request-getting-an-error-in/m-p/1016757#M69811</link>
      <description>&lt;P&gt;I did use the SQLThing but still got the cancelling due to user request error. Support helped me and informed that there is a timeout I can set myself on my service/query (default 60 seconds): Article reference&amp;nbsp;&lt;A href="https://www.ptc.com/en/support/article/CS345780" target="_blank"&gt;https://www.ptc.com/en/support/article/CS345780&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Thu, 22 May 2025 08:48:02 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/cancelling-statement-due-to-user-request-getting-an-error-in/m-p/1016757#M69811</guid>
      <dc:creator>nmutter</dc:creator>
      <dc:date>2025-05-22T08:48:02Z</dc:date>
    </item>
  </channel>
</rss>

