ERROR: ResourceExhausted desc = grpc

Steps to reproduce

  1. FolderSync App Android:
  2. User access to OCIS works, syncing smaller folders from Android to OCIS works.
  3. When choosing folders with large nubers of files (18 Thousand), OCIS reports an error:
"error":"rpc error: code = ResourceExhausted desc = grpc: received message larger than max (10714788 vs. 10240000)"

Expected behaviour

Set folder in App

Actual behaviour

App reports: “Error reading folders”

Server configuration

Bare Metal Install (Raspberry Pi 4B rev 1.5)
Functionality otherwise as expected.

Web server:
apache2 reverse proxy (as described in Bare Metal Install)

Database:
none

PHP version:
none

ownCloud version: (see ownCloud admin page)
Version: 5.0.8
Compiled: 2024-09-30 00:00:00 +0000 UTC

Updated from an older ownCloud or fresh install:
fresh

Where did you install ownCloud from:

https://download.owncloud.com

The content of ocis.env:
PROXY_ENABLE_BASIC_AUTH=true

List of activated apps:
none

Are you using external storage, if yes which one: local/smb/sftp/…
no

Are you using encryption: yes/no
no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/…
no

Client configuration

Browser:

Operating system:
Debian 12, Windows

ownCloud log (data/owncloud.log)

"rpc error: code = ResourceExhausted desc = grpc: received message larger than max (10714788 vs. 10240000)"

Browser log

NA

Hi @stoffel

This basically happens when there are too many files in one folder, so the grpc answer gets too big. You can adjust the threshold with OCIS_GRPC_MAX_RECEIVED_MESSAGE_SIZE. I found some additional information in our dev docu: Additional Information | ownCloud

Thanks for getting back to me and for the tip. It’s good to know that the envvar can be changed. I have changed my workflow to avoid the problem, but I don’t think that is necessarily a good solution. The use-case is syncing mobile-phone images (in my case Android). And I think many users will have this many and probably many more files: IMHO it should just work.

Hey,

i think the documentation are also giving a note why using such a huge amount of files in a single folder is problematic:

NOTE: With a certain amount of files even raising the grpc message size will not suffice as the requests will run into network timeouts.

Thanks for getting back to me. I mentioned above that I changed my workflow to avoid the rpc errors.

However, when I setup a Joplin sync as described here: Configure Joplin to work with ownCloud Infinite Scale (oCIS) - DEV Community, I again had rpc errors. I have about 700 notes in my DB, but there are about 4000 files in the Joplin directory (for whatever reason). I doubled OCIS_GRPC_MAX_RECEIVED_MESSAGE_SIZE to 20480000 and the error messages are gone. Joplin sync works fine, and I don’t seem to have any network timeout problems.

1 Like