【发布时间】:2021-08-26 09:05:39
【问题描述】:
我正在构建一个Google Cloud Function,它将接收来自Google PubSub 主题的消息。
在大量插入消息时,我在函数日志中看到以下错误:
('Received response with content-encoding: gzip, but failed to decode it.', error('Error -3 while decompressing data: incorrect header check')), retrying in 1 seconds...
这发生了几次不一致:
- 大多数消息不会发生
- 失败次数不一致 - 从一次到连续 40 次。
我的邮件没有经过 gzip 压缩,并且其中没有“Content-Encoding”属性。
我的函数代码没有执行,这发生在 gcp 函数后端,然后才到达我的函数代码。
该功能确实有效并且消息已执行,但我想调查为什么会出现此问题。
问题
- 此问题的原因可能是什么?
- 我该如何解决?
【问题讨论】:
-
为了帮助您,请遵循本指南:stackoverflow.com/help/minimal-reproducible-example
标签: google-cloud-platform google-cloud-functions google-cloud-pubsub