What worked for me was to configure the above settings mentioned by @fliebe92, via Ruby console.
Check if you can run the following:
zammad run rails c
If you can’t, you will need to install the full ruby components.
https://docs.zammad.org/en/latest/admin/console.html#start-zammad-s-rails-console
The other method, via zammad environement variables, didn’t work for me.
https://docs.zammad.org/en/latest/appendix/configure-env-vars.html#performance-tuning