In the most recent case, it was unfortunately a deadlock issue causing Forgejo to not respond within that timeout. It takes more than 15 seconds to be returned as a deadlock error. Hence, you get to see the timeout error instead of a 500 error (https://codeberg.org/Codeberg/Community/issues/2596).
The timeout was not the issue here, although we have bumped it for POST method requests to give Forgejo extra margin to work with.