API calls from Python to Slack webhook runs until timeout of processor or function

Within a workflow, we used the Flexible REST API processor to call a ONE DATA function (with different inputs) multiple times in a row (automated, so rapid execution of the same function in a small amount of time).
The workflow containing the Flexible REST processor runs fine (~ 5 seconds execution time) when a single function call is sent, but runs into function timeout when multiple executions are triggered in a short period of time.
Within the function, we send out ONE DATA Api calls to create and execute other workflows and to log our process steps using a Slack webhook (sending some messages to a created Slack channel).

Hey Christian, our advice is the following:

  1. Never make API calls without a timeout, especially to Slack Webhooks. By default, requests do not time out unless a timeout value is set explicitly. Without a timeout, your code may hang for minutes or more.
  2. Never post large JSON dumps to the Slack Webhook, as there are limits and your post request is not receiving a reply.

Explanation: The Slack webhook has some limits, based on the “tier” (i guess this means how much you are paying them), to prevent spam or flooding of webhooks. There are limits in number or messages per time and also size of messages. With logging a lot of messages and also large messages (e.g., json dumps) this limit was reached and incomming requests were ignored. Apparently the webhook does not reply with an error, but rather drops your request without further notice. Without a timeout in your code, the execution was stuck at this point.