【问题标题】:Aborted connection to db. Got an error reading communication packets中止与数据库的连接。读取通信数据包时出错
【发布时间】:2019-07-29 20:32:35
【问题描述】:

在 Google Cloud SQL 实例的日志中,当向数据库发出某些请求时,我们会收到错误消息。我们使用 Laravel 5.8 和第二代 MySQL 实例。

增加max_allowed_packet 没有帮助。

Aborted connection 436828 to db: 'xxx' user: 'xxx' host: cloudsqlproxy~xx.xx.xx.xx' (Got an error reading communication packets)

【问题讨论】:

    标签: laravel database-connection google-cloud-sql


    【解决方案1】:

    一般来说,"Aborted connection nnnn to db:" 消息在existing connection is terminated improperly 时触发。大多数中止连接的发生是由于服务器和客户端之间的连接关闭不干净或网络问题以及here 所述的其他原因。

    为了缓解这个问题,我建议您关注best practices for managing Cloud SQL connections 同情Connection poolOpening and closing connections 部分。

    【讨论】:

      猜你喜欢
      • 2020-02-04
      • 2011-06-26
      • 1970-01-01
      • 2022-10-05
      • 1970-01-01
      • 2019-09-17
      • 1970-01-01
      • 1970-01-01
      • 2014-11-06
      相关资源
      最近更新 更多