Problem/Motivation
I've been setting up a hobby site using Drupal CMS on cheap shared hosting which has composer and SSH access (using Hostinger). I ran into a problem because the hosts default wait_timeout on database connections is 20 seconds. This meant I was unable to install any modules or run updates from Drupal.org because the DB connection is dropped while we're off doing composer commands. When the kernel terminates we crash because the DB connection is gone and we're unable to release the locks.
Steps to reproduce
Set wait_timeout to a short time and try to use package manager.
Proposed resolution
A few thoughts:
- Should we have a warning or error on system status if we find this to be short?
- Can we implement a re-connection - ala #3494917: Database ping, close, and reconnect capabilities - these timeouts are problematic for more than just package manager
- Could package manager issue SQL commands to increase the timeout (not sure I like this solution because it is likely to be DB dependent).
Remaining tasks
User interface changes
TBD
Introduced terminology
API changes
TBD
Data model changes
TBD
Release notes snippet
Issue fork drupal-3511967
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
alexpottI worked around the problem by adding
to settings.php but I don't think the target audience is going to find that an easy solution.
Comment #3
phenaproximaIs the wait_timeout stuff standard to all database types supported by core? If so, I don't think I see any problem with Package Manager sending those commands when the kernel boots up.
Comment #4
pameeela commentedComment #5
phenaproxima