Creating a merge request hangs

We’re running GitLab 8.3.2 and if I try and create a merge request it seems to hang. I eventually get a 502 error message. When i reopen the project I can see the merge request was not created.

I can’t see anything in the logs to indicate what might be going wrong. I can see Unicorn closing workers because they exceed max memory and I think also because they’ve taken too long (over 60 seconds).

I can’t seem to find any logs that relate directly to what has gone wrong with the merge request.

Any ideas?