Skip to content

Many environment variables lead to APPCMD failed with error code 259 error #76

@Ne4to

Description

@Ne4to

Running a container with many environment variables leads to following error:

Service 'w3svc' has been stopped
APPCMD failed with error code 259
Failed to update IIS configuration

Service monitor builds a command for appcmd.exe limited to 30000 symbols. When there are many variables appcmd.exe is executed several times. First run on my environment finishes in about 0.3 second. Each subsequent run takes increased time and eventually exceeds 5 seconds limit (GetExitCodeProcess returns STILL_ACTIVE 259).

Workaround:
Set enableServiceLinks: false in pod’s spec.

EnableServiceLinks indicates whether information about services should be injected into pod's environment variables, matching the syntax of Docker links. Optional: Defaults to true.

It will remove set of variables like:

  • SERVICE_NAME_PORT
  • SERVICE_NAME_PORT_80_TCP
  • SERVICE_NAME_PORT_80_TCP_ADDR
  • SERVICE_NAME_PORT_80_TCP_PORT
  • SERVICE_NAME_PORT_80_TCP_PROTO
  • SERVICE_NAME_SERVICE_HOST
  • SERVICE_NAME_SERVICE_PORT
  • SERVICE_NAME_SERVICE_PORT_HTTP

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions