Netxcloud server gets unresponsive

Hi,

I am using the Nextcloud Version 11.0.3 which is running on apache. sometimes server gets unresponsive and disconnected. unable to find out the reason of this intermittent behavior.

Using Ubuntu 14.04 where Nextcloud is installed and also checked the server RAM and CPU details it looks fine. In LOG tab, i can see some error that i copied and pasting below.

  1. PHP Startup: Unable to load dynamic library ‘/usr/lib/php/20151012/php_ldap.dll’ - /usr/lib/php/20151012/php_ldap.dll: cannot open shared object file: No such file or directory at Unknown#0 (This error i am getting on regular basis)

  2. Sabre\DAV\Exception\BadRequest: HTTP/1.1 400 expected filesize 10000000 got 6045696 (This error comes rarely).

Kindly help me on this or let me now that is there any thing that i have need to take care of to get the Nextcloud Server 100 % up and running.

Please let me know also if you need any more info.

Hi,

Can anyone help me on this issue.

  1. Do you use LDAP? If not remove ldap from your php configuration and if you are using it you should probably fix your configuration.
  2. ownCloud has a nice summary of possible issues:

Today again Nextcloud server gets unresponsive. so i checked the apache2 logs /var/log/apache2/error.log and found below error.

[Wed May 10 11:52:41.426344 2017] [:error] [pid 27665] 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/nextcloud/lib/private/DB/Connection.php:60\nStack trace:\n#0 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect()\n#1 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion()\n#2 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform()\n#3 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(621): Doctrine\DBAL\Connection->getDatabasePlatform()\n#4 /var/www/nextcloud/lib/private/DB/Connection.php(147): Doctrine\DBAL\Connection->setTransactionIsolation(2)\n#5 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OC\DB\Connection->__construct(Array, Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Object(D in /var/www/nextcloud/lib/private/DB/Connection.php on line 60

I am unable to understand above error why it is coming. i googled and found out that it can come if php7.0-mysql module is not installed but i checked the same and it is installed there.

Really i am confused and clueless what could be the reason of this error.

your comment and help on this would be very appreciable. Thanks in advance.

If you don’t use any caching yet (redis, apcu), you should consider it in order to increase the speed of your Nextcloud (also reduces the number of SQL queries).

I am using Redis, apcu. and what do you mean by increase the speed of Nextcloud, is it related to RAM Size increase or something else. and how can we reduce the Sql queries.

Please help me on this. i am very new in Nextcloud and having limited knowledge.

When Redis and apcu are used, there are less sql queries. You already use them, so there is not possibility to improve them. The link I sent you above shows you how you can increase the number of sql connections. Increase them in steps and also keep an eye on your memory consumption.