lando / pantheon

The Official Lando Pantheon plugin.
https://docs.lando.dev/pantheon
GNU General Public License v3.0
11 stars 18 forks source link

How to set `max_allowed_packet`? #179

Closed RobertAKARobin closed 1 year ago

RobertAKARobin commented 1 year ago

I inherited a big ol' Drupal codebase that is running in Pantheon. I want to migrate it to Lando. lando init went fine. However lando start keeps failing with 403 errors. I checked lando logs and see a lot of instances of:

Aborted connection 13 to db: 'pantheon' user: 'pantheon' host: '172.19.0.4' (Got an error reading communication packets)

From Googling it sounds like the solution is to increase the max_allowed_packet setting. However, I'm not sure where to do this. Most answers reference a .cnf file but the codebase doesn't have any such files, and if this can go in the .lando.yml file it's unclear where.

Thoughts?

reynoldsalec commented 1 year ago

@RobertAKARobin I believe you can set a custom .cnf file on the database service using the instructions from the MariaDB service: https://docs.lando.dev/mariadb/config.html#using-a-custom-mariadb-config-file

So something like this should work in your .lando.yml:

services:
  database:
    config:
      database: local/path/to/my.cnf
reynoldsalec commented 1 year ago

...feel free to ping me on Slack if you have further issues: https://launchpass.com/devwithlando