Lambda queries become inaccessible after deploy

Using Dgraph Cloud

After adding a new lambda resolver and deploying the lambdas with Cerebro, upon querying it in the Explorer tab I get the following error:

Evaluation of custom field failed because external request returned an error: Post \"http://router.fission.svc.cluster.local:80/cluster/0x1c97e9e/133/graphql-worker\": context deadline exceeded (Client.Timeout exceeded while awaiting headers) for field: orderTimeSeries within type: Query.

And after hitting another lambda query that was working before the deploy without any issues:

Evaluation of custom field failed because external request returned an error: unexpected error with: 500 for field: sellOrderDataByType within type: Query.

I looked at the logs since the faulty deploy and the only messages present are Starting Server On Port 8888 so none of the resolvers are being called since no event received logs are present, so it’s really hard to debug what’s going on.

Has anyone had a similar issue or know what could be causing it? Thanks in advance.

The lambda debugging process is :confounded:

Context exceeded is a common error that is still common and not really avoidable (not specific to lambda) that just means try again sadly.

If a lambda was working and now isn’t you might have a syntax error in the script.

1 Like

If you have Docker, you might try my dgraph sandbox, specifically the lambda branch: GitHub - matthewmcneely/dgraph-v21.03-sandbox at explanations/lamda-query-resolver

Makes the debugging turnaround less painful.

@matthewmcneely I was referring directly to Dgraph Cloud lambda debugging. People use cloud so they don’t have to deploy Dgraph. If you have to deploy locally just to debug your lambda efficiently that would be a bad DX

1 Like