Gitlab Health Check : Disable or Configure SMTP so it is not failing randomly?

In the latest gitlab CE version (upgraded yesterday, to 8.8.1) there’s a nice health check tab that I don’t remember seeing before. Visiting the page there is a failed health check “SMTP: execution expired”.

On a test VM that didn’t have SMTP configured, this does not occur. So it appears to be a real potential problem, but yet email notifications are working as far as I know. Anyone know more about this?

(No need to chide me about sharing my tokens. First, this is a private non-internet-instance, and second, I have reset the tokens, so the above are not valid anyways.)

I suspect that changes to my SMTP configuration may be necessary to fix the above?

There’s nothing other than the above cryptic one repeating line in production.log:

Started POST "/ci/api/v1/builds/register.json" for at 2016-05-25 07:03:06 -0500
health_check failed: SMTP: execution expired.
Started POST "/ci/api/v1/builds/register.json" for at 2016-05-25 07:03:06 -0500
health_check failed: SMTP: execution expired.

Looking at the code here, I suspect a bug. First of all, this is gitlab Community Edition and the config.standard_checks configuration code in /opt/gitlab/embedded/service/gitlab-rails/config/initializers shows this list of checks:

HealthCheck.setup do |config|
  config.standard_checks = ['database', 'migrations', 'cache']

Note that SMTP isn’t even listed. This healthcheck code looks like a third party ruby gem?

I am not sure but I would like to either fully enable or fully disable whatever SMTP feature check is being used above.

Not sure how an end user might reconfigure this, but I’m experimenting with local tweakage to the ruby source to see if I can learn anything.

It seems to me that a fundamental design error of the health check interactive page is that it appears to DO a health check on an SMTP source which may take 30 seconds to fail initially, and which therefore should be disabled, and done by a periodic background worker and not as part of the rails page load.


Thanks for your detailed write up Warren. I’ve x-posed this over in GitLab-EE issues

Great. It’s working fine here now in 8.8.

We have mattermost upgrade failure issues with 8.9 but we hope to get up to 8.9 soon.