Skip to main content
Solved

Database connection timeout


Forum|alt.badge.img+5

It happens that the http request already timed out long ago, or that a browser has been closed, but that the query still runs at SQL Server (Azure database instance).

Is there a way to set a database timeout in the Thinkwise database connection settings?
Or should I post this as an idea?

We had some problems during our last update. One of the possible explanations is that something started a query while there were no indexes. Having a reasonable short timeout would protect against this kind of scenarios. 

Ideally I would like to set the timeout only for connections from Indicium initiated by the user interface, as updates and DBA work can require longer queries. It would be even better if it would be possible to have different settings per view / workflow step, as queries for normal UI screens should never exceed 1 second, while some graphics / download / upload / update functionalities might require more.
 

Best answer by Mark Jongeling

Hey Daan,

Currently Indicium performs the request and sends the response to the client whether or not that client is still listening. Feel free to create an idea for Indicium to ping the listener if it's still actively listening.

Introducing a time-out may have side-effects as some processes simply may take a long time and would be then terminated if it exceeds the time-out period. I'm not so sure this is the best way to stop request prematuely.

View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

6 replies

Mark Jongeling
Administrator
Forum|alt.badge.img+23
  • Administrator
  • 3936 replies
  • Answer
  • August 26, 2024

Hey Daan,

Currently Indicium performs the request and sends the response to the client whether or not that client is still listening. Feel free to create an idea for Indicium to ping the listener if it's still actively listening.

Introducing a time-out may have side-effects as some processes simply may take a long time and would be then terminated if it exceeds the time-out period. I'm not so sure this is the best way to stop request prematuely.


Ricky
Superhero
Forum|alt.badge.img+8
  • Superhero
  • 96 replies
  • August 26, 2024

I haven’t tried this in a long time. But it was no problem to let Indicium run out of memory without any hassle. Just run a small, fast query that results in a large dataset en tada - it is dead and starts logging out people. Same goes for the odd request where the DB server will eat a boatload of CPU’s and memory (indeed also due to missing indexes for example) for breakfast where the client results in a timeout and re-requests the same (default behaviour of Chrome for example) to just start munching away more CPU’s and memory.

Was looking for a decent mechanism to timeout certain requests. Never found it though.


AndreKemmeren
Captain
Forum|alt.badge.img+3

This is especially relevant when running in Azure as you have a hard HTTP timeout of 4 minutes anyway


Forum|alt.badge.img+5
  • Author
  • Sidekick
  • 78 replies
  • September 16, 2024

AndreKemmeren, the problem is not the timeout of the web server. The problem is with the timeouts of the database server after that. 

Especially in the 2023 version, it happened that queries never, or 4 minutes later, finished. This is one of my ideas to allow the developer to specify an timeout, and automatically kill things that run to long. 

Those long running queries can be both a mistake of the developer or Thinkwise. In both cases a query timeout can make the damage much smaller.


AndreKemmeren
Captain
Forum|alt.badge.img+3

@Daan Heemskerk thats exactly my point. The webserver gives the client a timeout after 4 minutes in case of Azure but the database will keep on working even when there is no client to deliver the data to.

 


Forum|alt.badge.img+5
  • Author
  • Sidekick
  • 78 replies
  • September 27, 2024

Ok, so I will have to upgrade this to an idea. I believe that it is clear from this discussion that not being able to set timeouts or limits can give problems. 

I will upgrade this to an idea, thank you. 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings