# Stored Procedure Call Blocking or Timeout

**URL:** <https://forum.inductiveautomation.com/t/stored-procedure-call-blocking-or-timeout/74316>\
**Category:** Ignition\
**Tags:** scripting, database\
**Created:** [May 30, 2023, 7:36pm UTC](https://forum.inductiveautomation.com/t/stored-procedure-call-blocking-or-timeout/74316 "2023-05-30T19:36:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jake\_Bottari](https://avatars.discourse-cdn.com/v4/letter/j/3ab097/32.png) [@Jake\_Bottari](https://forum.inductiveautomation.com/u/Jake_Bottari)\
**Post date:** [May 30, 2023, 7:36pm UTC](https://forum.inductiveautomation.com/t/stored-procedure-call-blocking-or-timeout/74316/1 "2023-05-30T19:36:03Z")

</div>

When using the functions system.db.createSProcCall() and subsequently system.db.execSPProcCall(), does this just submit the call to the SQL server and continue executing the script? Or does it block until a response is received?

My assumption is that it simply continues on, and if so then is there a way to assign a timeout value or somehow ensure that the procedure actually ran? Does collecting the return value or output parameters accomplish this?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 30, 2023, 7:57pm UTC](https://forum.inductiveautomation.com/t/stored-procedure-call-blocking-or-timeout/74316/2 "2023-05-30T19:57:17Z")

</div>

`.createSProcCall()` just creates a management and configuration object in Ignition. It does not block, nor do the parameter configuration follow-up methods.

`.execSPProcCall()` sends the configured operation to the database and **does** block while the procedure runs.

---

<div class="post-metadata">

**Author:** ![Jake\_Bottari](https://avatars.discourse-cdn.com/v4/letter/j/3ab097/32.png) [@Jake\_Bottari](https://forum.inductiveautomation.com/u/Jake_Bottari)\
**Post date:** [May 30, 2023, 8:04pm UTC](https://forum.inductiveautomation.com/t/stored-procedure-call-blocking-or-timeout/74316/3 "2023-05-30T20:04:48Z")

</div>

Does `.execSPProcCall()` then timeout at some point if the server is unreachable or something interrupts the procedure? Ignition Docs do not point to any error handling conditions.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 30, 2023, 8:27pm UTC](https://forum.inductiveautomation.com/t/stored-procedure-call-blocking-or-timeout/74316/4 "2023-05-30T20:27:40Z")

</div>

If called from a gateway context, the database connection's timeout would apply. From Designer or Vision Client contexts, the gateway response timeout (typically 60s) would apply.
