ESOCKETTIMEDOUT with Pre User Registration hook

Recently we’ve been receiving ESOCKETTIMEDOUT errors during signup when there’s no apparent reason why they should be happening.

When a user signs up through our universal login page, a pre user registration hook makes a request to our server to do some initial logic for new users, then returns a response with some data that gets added to our user’s metadata in Auth0 when the user gets created.

The majority of the time this works fine, however occasionally we see that the sign up fails in auth0 and the user doesn’t get created, even though our server seems to be returning responses to the hook successfully.

It’s worth noting that our server is in Australia, and the entire duration of the request in our server was around 18 seconds before returning to the hook in the cases where we got this error. Normally the duration is around 5-6 seconds, however sometimes it takes a lot longer for various reasons.

Is there a timeout in the pre user registration hook that I’m not aware of, or is there some other reason why we would be getting ESOCKETTIMEDOUT?

Any help would be appreciated. Thanks.

A “Request to Webtask got ESOCKETTIMEDOUT” is a common error when a rule / hooks / db custom script makes a call to an external API and does not return before the 20 second rule timeout. Please note that all Auth0 webtask containers typically have a 20-second execution limit, after which the container may be recycled and you will get the ESOCKETTIMEDOUT error.

You can also take a look at Real-time Webtask Logs extension to help gather more feedback and check the request / response duration as the webtask runs.


This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.