aws-serverless-express连接错误-EPIPE [英] aws-serverless-express connection error - EPIPE
问题描述
我们有一个NodeJS 10.16.3 Express API.我们最近已从AWS Elastic Beanstalk/EC2切换到Lambda/Serverless.我们的数据库是Postgres(PostgreSQL)12.2.
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.
注意:
- 我的本地postgres正在运行
- 我的.env.json文件正确
推荐答案
发现了错误.希望这对其他人有帮助.
Found the error. Hopefully this will be helpful for others.
该错误是由于超出了应用程序请求标头中的4096个字节的最大cookie大小所致.我们通过去除错误的Cookie来解决此问题,这些错误的Cookie是通过我们正在使用的某些第三方服务传递的,该服务具有用于cookie值的长编码字符串.
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.
这篇关于aws-serverless-express连接错误-EPIPE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!