Request to Webtask exceeded allowed execution time - WP Plugin issue

Hello guys, I have a problem with Auth0 plugin for WordPress. I’ve set up the plugin, and it works for Google login, but it doesn’t work with my own DB. I’ve setup the DB migration and when I test these settings - all things seem to be ok:

But when I’m trying to login to my site - I get 401 status code with this message “Request to Webtask exceeded allowed execution time”.

Thank you for your help!

Hi @rocky

This error happens when a rule, hook, or database script takes longer than 20 seconds to complete. Usually from an external API call that does not return within that time. Can you try disabling those to see if they are causing the error?

Thank you for your reply, @ricardo.batista !

Could you explain what you mean? What should I disable?

In the Auth0 dashboard, try disabling any rules and hooks that you might have enabled.

If this does not work and if you have a custom DB with a login or get user script, you can add console.log() into the scripts and see if they are taking longer than the 20 seconds, using the Real-time Webtask Logs extension. See this for more context on the custom DBs:

@ricardo.batista I don’t have any hooks and rules. When I test the application with my current setting it works, but when I open the form on my WP site I get the error.

Can you capture a HAR file for this failure and send it to me in a private message? Be sure to redact any secrets or passwords from it.

You can find detailed instructions on how to create it here: Generate and Analyze HAR Files

Hi @rocky

Thanks for the HAR file. I can see that the Username-Password-Authentication is a custom database and has action scripts defined. The Login script, as an example, is called each time a user is required to authenticate: Login Script Templates

You can see them if you select the Username-Password-Authentication connection in the Auth0 dashboard, then Custom Database and under the Database Action Scripts you can find the Login script. This is calling an external MySQL database and is taking longer than 20 seconds to return. I recommend that you put some console.log() in there and check the output and timestamps using the Real-time Webtask Logs to check why your MySQL database is not returning properly within 20 seconds.

@ricardo.batista You were right. I managed to resolve the issue. The problem was that the Application was using other connections (different databases) that contain invalid scripts. These are scripts from other developers and in order not to delete them, I simply disconnected all databases that are not mine. Thanks a lot for your help.

2 Likes

Glad it’s working for you now!

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