-
Notifications
You must be signed in to change notification settings - Fork 664
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
ERROR: aws-serverless-express connection error with every requests #199
Comments
Did you change anything on your end? e.g did you modify your API Gateway or Lambda Function? |
@brettstack No, nothing change. We have 2 stages on aws, both gets the same issue. |
The same error is occurring in our service.
|
Thanks for reporting. If you could provide additional information such as how you're implementing the handler (e.g is it wrapped in a promise?); Which version of Node.js runtime you're using, that might help. |
@brettstack
|
@brettstack Here is our We also use TypeScript.
|
Only request include |
Thanks for the additional details. Is it 100% failure rate for those? |
@brettstack Yup! it is 100% |
Which region(s)? |
I notice you both use |
@shwetaskatdare My region is I am going to try remove |
@brettstack Our region is We are using Some applications do not use The following is one of them.
This application is running with This application also worked until yesterday, but |
Hi! In our environment we run Nuxt.js but it stopped working with a similar error.
Since erroneous response did not occur when accessing by erasing Cookie, I guess that the HTTP Request Header is involved. region: ap-northeast-1 Partial snippets of code // app.js
const express = require('express')
const { nuxt } = require('./core/nuxt')
const app = express()
app.use(nuxt.render)
module.exports.app = app
// handler.js
const awsServerlessExpress = require('aws-serverless-express')
const { app } = require('./app')
const server = awsServerlessExpress.createServer(app)
module.exports.handler = (event, context, callback) => {
if (process.env.NODE_ENV !== 'production') {
console.log('[info]', 'Event', JSON.stringify(event))
}
awsServerlessExpress.proxy(server, event, context)
} I hope it becomes helpful 🙏 |
@brettstack You can take a test on AWS env with a request what include a long header like that
|
It is also 100% failure for us as of today (13/12/2018), no code changes since yesterday. Using Amplify library to create the lambda function / express. I am using eu-west-1 region for this api gateway, lambda, dynamodb. My current 'workaround' is switching all lambdas to use Node 6.10 (they are now working). |
Same here, with nodejs 8.10, version 3.3.5 in eu-west-1, also no code change. 100% failure rate, app down. We are going to test a few things from now and report if we find a work around. |
Same issue here since few hours. Are you guys using your Lambda behind API Gateway (and using a JS frontend, like React)? Looks like when cookies are defined, errors appears. Can't this be a change related to AWS Lamba itself? 😞 |
Same here in EU-WEST-1 |
we have 3 stages deployed in |
Same here with 3.3.5 in |
Same here, with nodejs 8.10, version 3.3.5 in eu-west-1. |
Same here, with nodejs 8.10, version 3.3.5 in eu-west-1 as well |
Same, with nodejs 8.10, version 3.3.5 in eu-west-1! 👎 |
Same here eu-west-1b ! Ionic 3 =>API Gateway => Lambda = DynamoDB was working like a charm :( |
Is everyone here using |
So I guess we'll receive service credit for this outage? This is a long time for a major outage. @brettstack Is anyone investigating what changed on AWS side? |
Minimally reproducible testcase - upload this lambda: With this invoke payload: Also reproducible locally, but using Node 8.14. Run
|
Same here with a |
We involved AWS Lambda to investigate. They are working on a fix. |
running into similar issues on local development. Have isolated it to be related to the cookie size in our case (maybe overall header size?) |
I'm now able to reproduce the error consistently After line https://github.com/awslabs/aws-serverless-express/blob/cb3b17d5fcfad911669e33433c191bb558945ed9/src/index.js#L136 It might depend on the request itself a little bit, but the result seems to be consistent with https://nodejs.org/docs/latest-v8.x/api/http.html#http_http_maxheadersize which defaults to 8KB. Most of the header size comes from Possible Errors:
|
…o limit the size of the mapped header related to CodeGenieApp#199
I get this error intermittently after switching my API Gateway's custom domain to a regional endpoint. This is to support a multi-region, latency-based routing policy. Maybe the headers are different between an edge optimized and a regional endpoint?? @zoellner I'm using your fork and it seems to fix this issue. Thanks! |
02/22/2019 aws-serverless-express@3.3.5, no serverless module used. |
Also got this error. I was able to work around it by changing my node version from v8.15 to v8.10. Not exactly the best fix, but it will allow you to get your work done. |
I've run into this with |
This is still happening to me ~ .5% of requests. Not good. Using serverless-http fixed the issue for me as well. Maybe load-related. I'm load testing using artillery:
|
Someone already tried nodejs10.x ? #234 (comment) |
Hi, sorry to up this again, I'm running a
Am I the only one concerned ? |
I try to link the dialog flow and AWS using the lambda function, but an error occurs. { |
@seeheee probably your uploaded lambda function does not include the aws-serverless-express dependency |
How do you include it? |
@seeheee how do you deploy your lambda function? |
I deploy your lambda function via AWS UI |
so probably you haven’t included node_modules/aws-serverless-express |
I don't know how to include a moduleㅠㅠ |
Create a zip of your whole app
Il giorno 29 lug 2019, alle ore 14:22, seeheee <notifications@github.com<mailto:notifications@github.com>> ha scritto:
I don't know how to include a moduleㅠㅠ
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#199>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AAIJF4VSEHHY5DCZ5V5FFFLQB3ORXANCNFSM4GKDTF4Q>.
|
any resolutions for this? I am using node 10.X and I am getting this issue as well. I am using serverless deploy to deploy the lambda function. Any suggestions? |
Same issue!! Any resolution? |
I'm seeing the same issue with node10. No code changes just move the lambda function from 8.10 to 10. 8.10 is EOL soon. Does anyone have a resolution? |
I'm seeing the same issue with node10. No code changes just move the lambda function from 8.10 to 10. 8.10 is EOL soon. Does anyone have a resolution? Thanks |
perhaps give serverless-http a try.... |
@emmanuel-omegaalexis you mentioned previously you're having issues with my fork. Can you let me know what the issue is and a snippet showing how you're calling the library? |
Hi @zoellner, I have seen others have had success with your fork so I assume it is my implementation.
I changed to serverless-http and it is working @adrai Thank you. |
i encountered this issue when running sls offline finally resolve it by installing aws cli See if it can help |
Had the same issue, for me the issue was quite a tricky one, so I hope I'll save someone a bit time, |
"aws-serverless-express": "3.2.0",
serverless@1.29.2
It working fine in yesterday.
CloudWatch log
a0c895f5-fe7c-11e8-b3ae-4f8962debec2 ERROR: aws-serverless-express connection error
1544667186190,/aws/lambda/function,2018-12-13T02:13:06.190Z a0c895f5-fe7c-11e8-b3ae-4f8962debec2 { Error: socket hang up at createHangUpError (_http_client.js:299:15) at Socket.socketOnEnd (_http_client.js:391:23) at emitNone (events.js:111:20) at Socket.emit (events.js:208:7) at endReadableNT (_stream_readable.js:1064:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickDomainCallback (internal/process/next_tick.js:218:9) code: 'ECONNRESET' }
The text was updated successfully, but these errors were encountered: