Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable Temporal to startup even if Elastic Search is down (#866)
A customer discovered an issue where Temporal Server will fail to start up if it is using ElasticSearch, and ElasticSearch is down. There are two separate issues: Within the Server itself, we block Temporal from starting up if we cannot create an Elastic Search Client Within the startup of the Docker Image, we wait indefinitely until we are able to access ElasticSearch. This PR provides a proper fix for the first issue and a workaround for the second issue. For the first issue, when we create the ElasticSearch client, we disable health checks, and then re-enable the healthchecks after the client is created. This ensure we can create the client even if ES is down. For the second issue, we added another environment variable called $ES_SCHEMA_SETUP_TIMEOUT_IN_SECONDS. By default, this is 0 (meaning if ES is down, docker start.sh script waits forever). If the user finds their startup is blocked because of this, they can set the variable to any integer value. The docker script will continue after $ES_SCHEMA_SETUP_TIMEOUT_IN_SECONDS seconds if it is unable to establish a connection to Elastic Search We have a task at Temporal tracking the creation of a better story for the second issue.
- Loading branch information