Merge conflict checking is in progress stucks

I have 1.21.11 version of gitea. Once in several days when member create PR it stucks on line

Merge conflict checking is in progress. Try again in few moments.

This hung may be up to 2 hours for 3-4 lines of changed code.

On log I find several errors

...ll/patch_unmerged.go:164:unmergedFiles() [E] Unable to run ls-files -u -z! Error: git ls-files -u -z: context deadline exceeded
.../context_response.go:86:HTML() [E] Render failed: failed to render template: repo/pulls/files, error: write tcp 10.147.2.4:3000->10.16.16.126:41756: write: broken pipe
.../context_response.go:88:HTML() [E] plainTextInternal (status=500): write bytes failed: write tcp 10.147.2.4:3000->10.16.16.78:53584: write: broken pipe
...git/commit_status.go:516:ParseCommitsWithStatus() [E] GetLatestCommitStatus: context canceled

What the reason of this problems?