File upload stuck at max_chunk_size

My current setup:

Nextcloud version : 25.0.4
Operating system and version: Unraid 6.11
Apache or nginx version: nginx 1.22.1
PHP version : 8.1.16

My nextcloud is behind a swag reverse proxy in a docker container

My issue

I recently noticed my uploads tend to be stuck/fail. Downloads are fine. They don’t produce any log entries server side, the desktop client gives a “connection time out” error. When uploading through the webapp the upload remained stuck at 10MB

I tinkered a bit with the server configuration and noticed the issue is tied to the max_chunk_size configuration property. When disabling chunking via the following command and restarting the container, the uploads are going through fine (and very fast too)

occ config:app:set files max_chunk_size --value 0

changing the chunk size to a higher value seems to just change at what uploaded amount the process gets stuck.

I recognize that disabling chunking has a negative impact on stability in certain scenarios, so I would like to know the cause of this and how I can enable it without the issues.

I don’t really know where to start though, as I don’t have any logs that can help me find the root cause. Any veterans that can help me out?

thx in advance

Hi! Don’t know if I’m lucky or not to find someone with the same problem as me.

Using :

occ config:app:set files max_chunk_size --value 0

will only make it work for the webui but not the android app and windows app. In this case, upload will fail every 10mb, but will succeed eventually.

In my case, I use the all-in-one (aio) docker. Seems to be related to 25.0.4.

If I’m feeling adventurous, I’ll try a downgrade…

Don’t know if it will help, but when there is an upload, there a SELECT on the database that that all my CPU (server) .

Thx for the reply,

I had a feeling that it might have been related to an update.

Disabling chunking indeed seems to only make it work in the webgui, desktop syncing app is still giving issues.

there is a lengthy discussion around chunk size on github I’m too lazy to review all 93 comments now - maybe you find useful hints there…

Thanks for the link. But even changing the chunk size in the windows app doesn’t seem to work.

Just to add that everything worked 1 month ago. Except from updating the aio container, nothing was changed.

What I see, the first chunk will be transfer to the temp folder. When you restart the sync, the second chunk will be transfer. And the third, etc.

Ok, I was able to adjust the chunk size on the windows app. But that’s a temporary fix.

While testing, I saw these queries stuck in my postgresql database and use a lot of CPU :

I try reindexing, but no change.

Now, I need to “fix” my android app.

Hello everyone,

I have the same uploading issue and the same postgresql processes using a lot of CPU.

However, I have the feeling it started already with version 25.0.3. It seems to me that it started when I made the update for some plugins. I am not so sure. I made an update to 25.0.4 in the hope to fix it but nothing changed.

docker exec -ti -u www-data docker-app-1 php occ config:app:set files max_chunk_size --value 0

Did not fix the issue. Now I can upload up to 20M instead of 10M.

On the host, I am using Ubuntu 22.04, Apache 2.4.52.
The PHP version in the docker container is 8.1.16.

Does everyone here use docker?


Does any of you use the Recognize app?
I noticed that disabling that fixes the problem for me (at least for the webapp, still have to check the desktop client).

I had version 3.6.2 installed

1 Like

Also fixes the desktop client (at least for me).

Just disable the Recognize app


Holy guacamole! What!?!

Yes that’s it! Man, I was on the verge to deactivate it yesterday, but I just toggle recognition down in the config menu and the problem was still there. Lost a day on all this…

Do you know with which version of recognize this behavior started?

In my case, I was on 3.6.1. But cannot guarantied that it didn’t start earlier.

Can you try 3.6.2 ?

Sorry, can’t be sure which version it started at, only that it is present on 3.6.2

Already did and same thing…

The solution works for me too… Thank you so much!

Disabling the Recognize App worked for me!

Previously the upload of videos was impossible (stuck at 10 MB), thanks a lot.

Thank you! I’ve been trying to figure this out for hours. It does appear that the current version of the Recognize app fixes the issue, though; I went to disable and saw that version 3.6.3 was available, so I updated it just to see. So, updating Recognize to 3.6.3 also works, instead of disabling.

In hopes it may help someone else find a solution they’re desperately searching for, here are some of the keywords I was searching for before I found this post: connection timeout extremely slow performance speed large uploads

1 Like