Avoiding “MySQL server has gone away” on infrequently used Python / Flask server with SQLAlchemy

后端 未结 7 893
别跟我提以往
别跟我提以往 2020-12-07 11:15

How can Flask / SQLAlchemy be configured to create a new database connection if one is not present?

I have an infrequently visited Python / Flask server which uses S

相关标签:
7条回答
  • 2020-12-07 11:41

    When I encountered this error I was storing a LONGBLOB / LargeBinary image ~1MB in size. I had to adjust the max_allowed_packet config setting in MySQL.

    I used mysqld --max-allowed-packet=16M

    0 讨论(0)
提交回复
热议问题