Gateway Timer Scripts Not Running After DB Disconnect

Problem:
When a gateway timer script is running in the project and connectivity with the SQL Server is lost, the running script(s) “hang up” and will not restart or run again at the configured time.
The time “Last Execution” column on the Gateway/Status/Gateway Scripts page will aggregate (i.e. a hung script scheduled to run every second would appear to have last ran 5 minutes ago.)
To restart the script requires opening a script, click “Apply” and “Ok” and close and Save the project. All scripts will refresh. We have several scripts in this project to multiple remote sql connections so this can happen if any given remote connection has issues during the execution of the script.
Question/Solution:
Is there a scripted method for checking for any last run time for any scripts on the gateway greater than x amount of time?
Is there a configuration to automatically restart just scripts after connectivity restoration?

Have you set really long timeouts in your database connection settings?

I think if you take a thread dump while this is happening you'll find that the last execution is still stuck running but blocked on some network call with a default timeout of infinity.

As Phil mentioned, these generally have to be set using some driver-specific connection setting.

Thanks for the quick response. We didn't see anything specifically at the driver level.

Are you referring to to the eviction rate in the database advanced properties (attached)?

Thanks again for your assistance.