I have a relatively large merge request in a local CE instance (320 comments, 10 commits, 385+ changes).
The MR and comments were originally made in GitLab 9.5, but it has since been upgraded to 11.4.5 (f5536c6).
When trying to view the comments the load of discussions.json eventually reports 500 after 57 seconds (I tried increasing the default timeout but that didn’t help). In the production log is the following:
Completed 500 Internal Server Error in 57069ms (ActiveRecord: 31.8ms)
NoMethodError (undefined method `index' for nil:NilClass):
app/models/concerns/discussion_on_diff.rb:46:in `truncated_diff_lines'
app/serializers/base_serializer.rb:16:in `represent'
app/controllers/concerns/issuable_actions.rb:107:in `discussions'
lib/gitlab/i18n.rb:53:in `with_locale'
lib/gitlab/i18n.rb:59:in `with_user_locale'
app/controllers/application_controller.rb:424:in `set_locale'
lib/gitlab/middleware/multipart.rb:101:in `call'
lib/gitlab/request_profiler/middleware.rb:14:in `call'
lib/gitlab/middleware/go.rb:17:in `call'
lib/gitlab/etag_caching/middleware.rb:11:in `call'
lib/gitlab/middleware/read_only/controller.rb:38:in `call'
lib/gitlab/middleware/read_only.rb:16:in `call'
lib/gitlab/middleware/basic_health_check.rb:25:in `call'
lib/gitlab/request_context.rb:18:in `call'
lib/gitlab/metrics/requests_rack_middleware.rb:27:in `call'
lib/gitlab/middleware/release_env.rb:10:in `call'
Any ideas to resolve this?