# Custom DB not connecting: exceeding execution time

**URL:** <https://community.auth0.com/t/custom-db-not-connecting-exceeding-execution-time/123788>\
**Category:** Get Help\
**Tags:** custom-database-connections, connections\
**Created:** [December 28, 2023, 6:00am UTC](https://community.auth0.com/t/custom-db-not-connecting-exceeding-execution-time/123788 "2023-12-28T06:00:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![productmanager](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@productmanager](https://community.auth0.com/u/productmanager)\
**Post date:** [December 28, 2023, 6:00am UTC](https://community.auth0.com/t/custom-db-not-connecting-exceeding-execution-time/123788/1 "2023-12-28T06:00:13Z")

</div>

I am just testing the MS SQL connection from the get user script (Any script for that matter).  
But every time I test it… the connection exceeds the time limits and throws webstack execution exceeded time limit.  
I have checked the firewall in Azure sql. they are fine… I even added open IP range to allow all IP(just for test).  
I still get the same error.  
I know the error is happening only with connection as I have placed the logs appropriately.  
TO ensure the there are no issues on the database side I users credentials of another database that is already in use successfully by another auth0 tenant. The issues is same with that as well.  
The execution error is not there when I comment out the sql connection part.

---

<div class="post-metadata">

**Author:** ![marcelina.barycka](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/marcelina.barycka/32/56162_2.png) [@marcelina.barycka](https://community.auth0.com/u/marcelina.barycka)\
**Post date:** [January 4, 2024, 2:33pm UTC](https://community.auth0.com/t/custom-db-not-connecting-exceeding-execution-time/123788/2 "2024-01-04T14:33:47Z")

</div>

Hi @productmanager , thank you for describing your problem!

Does the custom db connection you are testing is enabled to at least 1 application registered in your Auth0 tenant?  
You can check this:  
`Auth0 tenant-> Authentication -> Database -> your custom db -> Applications`

> [@productmanager](#):
>
> I know the error is happening only with connection as I have placed the logs appropriately.

In this case, I would also think about taking a closer look at your custom database scripts.

Please let us know if your were able to move forward with this!

---

<div class="post-metadata">

**Author:** ![amin](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/amin/32/10144_2.png) [@amin](https://community.auth0.com/u/amin)\
**Post date:** [January 9, 2024, 3:20am UTC](https://community.auth0.com/t/custom-db-not-connecting-exceeding-execution-time/123788/3 "2024-01-09T03:20:00Z")

</div>

Hi @productmanager,

Can you paste your custom-db source code here for review? Mask endpoints and credentials.

Regards

---

<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:** [January 23, 2024, 3:20am UTC](https://community.auth0.com/t/custom-db-not-connecting-exceeding-execution-time/123788/4 "2024-01-23T03:20:50Z")

</div>

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