Not setting max_allowed_packet in MySQL according to installation requirements can lead to PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away [#984112] | Drupal.org
Doctrine\DBAL\Exception\LockWaitTimeoutException: An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction · Issue #27695 · nextcloud/server · GitHub