Good evening,
i tried using mailcow + NextCloud using WebDAV for syncing my DEVINthink-Databases.
All Databeses have different sizes e.g. the larges one is about 10GB.
Within DEVONthik i set up NextCloud as a WebDAV-Server and started syncing.
After a fex seconds syncing stop and only a restart of DEVONthink restarts syncing.
Looking into php-pfm logs shows this:
php-fpm-mailcow_1 | 2018-07-06T16:29:06.895007636Z fd4d:6169:6c63:6f77::1 - dt 06/Jul/2018:18:29:06 +0200 "GET /remote.php" 200
php-fpm-mailcow_1 | 2018-07-06T16:29:07.954300293Z 172.22.1.10 - dt 06/Jul/2018:18:29:06 +0200 "PUT /remote.php" 201
php-fpm-mailcow_1 | 2018-07-06T16:29:08.769225882Z [06-Jul-2018 18:29:08] WARNING: [pool web-worker] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 0 idle, and 9 total children
php-fpm-mailcow_1 | 2018-07-06T16:29:08.883748222Z 172.22.1.10 - dt 06/Jul/2018:18:29:08 +0200 "PUT /remote.php" 201
php-fpm-mailcow_1 | 2018-07-06T16:29:09.770854579Z [06-Jul-2018 18:29:09] WARNING: [pool web-worker] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 16 children, there are 0 idle, and 11 total children
php-fpm-mailcow_1 | 2018-07-06T16:29:10.771977115Z [06-Jul-2018 18:29:10] WARNING: [pool web-worker] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 0 idle, and 13 total children
php-fpm-mailcow_1 | 2018-07-06T16:29:10.810359549Z 172.22.1.10 - dt 06/Jul/2018:18:29:10 +0200 "GET /remote.php" 200
php-fpm-mailcow_1 | 2018-07-06T16:29:10.836420612Z fd4d:6169:6c63:6f77::1 - dt 06/Jul/2018:18:29:10 +0200 "GET /remote.php" 200
php-fpm-mailcow_1 | 2018-07-06T16:29:11.772228771Z [06-Jul-2018 18:29:11] WARNING: [pool web-worker] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 0 idle, and 15 total children
php-fpm-mailcow_1 | 2018-07-06T16:29:12.773919309Z [06-Jul-2018 18:29:12] WARNING: [pool web-worker] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 1 idle, and 17 total children
php-fpm-mailcow_1 | 2018-07-06T16:29:17.754848999Z fd4d:6169:6c63:6f77::1 - dt 06/Jul/2018:18:29:06 +0200 "PUT /remote.php" 201
php-fpm-mailcow_1 | 2018-07-06T16:29:17.955004144Z 172.22.1.10 - dt 06/Jul/2018:18:29:17 +0200 "GET /remote.php" 200
php-fpm-mailcow_1 | 2018-07-06T16:29:30.379984307Z 172.22.1.10 - dt 06/Jul/2018:18:29:06 +0200 "PUT /remote.php" 201
How can i solve this?
Any help is appreciated.
Regards
The file you wanna edit is data/conf/phpfpm/php-fpm.d/pools.conf:
I think you need the web-worker section. You probably need to increase min_spare_servers and max_spare_servers. If you have enough RAM, you can be quite liberal with those. Also if you're expecting sudden bursts, it might help to increase start_servers as well.
After editing a docker-compose restart php-fpm-mailcow should suffice.
Updated my previous message: https://github.com/mailcow/mailcow-dockerized/issues/1549#issuecomment-403085292
Ok, thanks :-)
I'll give it a try.
My server has about 32GB RAM so do you have any suggestions about setting values?
i changed values and got this messages:
php-fpm-mailcow_1 | 2018-07-06T17:20:46.639673638Z [06-Jul-2018 19:20:46] ALERT: [pool web-worker] pm.min_spare_servers(2000) and pm.max_spare_servers(40000) cannot be greater than pm.max_children(50)
php-fpm-mailcow_1 | 2018-07-06T17:20:46.639697946Z [06-Jul-2018 19:20:46] ALERT: [pool web-worker] pm.min_spare_servers(2000) and pm.max_spare_servers(40000) cannot be greater than pm.max_children(50)
php-fpm-mailcow_1 | 2018-07-06T17:20:46.639700946Z [06-Jul-2018 19:20:46] ERROR: failed to post process the configuration
php-fpm-mailcow_1 | 2018-07-06T17:20:46.639703136Z [06-Jul-2018 19:20:46] ERROR: failed to post process the configuration
php-fpm-mailcow_1 | 2018-07-06T17:20:46.639705165Z [06-Jul-2018 19:20:46] ERROR: FPM initialization failed
php-fpm-mailcow_1 | 2018-07-06T17:20:46.639707180Z [06-Jul-2018 19:20:46] ERROR: FPM initialization failed
Probably something like:
pm.max_children = 100
pm.start_servers = 20
pm.min_spare_servers = 10
pm.max_spare_servers = 40
The default really aims to keep memory usage as low as possible without degrading performance too much.
Edit: hahah, yeah you went a little overboard with those settings! Try applying mine and see how it goes.
i changed values over again and set the following:
[web-worker]
user = www-data
group = www-data
pm = dynamic
pm.max_children = 40000
pm.start_servers = 2000
pm.min_spare_servers = 2000
pm.max_spare_servers = 40000
listen = [::]:9002
access.log = /proc/self/fd/2
clear_env = no
catch_workers_output = yes
php_admin_value[memory_limit] = 256M
php_admin_value[max_execution_time] = 1200
php_admin_value[max_input_time] = 1200
... an restarted php-fpm.
At the moment there are no errors and synchronisation work like a charm.
Actual memory usage is about 7.2G/31.2G
Try my settings above: https://github.com/mailcow/mailcow-dockerized/issues/1549#issuecomment-403097717
You should always keep pm.max_children below your usable free RAM divided by php_admin_value[memory_limit], so in my example with 100 it would go to around 25GB max RAM use.
@hachre
I changed all values to your suggestions and everything works fine :-)
Thanks for your help 馃憤
Thanks @hachre
Most helpful comment
Thanks @hachre