-
-
Notifications
You must be signed in to change notification settings - Fork 371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fetch requests fails as network errors on chrome console #824
Comments
Unfortunately debugging that is pretty app-specific, since it means your app is either taking too long (say connecting to databases before, reading files etc) before listening on |
Hey @tj Since you mentioned connecting the database, what we use is a Prisma 1 server hosted on EC2. That Prisma server in turns connects to our RDS database. Do you think the issue might be related to these parts? |
Locally it works perfectly fine though. So the requests passing through apigw and lambda run into unreported issue it seem. |
For whoever struggles with this in the future, make sure to remove docker completely. You're welcome! |
Prerequisites
up upgrade
)-v, --verbose
flag.Description
Our function randomly stops working and keeps interrupting requests either immediately or after a while. Sometimes a lot less time to fail than the timeout.
here are some error logs on cloudwatch:
"message": "error creating handler: waiting for http://127.0.0.1:36785 to be in listening state: timed out after 15s"
Lambda execution failed with status 200 due to customer function error: RequestId: id Error: Runtime exited with error: exit status 1. Lambda request id: id
To give you more background, our function is a graphql server using graphql yoga. Here's how it's configured:
now I understand that PORT is managed by up, so it's given as is. Once I noticed that the logs above print not the same port numbers, I tried to set the port of the server to process.env.PORT but that didn't solve the problem.
What's weird is that our production server has the same config without changing the port number, keeping it to the default of graphql yoga which is port 4000.
So how does that work?
each lambda invocation means a new PORT, right?
shouldn't the graphql server listen to the same port number, or would it work on the default 4000
Now all that above wasn't enough to pinpoint the exact location of the issue, It's still vague.
More error logs:
{"fields":{"app-name","commit":"123","error":"net/http: timeout awaiting response headers","id":"0","plugin":"relay","stage":"staging","version":"504"},"level":"warn","timestamp":"2021-02-06T20:11:50.190274865Z","message":"request timeout"}
2021/02/06 20:11:50 http: proxy error: net/http: timeout awaiting response headers
Any help is highly appreciated.
2021/02/06 20:11:50 http: proxy error: net/http: timeout awaiting response headers
[Network error]: {"name":"ServerParseError","response":{},"statusCode":502,"bodyText":""}
UPDATE:
just noticed that the server actually starts using the same port that UP defines at runtime:
So judging by the last error message, does it mean that the server/up is taking a lot of time to be in listening state ?
any way to debug/increase that 15second number?
The text was updated successfully, but these errors were encountered: