Hey, I'm trying to log error to and external loggi...
# prisma-whats-new
c
Hey, I'm trying to log error to and external logging service in a catch block in graphcool resolver function. I'm getting error "Task timed out after 15.02 seconds". Log is sent, and I get the response from the external log service. But the graphcool function keeps running and don't finish. @nilan any ideas?
m
@congy the functions/resolvers inside graphcool use AWS Lambda. They run for a set time then are killed. Typically each function should be small and can be executed quickly. Sounds like your function is taking too long to execute.
c
Thank you for your answer. I know aws lambda functions have a limited amount of time before they are killed. But my function doesn't take anywhere near to 15 seconds.
m
it might be the connection with the external logging service
is it in the same AWS region?
c
I get the response from external logging service. I even see it in the graphcool console when I log it. The problem is, the execution of logging call somehow halts the execution of the lines below (even tho it shouldn't, it's just a synchronous API call, I'm not waiting for the response). So the
return { error: '...' }
doesn't fire. I guess I'll find another solution. Thanks for you interest