# Task Timed Out Error and Authentication Problems with the GRANDstack Starter using Aura Free and Auth0

**URL:** <https://answers.netlify.com/t/task-timed-out-error-and-authentication-problems-with-the-grandstack-starter-using-aura-free-and-auth0/46063>\
**Category:** Support\
**Tags:** lambda-functions, create-react-app, authentication, netlify-newbie\
**Created:** [October 22, 2021, 9:01am UTC](https://answers.netlify.com/t/task-timed-out-error-and-authentication-problems-with-the-grandstack-starter-using-aura-free-and-auth0/46063 "2021-10-22T09:01:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaedag](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/jaedag/32/21873_2.png) [@jaedag](https://answers.netlify.com/u/jaedag)\
**Post date:** [October 22, 2021, 9:01am UTC](https://answers.netlify.com/t/task-timed-out-error-and-authentication-problems-with-the-grandstack-starter-using-aura-free-and-auth0/46063/1 "2021-10-22T09:01:45Z")

</div>

Hi I’m looking for help with my app developed using the grandstack starter, and deployed with neo4j aura using netlify

I keep getting this error at random times for some queries. Is there a better way to debug or solve this? What are the possible reasons for the task to time out?

```auto
1:41:29 PM: 8c18fb7e Duration: 10010.59 ms Memory Usage: 234 MB Init Duration: 4850.80 ms    
1:41:29 PM: 8c18fb7e ERROR Task timed out after 10.01 seconds

```

I’m also using auth0 for authentication and using the Auth0 Management API with custom resolvers for some of my mutations. This is the second most common error I see in the netlify logs.

```auto
1:45:19 PM: aff63fd7 Duration: 337.92 ms Memory Usage: 237 MB 1:45:27 PM: 2021-10-21T13:45:27.555Z @neo4j/graphql:auth Verifying JWT

1:45:28 PM: 2021-10-21T13:45:28.037Z @neo4j/graphql:auth Verifying JWT

1:45:28 PM: d84bcaef ERROR There was an error obtaining auth token Error: Client network socket disconnected before secure TLS connection was established

```

Again, why does it succeed sometimes and fail sometimes? And how can I solve these issues?

You can find the code for my resolvers and project here [GitHub - jaedag/fl-admin-portal: Creating a Church Managament Portal Application wiith GRANDstack.](https://github.com/jaedag/fl-admin-portal/)

---

<div class="post-metadata">

**Author:** ![hrishikesh](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/hrishikesh/32/74607_2.png) [@hrishikesh](https://answers.netlify.com/u/hrishikesh)\
**Post date:** [October 22, 2021, 11:15am UTC](https://answers.netlify.com/t/task-timed-out-error-and-authentication-problems-with-the-grandstack-starter-using-aura-free-and-auth0/46063/2 "2021-10-22T11:15:21Z")

</div>

Hi @jaedag,

Netlify Functions have a time limit of 10 seconds by default. You must return a response with a valid status code within that time. If you don’t, the function would eventually time out.

About the second error, just as it says, there’s some kind of a network error preventing a connection. As to why it happens, there are a variety of reasons, for example check [node.js - "Client network socket disconnected before secure TLS connection was established", node 10 - Stack Overflow](https://stackoverflow.com/questions/53593182/client-network-socket-disconnected-before-secure-tls-connection-was-established) and [Could not get a response - Error: Client network socket disconnected before secure TLS connection was established - Help - Postman](https://community.postman.com/t/could-not-get-a-response-error-client-network-socket-disconnected-before-secure-tls-connection-was-established/8968). We don’t know or have any means to check which one of those applies to your situation.
