cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Can we increase "ScriptTimeout": 7200 ??

AP_10343008
15-Moonstone

Can we increase "ScriptTimeout": 7200 ??

In platform-settings.json, I set timeout to 1 hour t generate around 200 reports in Production Server. 

  • "BasicSettings": { ... "ScriptTimeout": 3600 },

Due the performance of production server, some times 92 reports generated in one hour and sometimes 150 reports generated in one hour. So shall I increase script timeout to 2 hours. Ex: 

  • "BasicSettings": { ... "ScriptTimeout": 3600 },  ???

In Article - CS321502 - Service script times out with error Execution of Script terminated after : 30 seconds in ThingWorx Platform, I found that 'increasing the timeout limit of services too high could impact the performance of other areas of the application'.https://www.ptc.com/en/support/article/CS321502 

 

Is it okay if iam increasing timeout to 2 hours for scheduler ?

ACCEPTED SOLUTION

Accepted Solutions

I'd question the design of the solution.

Services are meant for transactional work, this is why there is a timeout in the first place, because you block resources while the service is running and the transaction is open. Services are not a good place for long-running background jobs. There are exceptions to the rule, of course, but I would favor an approach where you launch the long-running job and either regularly check if it is completed, or you get the job calling back when it is completed.

 

The problem with ScriptTimeout is it is a global setting, meaning it will be the limit for all jobs. You will have no way to abort a service (for two hours) if for example a remote system hangs/doesn't reply or you accidentally started an endless loop. This will eat up resources for two hours and all you could do is to restart the server. That's the risk you are buying into.

View solution in original post

3 REPLIES 3

I'd question the design of the solution.

Services are meant for transactional work, this is why there is a timeout in the first place, because you block resources while the service is running and the transaction is open. Services are not a good place for long-running background jobs. There are exceptions to the rule, of course, but I would favor an approach where you launch the long-running job and either regularly check if it is completed, or you get the job calling back when it is completed.

 

The problem with ScriptTimeout is it is a global setting, meaning it will be the limit for all jobs. You will have no way to abort a service (for two hours) if for example a remote system hangs/doesn't reply or you accidentally started an endless loop. This will eat up resources for two hours and all you could do is to restart the server. That's the risk you are buying into.

abandal
10-Marble
(To:Rocko)

Hi @AP_10343008,


I wanted to follow up with you on your post. Upon further review, we have gone ahead and designated the post we feel successfully answered your question.

In the event that you disagree with the Solution Accepted, please let me know.

Thanks for using the PTC Community! 

Regards,
Abhi

Hello @AP_10343008 .

It appears that this post may answer your question.  For the benefit of other Community Members who may have the same question, it would be great if you could designate it as the Accepted Solution.

In the event that this response did not answer your question, please post your current status so that we can continue to support.

Thanks for using the PTC Community!

Regards,
Abhi

Announcements


Top Tags