SSH Connection refused upon repeated access

Hello,

I am currently running Gitea on my server using a docker setup. As on the server there is another SSH daemon running on port 22, I need to redirect the ports: Port 26 from the outside should be forwarded to port 22 in the container to access the gitea server. This worked now for quite some time flawless. However, since some time, I got problem reports from scripts accessing the SSH daemon of gitea.

While tracking down the problem, I found a strange effect: I was almost always able to do a git fetch. When I so git fetch again within mere seconds, the connection is refused. If I wait longer, the gitea SSH deamon is reachable again. Within the script the requests to the daemon are made with relative high frequency, thus the scripts failed.

However, the fact that the Gitea SSH daemon is plainly rejecting the incoming connections if another connection was just closed, I find disturbing. At worst, I would expect the daemon to stall an the client to have to wait a bit of time. But not getting a rejection.

I tried to set the debug level of gitea to debug but found no hint in the logs. Can anyone give me a hint on where I can look to understand why the embedded SSH daemon is temporarily not accepting my requests?

Christian