It's possible that this project has a service in the database that is not defined. Get the project ID, and in your database (e.g. run sudo gitlab-rails dbconsole) try:
id | type | title | active
------+---------------------------+---------------+--------
2132 | | Builds emails | f
3191 | GitlabIssueTrackerService | | f
2140 | | Slack | t
2149 | | | f
2190 | SlackService | | t
@stanhu from what I see there is no validation to keep Services from having type as null. We should probably have that fixed! \cc @DouweM can you confirm that there should not exist any Services with nil type?
@stanhu: It looks like all projects who have a service with (type IS NULL OR type = '') are imported from an old GitLab CE instance. Projects which are created on the running GitLab EE instance are not affected. Service titles are Builds emails and JIRA
EDIT: Deleting the other 41 affected services has resolved many 500 errors and no problems occurred.
There was an MR to do with type being nil that was resolved late September, 2016. That probably fixed the cause and it's also consistent with what we have in prod/staging: