Home
Support Forums

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

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?

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.

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.

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 and Could not get a response - Error: Client network socket disconnected before secure TLS connection was established - Help - Postman. We don’t know or have any means to check which one of those applies to your situation.