NC docker crashes

Hi,
i’m having a problem with nextcloud.
I use the docker image from the git repo (docker/.examples/docker-compose/with-nginx-proxy/mariadb/apache at master · nextcloud/docker · GitHub) it runs fine but sometimes it sort of crashes:

I get an error message from the proxy container like;
2021/12/13 21:23:55 [error] 74#74: *94 upstream timed out (110: Connection timed out) while reading response header from upstream, …

And after this i will get this error in the browser:

504 Gateway Time-out

The error goes away after some time, restarting docker-compose does not help.
But i can clear the error if i shutdown the redis server, delete the redis volume und start it again. In the redis logs there is no error.

Does anyone has an idea what could be the problem?
Thanks and greetings
Matthias