Timeout when accessing a commit with large diff
Created by: kalleth
Reproduction steps:
- Commit a large development.log and push up to gitlab.
- git rm -f log/development.log
- git commit -am "Removing development.log"
- git push
- Attempt to view the commitdiff in gitlab.
More than likely, the worker handling the request will time out and you will get a 502. The cause appears to be in https://github.com/gitlabhq/gitlabhq/blob/master/app/views/commits/_text_file.html.haml#L1 - too_big is used to hide or show (via a class) the table for the diff, but the backend is still rendering something for each line and returning the HTML.
The diff I gave in issue 1745 (https://github.com/gitlabhq/gitlabhq/issues/1745#issuecomment-11261284) is a workaround and I have confirmed that this fixes 502 errors, but it's not a complete fix for the problem. That requires more thought.