aws-serverless-express connection error - EPIPE

别来无恙 提交于 2020-06-27 03:55:10

问题


We have a NodeJS 10.16.3 Express API. We've recently switched from AWS Elastic Beanstalk/EC2 to Lambda / Serverless. Our DB is Postgres (PostgreSQL) 12.2.

It seemed all of a sudden I started getting this error on my local server when making requests from the client:

offline: ANY /dev/inventory/inventory (λ: app)
ERROR: aws-serverless-express connection error
{ Error: write EPIPE
    at WriteWrap.afterWrite (net.js:788:14) errno: 'EPIPE', code: 'EPIPE', syscall: 'write' }
offline: (λ: app) RequestId: ckazracm0001emds69068drtu  Duration: 2.58 ms  Billed Duration: 100 ms

I can't seem to find much on this issue and I'm hoping someone can help.

Notes:

  • My local postgres is running
  • My .env.json file is correct

回答1:


Found the error. Hopefully this will be helpful for others.

The error was due to exceeding the max cookie size of 4096 bytes in the application request headers. We solved it by stripping out erroneous cookies that were passed through some 3rd party services we were using, which has long encoded strings for cookie values.



来源:https://stackoverflow.com/questions/62181587/aws-serverless-express-connection-error-epipe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!