From the mailing list: https://lists.sr.ht/~sircmpwn/sr.ht-discuss/%3Ca2f0fcb3-0cdd-8360-4d49-82a19b9d02de%40ersei.net%3E
In git.sr.ht, it appears that when previewing a formatted text file that is very large (couple of megabytes), the page load hangs returns a 504 error.
I propose that syntax highlighting be disabled on large files (ie >500kb) or that the web ui refuses to show a preview instead.
Thanks, Ersei Saggi
Preliminary work: https://lists.sr.ht/~sircmpwn/sr.ht-dev/patches/47306