我们有一个NodeJS 10.16.3 Express API。我们最近从AWS Elastic BeanstalkEC2切换到Lambda Serverless。我们的DB是Postgres(PostgreSQL)12.2。
似乎突然间,当我从客户端发出请求时,我的本地服务器上开始出现这个错误。
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
我似乎找不到什么关于这个问题的资料,希望有人能帮忙。
注释:我的本地postgres正在运行。
发现了错误。希望这对其他人有帮助。
这个错误是由于在应用程序请求头中超过了4096字节的最大cookie大小。我们通过剥离错误的cookie来解决它,这些cookie是通过我们使用的一些第三方服务传递的,这些服务的cookie值有很长的编码字符串。