Deploying to PCF: "Timed out after 1m0s: health check never passed"

Viewed 4193

I'm pushing a spring boot service to PCF. Because it connects to lots of databases it takes more than a minute to start, breaching PCF's default 1 minute limit. This causes the deploy to be killed by PCF. When that happens here's what I see in the log:

2019-10-24T14:11:44.162+01:00 [CELL/0] [ERR] Timed out after 1m0s: health check never passed.
2019-10-24T14:11:44.162+01:00 [HEALTH/0] [ERR] Failed to make TCP connection to port 8080: connection refused
2019-10-24T14:11:44.168+01:00 [CELL/SSHD/0] [OUT] Exit status 0
2019-10-24T14:11:44.368+01:00 [APP/PROC/WEB/0] [OUT] Exit status 143

Is there a way to increase the 1 minute timeout to allow the service to start?

1 Answers

Adding the following line to the application properties in my manifest.yml increased the timeout to 3 minutes and allowed my deploy to complete:

timeout: 180

The same can be accomplished on the command line with the following:

cf push -t 180
Related