Nextcloud really SLOW

Hello My nextcloud is really sllow, when i reboot its OK but after some minutes start going badly, website sometimes stop working and start, and website is loading really slow so the client users have issues to sync files.

24Ghz of CPU in vmware
64 GB of RAM
2.5 TB drive hdd

Nextcloud and database all inside same vm.

current users: 100
1.5 tb of data
Nextcloud version : 16.04
Operating system and version: Centos 7/WHM cPanel
Apache or nginx version (eg, Apache 2.4.25) : Apache
PHP version : 7.2

OPCACHE Parameters

[opcache.enable=1
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=20000
opcache.memory_consumption=128
opcache.save_comments=1
opcache.revalidate_freq=1
]

PHP Process:

mybwr41afr 0 70.83% 0.05 php-fpm: pool XXXXXX
mybwr41afr 0 66.98% 0.05 php-fpm: pool XXXXXX

Don’t know what to do, wish someone can help me.

PHP Error logs:

[03-Nov-2018 16:31:58 UTC] PHP Fatal error:  Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [2002] No such file or directory in /home/mybwr41afr/public_html/lib/private/DB/Connection.php:64
Stack trace:
#0 /home/mybwr41afr/public_html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect()
#1 /home/mybwr41afr/public_html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion()
#2 /home/mybwr41afr/public_html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform()
#3 /home/mybwr41afr/public_html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): Doctrine\DBAL\Connection->getDatabasePlatform()

Best regards,

Hi @Albert1 , have you tried php-fpm and redis ? Server tuning — Nextcloud latest Administration Manual latest documentation

maybe reinstall php-mysql can help you

That version is not supported any more.

I hope you have redis installed. It takes a lot of load from your database for all the file locking operations.

Checkout why you can’t connect to the database, not enough connections, did the database crash, is it eating up all resources, … did you optimize the cache settings for the database. It looks like after start, some resources get eaten up pretty quickly.

After that, for NC 21 there is a new notify_push implementation that is much faster.

1 Like

Hello!

Thank you everybody for post here, I will try to schedule and make update to latest version.

I fixed modifying the next parameters:

/opt/cpanel/ea-php72/root/etc/php-fpm.d/XXXXXX.com.conf

pm.max_children = 1648
pm.max_requests = 412
pm.max_spare_servers = 412
pm.min_spare_servers = 1236
pm.process_idle_timeout = 600
pm.start_servers = 412

I will check all paramenters shared by tflidd so i can continue improving

2 Likes