LDAP connection failure while upgrading from 20 -> 21

Nextcloud version: 20.0.1-apache, upgrading to 21.0.11-apache (both official docker images)
Operating system and version: CentOS 7 Host, docker images are official (debian?)
Apache or nginx version: Apache 2.4.38 (from docker image)
PHP version: 7.4.19 (from docker image)

My issue:

Updating from nextcloud 20 to 21 gets part-way through the upgrade process, before failing and remaining in maintenence mode, with an error about losing connection to my LDAP server:

www-data@6938a17f779a:~/html$ ./occ upgrade -v
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
2021-08-05T21:37:05+00:00 Setting log level to debug
2021-08-05T21:37:05+00:00 Repair step: Repair MySQL collation
2021-08-05T21:37:05+00:00 Repair info: All tables already have the correct collation -> nothing to do
2021-08-05T21:37:05+00:00 Repair step: Repair SQLite autoincrement
2021-08-05T21:37:05+00:00 Repair step: Copy data from accounts table when migrating from ownCloud
2021-08-05T21:37:05+00:00 Repair step: Drop account terms table when migrating from ownCloud
2021-08-05T21:37:05+00:00 Updating database schema
2021-08-05T21:37:05+00:00 Updated database
2021-08-05T21:37:05+00:00 Updating <accessibility> ...
2021-08-05T21:37:05+00:00 Repair step: Migrate old user config
2021-08-05T21:37:05+00:00 Migrate old user config
2021-08-05T21:37:05+00:00
2021-08-05T21:37:05+00:00  Starting ...
    0/0 [>-]   0%2021-08-05T21:37:05+00:00 OC\ServerNotAvailableException: Lost connection to LDAP server.
2021-08-05T21:37:05+00:00 Update failed
2021-08-05T21:37:05+00:00 Maintenance mode is kept active
2021-08-05T21:37:05+00:00 Resetting log level

I’m at something of a loss on how to fix this. I’m not able to find anything of note and the OCC tool doesn’t give me any particularly useful information. I’ve spent a while digging around on the internet and haven’t found anything either. I snapshotted my system before upgrading, and I can definitely confirm that the system can access my LDAP, as I’m able to log in. Any guidance at all, even just links to relevant information, would be greatly appreciated!

Is this the first time you’ve seen this error? (Y/N):Y

Steps to replicate it:

  1. Pull latest 21.0.11-apache docker image
  2. enter a shell as www-user in the docker container
  3. run ./occ upgrade

The output of your Nextcloud log in Admin > Logging:
Stuck in maintenence mode, can’t access logging

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'mysql',
  'version' => '20.0.1.1',
  'dbname' => 'REDACTED',
  'dbhost' => 'REDACTED',
  'dbtableprefix' => 'REDACTED',
  'dbuser' => 'REDACTED',
  'dbpassword' => 'REDACTED',
  'installed' => true,
  'ldapIgnoreNamingRules' => false,
  'loglevel' => 0,
  'mail_smtpmode' => 'smtp',
  'mail_smtphost' => 'REDACTED',
  'instanceid' => 'REDACTED',
  'maintenance' => true,
  'forcessl' => true,
  'trusted_domains' =>
  array (
    0 => 'REDACTED',
  ),
  'secret' => 'REDACTED',
  'share_folder' => '/Shared',
  'singleuser' => false,
  'mail_smtpport' => 'REDACTED',
  'mail_from_address' => 'REDACTED',
  'mail_domain' => 'REDACTED',
  'trashbin_retention_obligation' => 'auto, 1',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'filelocking.enabled' => 'true',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => 'redis',
    'port' => 6379,
    'timeout' => 0,
  ),
  'updater.release.channel' => 'stable',
  'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory',
  'overwrite.cli.url' => 'REDACTED',
  'overwriteprotocol' => 'https',
  'data-fingerprint' => 'REDACTED',
  'upload_max_filesize' => '2048M',
  'post_max_size' => '2048M',
  'htaccess.RewriteBase' => '/',
  'mysql.utf8mb4' => true,
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 =>
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
);

I initially misread the field, and thought this was meant to be my php.ini. Edited to include as much of my config.php that I feel comfortable sharing.

The output of your Apache/nginx/system log in /var/log/____:
Not sure where this is in the docker container.

I’d be glad to provide any extra information requested, and thanks in advance!