Nextcloud stopped working - WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 16 children, there are 0 idle, and 7 total children

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:

example

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

longer
example
here

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, 20.0.5): 20.0.7
Operating system and version (eg, Ubuntu 20.04): Linux 5.10.28-Unraid x86_64
Apache or nginx version (eg, Apache 2.4.25): nginx/1.20.2 (fpm-fcgi)
PHP version (eg, 7.4): 7.4.26

The issue you are facing:
My windows 10 machine stops updating now. When I check the logs located on appdata\nextcloud\log\php\error.log I get the following info:

[12-Dec-2021 02:00:01] NOTICE: fpm is running, pid 2027
[12-Dec-2021 02:00:01] NOTICE: ready to handle connections
[13-Dec-2021 01:00:32] NOTICE: Terminating …
[13-Dec-2021 01:00:32] NOTICE: exiting, bye-bye!
[13-Dec-2021 01:03:42] NOTICE: fpm is running, pid 394
[13-Dec-2021 01:03:42] NOTICE: ready to handle connections
[13-Dec-2021 03:00:11] NOTICE: Terminating …
[13-Dec-2021 03:00:11] NOTICE: exiting, bye-bye!
[14-Dec-2021 11:37:01] NOTICE: fpm is running, pid 405
[14-Dec-2021 11:37:01] NOTICE: ready to handle connections
[14-Dec-2021 11:52:25] NOTICE: Terminating …
[14-Dec-2021 11:52:25] NOTICE: exiting, bye-bye!
[14-Dec-2021 11:52:51] NOTICE: fpm is running, pid 403
[14-Dec-2021 11:52:51] NOTICE: ready to handle connections
[14-Dec-2021 13:54:31] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 0 idle, and 6 total children
[14-Dec-2021 13:54:32] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 16 children, there are 0 idle, and 7 total children
[14-Dec-2021 14:26:13] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 0 idle, and 6 total children
[15-Dec-2021 10:32:04] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 0 idle, and 6 total children
[15-Dec-2021 10:32:18] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 0 idle, and 6 total children

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

Steps to replicate it:

  1. Open Nextcloud

The output of your Nextcloud log in Admin > Logging:


{"reqId":"jNDBK1N7vaDss94Uk2nK","level":4,"time":"2021-12-13T09:00:08+00:00","remoteAddr":"47.221.239.108","user":"shendrix","app":"webdav","method":"PROPFIND","url":"/remote.php/dav/files/shendrix/","message":{"Exception":"Sabre\\DAV\\Exception\\ServiceUnavailable","Message":"Doctrine\\DBAL\\Exception\\DriverException: An exception occurred while executing 'SELECT `id`, `numeric_id`, `available`, `last_checked` FROM `oc_storages` WHERE `id` = ?' with params [\"home::shendrix\"]:\n\nSQLSTATE[HY000]: General error: 2006 MySQL server has gone away","Code":0,"Trace":[{"file":"/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Auth/Plugin.php","line":192,"function":"check","class":"OCA\\DAV\\Connector\\Sabre\\Auth","type":"->"},{"file":"/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Auth/Plugin.php","line":144,"function":"check","class":"Sabre\\DAV\\Auth\\Plugin","type":"->"},{"file":"/config/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"beforeMethod","class":"Sabre\\DAV\\Auth\\Plugin","type":"->"},{"file":"/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":458,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":251,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":319,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/config/www/nextcloud/apps/dav/lib/Server.php","line":332,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/config/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/config/www/nextcloud/remote.php","line":167,"args":["/config/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/config/www/nextcloud/apps/dav/lib/Connector/Sabre/Auth.php","Line":163,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows) mirall/3.4.0stable-Win64 (build 20211129) (Nextcloud, windows-10.0.19044 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"20.0.7.1"}
{"reqId":"2VIfjCWjZvguZPA1LK97","level":2,"time":"2021-12-14T15:11:27+00:00","remoteAddr":"71.14.139.183","user":"--","app":"no app in context","method":"POST","url":"/login","message":"Login failed: xxxxx (Remote IP: xx.xx.xxx.xxx)","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36 Edg/96.0.1054.53","version":"20.0.7.1"}

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

<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'datadirectory' => '/data',
  'instanceid' => 'xxxxxx',
  'passwordsalt' => 'xxx/xxx/xxx',
  'secret' => 'xxxxxx',
  'trusted_domains' => 
  array (
    0 => '192.168.1.xx:444',
    1 => 'nextcloud.xxxxxx.com',
  ),
  'dbtype' => 'mysql',
  'version' => '20.0.7.1',
  'overwrite.cli.url' => 'https://nextcloud.xxxxxx.com',
  'overwritehost' => 'nextcloud.xxxxxx.com',
  'overwriteprotocol' => 'https',
  'dbname' => 'nextcloud',
  'dbhost' => '192.168.1.xx:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'xxxxxx',
  'dbpassword' => 'xxxxxx',
  'installed' => true,
  'maintenance' => false,
);

copied from \appdata\nextcloud\www\nextcloud\config\config.php

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

2021/12/13 03:00:08 [error] 415#415: *1781 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Class 'OCA\DAV\Connector\Sabre\ExceptionLoggerPlugin' not found in /config/www/nextcloud/remote.php:61
Stack trace:
#0 /config/www/nextcloud/remote.php(169): handleException()
#1 {main}
  thrown in /config/www/nextcloud/remote.php on line 61" while reading response header from upstream, client: 71.14.139.183, server: _, request: "PROPFIND /remote.php/dav/files/xxxxxx/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "nextcloud.xxxxxx.com"
2021/12/14 11:37:23 [error] 431#431: *109 upstream prematurely closed FastCGI request while reading upstream, client: xx.xxx.xxx.xxx, server: _, request: "GET /remote.php/dav/files/shendrix/Desktop/iPipeline%20Template.txt HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "nextcloud.xxxxxx.com"
2021/12/14 11:38:06 [error] 431#431: *354 upstream prematurely closed FastCGI request while reading upstream, client: xx.xxx.xxx.xxx, server: _, request: "GET /remote.php/dav/files/shendrix/Desktop/iPipeline%20Template.txt HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "nextcloud.xxxxxx.com"
2021/12/14 11:53:55 [error] 429#429: *77 upstream prematurely closed FastCGI request while reading upstream, client: xx.xxx.xxx.xxx, server: _, request: "GET /remote.php/dav/files/shendrix/Desktop/iPipeline%20Template.txt HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "nextcloud.xxxxxx.com"
2021/12/14 12:45:46 [error] 429#429: *1427 upstream prematurely closed FastCGI request while reading upstream, client: xx.xxx.xxx.xxx, server: _, request: "GET /remote.php/dav/files/shendrix/Desktop/iPipeline%20Template.txt HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "nextcloud.xxxxxx.com"
2021/12/14 13:55:36 [error] 429#429: *10246 upstream prematurely closed FastCGI request while reading upstream, client: xx.xxx.xxx.xxx, server: _, request: "GET /remote.php/dav/files/shendrix/Desktop/iPipeline%20Template.txt HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "nextcloud.xxxxxx.com"
2021/12/14 19:55:51 [error] 429#429: *20107 upstream prematurely closed FastCGI request while reading upstream, client: xx.xxx.xxx.xxx, server: _, request: "GET /remote.php/dav/files/shendrix/Desktop/iPipeline%20Template.txt HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "nextcloud.xxxxxx.com"

copied from \appdata\nextcloud\log\nginx\error.log


Well, with the fpm connection errors:

  • too many clients try to connect, there are not enough server children (new/more users/devices)
  • normal processes take much longer than usual so it blocks current processes (updates, more/different apps, …)

Question is a bit, how you ended up there in order to say what scenario is more likely. You can always increase the children that can spawn, if it is the second case you just end up using all the server’s resources.

On the long term, this is very interesting to reduce the resources and increase speed:
https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/caching_configuration.html

Im not sure if it’s related only to my user account or all user accounts.

Here’s my scenario. I have nextcloud on my iPhone to backup my photos. I used it on at least 4 computers to sync data. It worked on 3-4 and the 5th one gave me an error about max_children being too low. I could never resolve that so I didn’t get it to work on my 5th PC. It was working on this PC and then just stopped all of a sudden a few weeks ago and gave me the error I have listed on this topic.

I have 3 other users that have it on single PCs with no problems. My wife is one of the 3 other users and also has it on her iPhone with no problems. That’s the situation scenario so far.

Anything else I can answer to assist please let me know. Thank you.

Yes, it’s possible that now there are just too many parallel connctions and you need to raise the limit slowly. 16 wasn that bad. What kind of system are you using?

I have a Dell R720 with dual Xeon e5-2697 v2 @ 2.70GHz 128GB DDR3 and four 1GB Nic using unraid.

How do I raise the limit? (Sorry newb at this).

Oh, really not bad.

check out the php-fpm configuration files, there you can change the limits.

I have been researching this for hours and I am at a stand still. Can you help me with this? I’m using Nextcloud on unraid in a docker. Where do I find the php-fpm configuration files? Thanks so much.

I don’t use docker at all. On a default linux, I’d expect it to be in /etc/php*/fpm, /etc/php-fpm/* /etc/php-fpm.d or something similar. With locate or find you have tools to search for files as well. Perhaps there are similar structures within the containers, if you put a php file with
<?php phpinfo(); ?>
it should show you the location of the configuration file.

I believe I have found where I need to update my PHP-FPM.conf. I have a file called www2.conf inside the Docker containers it says this:

; Edit this file to override www.conf and php-fpm.conf directives and restart the container

; Pool name
[www]


What do I put below that in order to correct my issue? Thanks so much.