Health Check

Configure a Docker health check for the WinCC OA container so the remote web server waits until the service is ready instead of retrying on startup. A WinCC OA_health checks script periodically evaluates manager status and internal error state against a defined threshold (for example, fewer than 100 failure points) to mark the container healthy, which Docker Compose can enforce using depends_on with the service_healthy condition.

Video Information

Length
1:32
Language
English

Transcript

Docker containers can report their health status. When our remote web server starts, the WinCC OA server is not yet ready to accept connections. As a result, the web server retries the connection after 20 seconds.

If the WinCC OA container includes a health check that indicates when the service is ready, the web server container could wait for it before attempting start.

The WinCC OA_health checks script is executed regularly to monitor the state of the WinCC OA managers using PMO. Additionally, it evaluates the internal WinCC OA error state via the docker health checked at ctrl script ensuring the system remains below a defined threshold e.g. fewer than 100 failure points to be considered healthy in a docker composed file.

This health check can be integrated using the depends underscore on directive with a condition service option. This allows the remote web server container to wait until the WinCC OA service is confirmed to be healthy before starting.

As a result, the web server container now correctly waits to start until the WinCC OA server is fully ready and marked as healthy.