Re: Issue with crashing Windows apps on Diego

Matthew Horan

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

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

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
first time I've seen one that is actually doing an HTTP check that must
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"

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

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

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.


Join to automatically receive all group messages.