Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Invalid transaction handle when idle > 10 min
#1
I just migrated an ISAPI app to a new server.
On this new Win 2019 Server, if I leave that app idle for more than 10 minutes, when I get back to it and click a button I get:

Error details:
Exception message : invalid transaction handle (expecting explicit transaction start)
Depending on the error condition, it might be possible to restart the application.
Exception class : TDBXError

Any ideas?

C++Builder 10.3 Update 3
IntraWeb 15.2.3

I've checked that  TIWServerController::SessionTimeout = 30 ;
On the IIS App Pool, Idle Timeout = 35

The same app does not have this problem on the previous server; but I don't know if that means it's a server setting.
Thanks for your input.
Reply
#2
TDBXError is not from IntraWeb. Those settings won't have any effect on it.

ISAPI applications run with less permissions than standalone applications and there are also differences for any components which use COM.

I can suggest to add some logging and determine which line of your code is triggering this. It appears to be when starting a database transaction based on the info in this post.

Also check google, here is one result regarding this issue:
https://stackoverflow.com/questions/3947...art-execut
Reply
#3
I think your DB connection handle is somehow being invalidated. Something is closing your connection and it is probably IIS. Is it a new DB server?
Reply
#4
Yes, it's a new dedicated Firebird DB server as well. We moved from a single/multi-purpose server to 3 Amazon Workspace servers.
I don't know how to stop IIS from closing the DB connection. I don't think it's the DB server closing it, since our Windows program connecting to that DB has no issues.
Reply
#5
The first thing you need to check is the Idle timeout setting of your application pool.

Open IIS console, go to Application Pools. Select the application pool that your app is using and click on Advanced Settings.

There is an option named Idle Time-out (minutes). Adjust this setting to be more than your application timeout.

Also, check another option named Regular Time Interval under Recycling. It also needs to be high enough (the default is more than adequate, though).

In case you change anything, also restart IIS. See if it changes anything
Reply
#6
Thanks for your suggestion Alexandre.
Those settings were correct.
TIWServerController:
SessionTimeout = 30 ;
App Pool:
Limit Interval = 35
Idle Time-out = 35
Failure Interval = 10
Recycling, Regular Interval = 1440 (was 1740)

But it's not the application that stops running, only its DB connection that is lost.
I don't think it's a problem with the code since the same exe does not have this issue on the old server.
And I'm not aware of a Firebird DB server having a connection timeout.

Any ideas of what to check next?
I'll report back if I find anything on my end.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)