Pivotal Knowledge Base

Follow

Graceful Shutdown of .NET apps in Cloud Foundry Windows

Environment

  • PCF Runtime for Windows (1.9, 1.10, 1.11, 1.12)
  • Pivotal Application Service for Windows 2012R2 (PAS for Windows 2012R2) 2.0 and later
  • Pivotal Application Service for Windows (PAS for Windows) 2.1

Purpose

For .NET and Windows apps that need to have a graceful shutdown process, this article explains the behavior of shutdown process running on Windows cells based on Windows Server 2012 R2 and Windows Server 2016.

Impact

Stopping (e.g. cf stop or cf delete) applications on Windows 2012 R2 and 2016 (v1709) cells can leave behind ghost connections and pending transactions which could lead to the application in an inconsistent state.

Procedure

 

For .NET applications hosted on Runtime for Windows or PAS for Windows and PAS for Windows 2012R2, application processes are forcefully terminated.

On PAS for Windows 2012R2 and PCF Runtime for Windows, this is due to a known limitation of the IronFrame containerization framework used in these products, and there is no known workaround or fix.

See the original public tracker story documenting this behavior: https://www.pivotaltracker.com/story/show/153491349

Additional Information

[1] https://docs.cloudfoundry.org/devguide/deploy-apps/app-lifecycle.html#shutdown

[2] https://docs.microsoft.com/en-us/windows/console/generateconsolectrlevent

[3] https://docs.microsoft.com/en-us/windows/console/setconsolectrlhandler



Comments

Powered by Zendesk