"Request to Webtask exceeded allowed execution time" when trying to connecto to MongoDB

Hi guys, I’m super new to both mongoDB and Auth0 so I may be missing something that is not even that complicated. As the title suggests, I’m trying to connect auth0 with a MongoDB database but when I test the scripts it gives me a timeout error.
I have followed every step of the official tutorial so:

  1. Created the db on auth0
  2. Created the db on mongo
  3. Added a user as admin with full access on mongo
  4. Added the ip addresses to the network access (maybe I did something wrong here so I’ll include a screenshot)
  5. Created a collection named “Users”
  6. Set up all the script templates with the connection string found in Database > Connect > Drivers > Node.js “v5.5 or later”
  7. Replaced the password with a database setting “MONGO_PASSWORD”
  8. Replaced the mongodb version from 3.1.4 to 5.7.0 (since I’m using node 18 in the tenant settings)

I also tried installing the Real-time Webtask Logs extension but it doesn’t log any error when I test the script:
image

I’m super confused and I’m sure the problem is something easy to solve but any help would be appreciated

1 Like

Hi @smmo,

Welcome to the Auth0 Community!

I would suspect this is either an issue with Mongo’s firewall blocking the connection or misconfiguration of the configuration in the database action script.

If you want to test this, you can temporarily allow access from anywhere (don’t do this with production data, of course).

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