Re: Issue with crashing Windows apps on Diego


Matthew Horan
 

On Tue, Feb 2, 2016 at 9:31 AM, Matthew Horan <mhoran(a)pivotal.io> wrote:

On Mon, Feb 1, 2016 at 7:06 PM, aaron_huber <aaron.m.huber(a)intel.com>
wrote:

This has been nagging at me all weekend and I think I finally figured out
why. So far all healthchecks in CloudFoundry have been either on the PID
(process didn't crash) or the port (accepting TCP connections). This is
the
first time I've seen one that is actually doing an HTTP check that must
pass
for the "container" (such as it is on Windows) to be considered healthy.
Looking at the Linux healthcheck code it looks like there is a "uri"
healthcheck:


https://github.com/cloudfoundry-incubator/healthcheck/blob/master/cmd/healthcheck/main.go#L49-L53

But as far as I can tell it's unused because only port is ever called:


https://github.com/cloudfoundry-incubator/nsync/blob/master/recipebuilder/recipe_builder.go#L97-L98

Hey Aaron -

You're right; it looks like the port check is only ever used. I don't have
the history as to why we (the CF .NET team) implemented an HTTP check
instead of a port check, but that's how it is.
In talking with a former team member, I came across the story [1] where we
made this change. The WebAppServer will listen on the port immediately upon
starting, even if the app has not successfully loaded. This was undesirable
for the common case -- but obviously causes issues for slow apps, or apps
which require authentication. As mentioned in the story, the developers
pointed out that this behavior should be configurable -- but this was never
implemented.

Hopefully we can see some progress on the proposed healthcheck changes,
which would better address your issue. In the meantime, I'm not sure of the
best course of action. It's quite easy to push an unlaunchable app to
Windows, and there will be little to no debug information available to help
the developer figure out why their app is inaccessible. The current
implementation has its drawbacks, but can be worked around by "disabling"
the health check.

[1] https://www.pivotaltracker.com/story/show/96080778

Join cf-dev@lists.cloudfoundry.org to automatically receive all group messages.