Performance issue: 502 errors on rendering of issues with heavy markdown contents
If markdown contents being used in an Issue has a lot of formatting, and size is significant, rendering might fail.
Examples, 400 kiB markdown:
- file https://gitlab.com/NikolayS/test/blob/master/markdown_test_400kiB.md – works well
- snippet https://gitlab.com/snippets/1859131 – works well
- issue NikolayS/test#22 (closed) – fails with 502 error.
Maybe some limit must be enforced at DB level? Or there is something that might be optimized here? I did some quick checks from the database side, and the problem doesn't look to be related to the DB performance.
Per @smcgivern, it might be related to this code: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/helpers/page_layout_helper.rb#L35
Edited by Nikolay Samokhvalov