configurable max message size

Signed-off-by: jkoberg <jkoberg@owncloud.com>
This commit is contained in:
jkoberg
2023-07-19 12:16:03 +02:00
parent dc18f58693
commit 89785d0976
3 changed files with 29 additions and 0 deletions
@@ -0,0 +1,5 @@
Enhancement: configure max message size
Add a configuration option for the grpc max message size
https://github.com/owncloud/ocis/pull/6849
@@ -0,0 +1,20 @@
---
title: Additinal Information
date: 2018-05-02T00:00:00+00:00
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/services/general-info
geekdocFilePath: additional-information.md
geekdocCollapseSection: true
---
This section contains information on general topics
## GRPC Maximum message size
Ocis is using grpc for inter service communication. When having a folder with a lot of files (25000+, size doesn't matter) and doing a `PROPFIND` on the folder, the server will run into errors because the
grpc message body gets to big. We introduced the envvar `OCIS_GRPC_MAX_RECEIVED_MESSAGE_SIZE` to raise the max size for the grpc body.
NOTE: With a certain amount of files even raising the grpc message size will not suffice as the requests will run into network timeouts. Also generally the more files are in a folder, the longer it will take to load.
It is recommended to use `OCIS_GRPC_MAX_RECEIVED_MESSAGE_SIZE` only temporary to copy files out of the folder (e.g. via web ui) and use the default value in general.
+4
View File
@@ -81,4 +81,8 @@ type Commons struct {
SystemUserID string `yaml:"system_user_id" env:"OCIS_SYSTEM_USER_ID" desc:"ID of the oCIS storage-system system user. Admins need to set the ID for the storage-system system user in this config option which is then used to reference the user. Any reasonable long string is possible, preferably this would be an UUIDv4 format."`
SystemUserAPIKey string `mask:"password" yaml:"system_user_api_key" env:"SYSTEM_USER_API_KEY"`
AdminUserID string `yaml:"admin_user_id" env:"OCIS_ADMIN_USER_ID" desc:"ID of a user, that should receive admin privileges. Consider that the UUID can be encoded in some LDAP deployment configurations like in .ldif files. These need to be decoded beforehand."`
// NOTE: you will not fing GRPCMaxReceivedMessageSize size being used in the code. The envvar is actually extracted in revas `pool` package: https://github.com/cs3org/reva/blob/edge/pkg/rgrpc/todo/pool/connection.go
// It is mentioned here again so it is documented
GRPCMaxReceivedMessageSize int `env:"OCIS_GRPC_MAX_RECEIVED_MESSAGE_SIZE" desc:"The maximum body size for grpc requests. Defaults to '10240000'. Note that large values can potentially hide errors and can cause network timeouts. Can be used temporarily to repair unaccessable large folders (25000+ files)"`
}