Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Client times out #2

Closed
sprice opened this issue Jun 1, 2016 · 9 comments
Closed

Client times out #2

sprice opened this issue Jun 1, 2016 · 9 comments

Comments

@sprice
Copy link
Contributor

sprice commented Jun 1, 2016

When I run the sabayon command it updates the ACME_KEY and ACME_TOKEN config vars of my production app, thus restarting it.

Then it tries to validate against the validation URL, but the app is restarting and sabayon times out.

@sprice sprice changed the title Heroku app times out Client times out Jun 1, 2016
@dmathieu
Copy link
Owner

dmathieu commented Jun 1, 2016

"times out"? There is no timeout when running one-off dynos (except the 24 hours cycling).
What exact errors are you getting?

@sprice
Copy link
Contributor Author

sprice commented Jun 1, 2016

host could not be reached (since it was restarting). Sorry the exact message is gone from my history.

I updated line 76 of main.go to be time.Sleep(40 * time.Second) and things are good now

@sprice
Copy link
Contributor Author

sprice commented Jun 1, 2016

To be clear, my production app could not be reached.

@dmathieu
Copy link
Owner

dmathieu commented Jun 1, 2016

If your app takes longer than 20 seconds to boot, that could indeed cause issues.
Long boot times also means you have downtime every time your app restarts though, which will give you further issues. I think your app's boot time is what should be fixed here.

@sprice
Copy link
Contributor Author

sprice commented Jun 1, 2016

Agreed on needing to boot faster.

That being said I'd also like to use Heroku preboot. I believe this would need to wait ~3-5 minutes for it to work with preboot.

Would you accept a pull request that takes a custom sleep time?

@dmathieu
Copy link
Owner

dmathieu commented Jun 1, 2016

Sure. When adding it to app.json, could you add a mention about long boot time and the risk of H12s in the description?

@sprice
Copy link
Contributor Author

sprice commented Jun 1, 2016

Sounds good. Time to learn some Go :)

@apeckham
Copy link

We had this problem today: We used preboot, so env vars take ~3 minutes to update. When Sabayon checked .well-known/acme-challenge/... it got a 404. Decided to turn off preboot for now so we can use Sabayon.

@sprice
Copy link
Contributor Author

sprice commented Dec 19, 2016

@apeckham set RESTART_WAIT_TIME to 300 (5 mins)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants