Request to Webtask exceeded allowed execution time error

Problem Statement

Our logs show different authentications and authorizations with an error description “Request to Webtask exceeded allowed execution time”.

The end users are redirected to the callback with the parameters:
access_denied&error_description=Request%20to%20Webtask%20exceeded%20allowed%20execution%20time&state

Cause

This is most commonly caused by an external API taking a long time to respond, and the rule’s webtask container expires before the rule can callback.

Solution

Follow best practices to implement explicit timeouts when making API calls within Rules:

Rules have a lifetime of circa 20 seconds, as mentioned here:

This should allow the scenario of an unresponsive API to be handled more gracefully and to identify potential issues with that external API.