Nextcloud service crashes when downloading files at low speed

Install: docker → NC, nginx, redis
Version NC 29.0.8 and 30.0.8
Problem: Nextcloud service crashes when downloading files at low speed.
If I force a low speed, for example 512 kbps, I get the following errors:

Nextcloud:
BadRequest
The expected file size is 1621287 bytes, but 73728 bytes were read and written to storage from the Nextcloud app client. This could be due to a transmission error on the sender’s side or a problem with the storage subsystem on the server side.

Nginx: timeout. nextcloud container unavailable:9000
In the browser I get: ‘504 Gateway Timeout’

At the same time, the download continues and if you wait until it finishes, the service will rise.
At the same time, at the time of slow loading, other clients receive error 504.

With fast loading, the service does not crash.

According to the settings:
nginx standard NGINX configuration — Nextcloud latest Administration Manual latest documentation

Nextcloud basically has everything by default.

Noticed the docker logs warning:
WARNING: [pool www] server reached pm.max_children setting (5), consider raising it

Solution to the problem of increasing php parameters:
pm.max_children
pm.start_servers
pm.min_spare_servers
pm.max_spare_servers

Parameters installation calculator PHP-FPM Process Caluculator

Docker configuration file forwarding:

volumes:

  • /etc/php8/nextcloud/www.conf:/usr/local/etc/php-fpm.d/www.conf
1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.