Closed afzl-wtu closed 4 months ago
I don't think this is a bug but rather a setup issue; example: in your htop screenshots we can see your system hang on smbd
daemon or mount.ntfs
(the D
letter) telling that your system is I/O waiting (and blocking) your other requests.
Also, if you download manager exhausts server connection slots (either kernel or apache) other connection will wait (and block) until other are freed.
There is nothing server component can do about that IMO.
I don't think this is a bug but rather a setup issue; example: in your htop screenshots we can see your system hang on
smbd
daemon ormount.ntfs
(theD
letter) telling that your system is I/O waiting (and blocking) your other requests.Also, if you download manager exhausts server connection slots (either kernel or apache) other connection will wait (and block) until other are freed.
There is nothing server component can do about that IMO.
LOL I mentioned other person post a year ago in the link above. But issue is still there. That is why I created this issue and as a refernce I mentioned his post too.
My answer stills. This is not a Nextcloud issue, but a server/setup issue.
LOL I mentioned other person post a year ago in the link above. But issue is still there. That is why I created this issue and as a refernce I mentioned his post too.
Well, you referenced that other person's post as if it might be your own + it has more readily actionable information in it than your report so that's what we have to go on. :)
I saw you provided a recent Nextcloud log (thanks). What was a specific time window where you saw this behavior? This will help identify which log entries might be relevant (since it's over a week's worth of entries and many no doubt irrelevant).
I'd also be interested in:
From what I did gather from a quick glance: you're using multiple External Storage mounts of various types. Were some/all of the source folders(s) for these download transactions located on mounts provisioned through External Storage?
Memory limit in Nextcloud web ui is 1024 MB. I do not know why only in logs I provide to you it reports 0 Byte.
Because your CLI-mode PHP configuration is not setup properly for Nextcloud. PHP has a dedicated php.ini
(or loaded config directory) for each run mode (e.g. cli, apache, fpm). Presumably your FPM one is set to 1024, but not the others.
LOL I mentioned other person post a year ago in the link above. But issue is still there. That is why I created this issue and as a refernce I mentioned his post too.
Well, you referenced that other person's post as if it might be your own + it has more readily actionable information in it than your report so that's what we have to go on. :)
I saw you provided a recent Nextcloud log (thanks). What was a specific time window where you saw this behavior? This will help identify which log entries might be relevant (since it's over a week's worth of entries and many no doubt irrelevant).
I'd also be interested in:
- your FPM logs (during the time this behavior occurs)
- your Caddy logs (also only during the time this behavior occurs)
- htop or similar output (same)
From what I did gather from a quick glance: you're using multiple External Storage mounts of various types. Were some/all of the source folders(s) for these download transactions located on mounts provisioned through External Storage?
Memory limit in Nextcloud web ui is 1024 MB. I do not know why only in logs I provide to you it reports 0 Byte.
Because your CLI-mode PHP configuration is not setup properly for Nextcloud. PHP has a dedicated
php.ini
(or loaded config directory) for each run mode (e.g. cli, apache, fpm). Presumably your FPM one is set to 1024, but not the others.
PHP FPM log when error occurs:
WARNING: [pool www] server reached pm.max_children setting (5), consider raising it
And Caddy log when error happens:
{"level":"error","ts":1691751556.7215335,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","upstream":"127.0.0.1:9000","duration":9.865105177,"request":{"remote_ip":"138.2.138.227","remote_port":"39724","client_ip":"138.2.138.227","proto":"HTTP/1.1","method":"GET","host":"nc.afzal.website","uri":"/remote.php?downloadStartSecret=xmo3ir904","headers":{"Cookie":[],"Range":["bytes=638460174-658932226"],"Accept-Encoding":["gzip, deflate, br"],"X-Forwarded-For":["138.2.138.227"],"X-Forwarded-Proto":["https"],"X-Forwarded-Host":["nc.afzal.website"],"User-Agent":["Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36"]},"tls":{"resumed":false,"version":772,"cipher_suite":4865,"proto":"","server_name":"nc.afzal.website"}},"error":"writing: write tcp 10.0.0.10:443->138.2.138.227:39724: write: broken pipe"}
WARNING: [pool www] server reached pm.max_children setting (5), consider raising it
Moving to the docker repo
WARNING: [pool www] server reached pm.max_children setting (5), consider raising it
See #1982, #1977, and others.
Unfortunately PHP's own default for this parameter remains extremely low to do this day (although I understand why changing the default isn't desirable since it could cause problems in environments relying on the current default). See:
At the moment, the community Docker NC image has taken the approach of trying to expose the pm
parameters in a semi-standard way upstream (in the official PHP Docker image used as the base for this image in this repository). The alternative of creating a new NC Docker image specific way of adjusting a PHP parameter isn't as preferable. Unfortunately, so far, it's been rejected upstream - i.e. https://github.com/docker-library/php/pull/1328
Fortunately, all pm
settings can be overridden and set to an appropriate parameter for your local environment. See the above referenced issues, check the Nextcloud Help Forum, and do some search engine checks. It's fairly routine FPM parameter optimizing (and there are several other relevant pm
parameters that often make sense in various environments.)
Memory limit in Nextcloud web ui is 1024 MB. I do not know why only in logs I provide to you it reports 0 Byte.
If you're using the community Docker image this memory matter shouldn't be happening. Can you provide your Docker Compose file and, specifically, where you've overriden PHP_MEMORY_LIMIT
to be 1024M?
See #1982, #1977, and others.
Thanks I already had fixed pm issue on my local instance by searching above issues in this repo.
If you're using the community Docker image this memory matter shouldn't be happening. Can you provide your Docker Compose file and, specifically, where you've overriden
PHP_MEMORY_LIMIT
to be 1024M? Here is my docker compose file:version: "3" services: app: container_name: nextcloud network_mode: host restart: always image: nextcloud:fpm-alpine volumes: # - ./data:/var/www/html/data # - ./config:/var/www/html/config # - ./themes:/var/www/html/themes - ./web:/var/www/html - '/home/ubuntu/Downloads:/@Downloads' - '/home/ubuntu/@OneDrive/Rclone/OneDrive:/@OneDrive/Root' - '/home/ubuntu/@OneDrive/Rclone/Chunker:/@OneDrive/Chunker' - '/home/ubuntu/@OneDrive/Encryption:/@OneDrive/Encryption' environment: # - SQLITE_DATABASE=*** # - MYSQL_PASSWORD=***** # - MYSQL_DATABASE=***** # - MYSQL_USER=***** # - NEXTCLOUD_ADMIN_USER=**** # - NEXTCLOUD_ADMIN_PASSWORD=****** # - MYSQL_HOST=127.0.0.1 - POSTGRES_DB=***** - POSTGRES_USER=***** - POSTGRES_PASSWORD=***** - POSTGRES_HOST=127.0.0.1:5432 - REDIS_HOST=127.0.0.1 - REDIS_HOST_PORT=6379 # - REDIS_HOST_PASSWORD - NEXTCLOUD_INIT_HTACCESS=true - PHP_MEMORY_LIMIT=1024M - PHP_UPLOAD_LIMIT=17G
Warning: Failed to set memory limit to 0 bytes (Current memory usage is 2097152 bytes) in Unknown on line 0 The current PHP memory limit is below the recommended value
My guess is you're running occ
via sudo or something unconventional for the Docker image. That breaks things because it abandons the environment variables. Use docker compose exec -u33 {bash, xxx, etc}
or similar:
https://github.com/nextcloud/docker/?tab=readme-ov-file#using-the-nextcloud-command-line-interface
⚠️ This issue respects the following points: ⚠️
Bug description
As discussed by someone else here nextcloud gui freezes when I download any file hosted on my nextcloud server with XDM (Multithreaded downloader) or IDM. It freezes web ui for all other users too. nextcloud.log
Steps to reproduce
Download any file with XDM or IDM. And while it is downloading you can not access your web ui. My server has 24 GB RAM and 4cores of arm processor on Oracle Cloud. Also it does not have other apps that cause server in load.
Expected behavior
It should work as normal.
Installation method
Community Web installer on a VPS or web space
Nextcloud Server version
27
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.2
Web server
Other
Database engine version
PostgreSQL
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
I am using nextcloud fpm docker version behind and with Caddy Webserver. Memory limit in Nextcloud web ui is 1024 MB. I do not know why only in logs I provide to you it reports 0 Byte.