The creation of the first template file fails with 429 Too Many Requests that is not handled/retried property.
Steps to reproduce
Use storj as the S3 primary storage
First login or exec php8.3 occ richdocuments:update-empty-templates
Expected behavior
The newfile() + writecontent() tween should not produce two putObject requests on the S3
and/or S3 429 Too Many Requests should be handled better
and/or set throttle rates in the config
Installation method
Community Manual installation with Archive
Nextcloud Server version
27
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.3
Web server
Apache (supported)
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
⚠️ This issue respects the following points: ⚠️
Bug description
I installed a fresh nextcloud deployment with a S3 primary storage over a own storj-gateway (minio-fork).
Single file operation small and large working fine, but there are rate limit issues with some components like
richdoccuments
.On template file creation, the file is first created (file touch operation) and after the content is written, see: (https://github.com/nextcloud/richdocuments/blob/0e585e70a0f398bd79edc07a00d05b7b0868bd2c/lib/TemplateManager.php#L220-L221)
This produces two
putObject
operation on the S3 storj backend in less then one second Storj has a limit with 1 write per second to the same object name. see: (https://docs.storj.io/learn/concepts/limits#credit-card-payment-method)The creation of the first template file fails with
429 Too Many Requests
that is not handled/retried property.Steps to reproduce
php8.3 occ richdocuments:update-empty-templates
Expected behavior
The newfile() + writecontent() tween should not produce two
putObject
requests on the S3 and/or S3429 Too Many Requests
should be handled better and/or set throttle rates in the configInstallation method
Community Manual installation with Archive
Nextcloud Server version
27
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.3
Web server
Apache (supported)
Database engine version
MariaDB
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
No response
Nextcloud Logs
No response
Additional info
I worked around the issue now by adding a 1sec sleep after file touch operation in
/lib/private/Files/View.php