Lost connection to LDAP Server AD User couldn´t login/ Slow Perfromnce/WebDAv Error

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:


Or for longer, use three backticks above and below the code snippet:


Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 12.0.2): 14.0.6
Operating system and version (eg, Ubuntu 17.04): Debian 9.7
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.25
PHP version (eg, 7.1): 7.0.30

The issue you are facing:

LDAP User can´t login. The Server performance is very poor since the error occured.
sudo -u www-data php occ ldap:test-config s01
The configuration is valid and the connection could be established!

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

The output of your Nextcloud log in Admin > Logging:

Error no app in context OC\ServerNotAvailableException: Lost connection to LDAP server.
Fatal webdav Sabre\DAV\Exception\ServiceUnavailable: OC\ServerNotAvailableException: Lost connection to LDAP server.

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

$CONFIG = array (
  'instanceid' => 'xxx',
  'passwordsalt' => ,
  'secret' => ,
  'trusted_domains' =>
  array (
    0 => 'domain',
  'trusted_proxies' =>
  array (
    0 => 'domain',
  'forwarded_for_headers' =>
  array (
  'datadirectory' => 'data',
  'overwrite.cli.url' => 'xxx',
  'dbtype' => 'mysql',
  'version' => '',
  'dbname' => 'db',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => ,
  'dbpassword' => ,
  'logtimezone' => 'UTC',
  'installed' => true,
  'loglevel' => 2,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory',
  'maintenance' => false,
  'mail_smtpmode' => 'smtp',
  'appstore.experimental.enabled' => true,
  'mail_from_address' => '',
  'mail_domain' => '',
  'mail_smtphost' => '',
  'auth.bruteforce.protection.enabled' => false,
  'mail_smtpport' => '25',
  'updater.release.channel' => 'production',
  'theme' => '',

The output of your Apache/nginx/system log in /var/log/____:

Mon Feb 18 13:53:02.280527 2019] [:error] [pid 2196] [] PHP Fatal error:  Uncaught Doctrine\\DBAL\\DBALException: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [1040] Too many connections in /var/www/html/nextcloud-14.0.6/lib/private/DB/Connection.php:64\nStack trace:\n#0 /var/www/html/nextcloud-14.0.6/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\\DB\\Connection->connect()\n#1 /var/www/html/nextcloud-14.0.6/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\\DBAL\\Connection->getDatabasePlatformVersion()\n#2 /var/www/html/nextcloud-14.0.6/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\\DBAL\\Connection->detectDatabasePlatform()\n#3 /var/www/html/nextcloud-14.0.6/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): Doctrine\\DBAL\\Connection->getDatabasePlatform()\n#4 /var/www/html/nextcloud-14.0.6/lib/private/DB/Connection.php(151): Doctrine\\DBAL\\Connection->setTransactionIsolation(2)\n#5 /var/www/html/nextcloud-14.0.6/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OC\\DB\\C in /var/www/html/nextcloud-14.0.6/lib/private/DB/Connection.php on line 64