# Webtask exceeded allowed execution time when trying to connect to to mongodb

**URL:** <https://community.auth0.com/t/webtask-exceeded-allowed-execution-time-when-trying-to-connect-to-to-mongodb/134702>\
**Category:** Get Help\
**Tags:** custom-database-connections, connections\
**Created:** [May 22, 2024, 11:59am UTC](https://community.auth0.com/t/webtask-exceeded-allowed-execution-time-when-trying-to-connect-to-to-mongodb/134702 "2024-05-22T11:59:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![david.doyle7](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/david.doyle7/32/57273_2.png) [@david.doyle7](https://community.auth0.com/u/david.doyle7)\
**Post date:** [May 22, 2024, 11:59am UTC](https://community.auth0.com/t/webtask-exceeded-allowed-execution-time-when-trying-to-connect-to-to-mongodb/134702/1 "2024-05-22T11:59:20Z")

</div>

Hi there im trying to test a create user action with a custom mongodb and im running into this timeout, just like described in this previous post : ["Request to Webtask exceeded allowed execution time" when trying to connecto to MongoDB](https://community.auth0.com/t/request-to-webtask-exceeded-allowed-execution-time-when-trying-to-connecto-to-mongodb/122225)

I enabled connect from anywhere via the mongodb dashboard but i am still getting the timeout error, I also added the ip addresses from the dashboard as per this pic.

 ![image](https://global.discourse-cdn.com/auth0/original/3X/e/7/e7fcd67e7c71425329ac3de3cf66631e009fa2cd.png)

I also tried with both  
const MongoClient = require(‘mongodb@5.7.0’).MongoClient; and  
const MongoClient = require(‘mongodb@5.1.0’).MongoClient;  
as im using Node 18. I also trid just Mongodb with no @ too.

I used the real time web task logs extension but nothing useful appears there just like in the other topic thread and if i search the logs for type:f i dont see anything. Any ideas or help would be greatly appreciated as the previous thread i found didnt contain any replies from the author. Thanks!

Is should mention I followed this guide when setting things up: [Connecting Auth0 to MongoDB with Custom Databases](https://auth0.com/blog/connecting-auth0-to-mongodb/)

---

<div class="post-metadata">

**Author:** ![david.doyle7](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/david.doyle7/32/57273_2.png) [@david.doyle7](https://community.auth0.com/u/david.doyle7)\
**Post date:** [May 22, 2024, 12:22pm UTC](https://community.auth0.com/t/webtask-exceeded-allowed-execution-time-when-trying-to-connect-to-to-mongodb/134702/2 "2024-05-22T12:22:57Z")

</div>

Hey in case anyone else gets stuck on this I changed node to 16 instead of 18 and then the @mongo4.1.0 and its working now. Im just curious if anyone has gotten it working when using Node 18 at all? Good luck everyone

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [June 5, 2024, 12:23pm UTC](https://community.auth0.com/t/webtask-exceeded-allowed-execution-time-when-trying-to-connect-to-to-mongodb/134702/3 "2024-06-05T12:23:55Z")

</div>

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