dyno

Possible to bypass Heroku's free plan's “Sleeps after 30 mins of inactivity” with console.logs?

邮差的信 提交于 2019-12-07 07:48:06
问题 Heroku has a free plan, as outlined here: https://www.heroku.com/pricing One of the drawbacks of the free plan is that the server goes to sleep after 30 minutes of inactivity. Is it possible to bypass this if I have a console.log("stay awake"); occur every 20 minutes? Thanks. 回答1: It is not possible to bypass that limit - in a sense that all your services will likely get shut down before the end of the month for much longer than 30 minutes if you do that all the time - but you can keep your

Is there a way to force a Heroku Dyno to sleep?

拟墨画扇 提交于 2019-12-05 09:20:35
问题 I'm trying to debug an API issue I have that occurs when my app tries to access a sleeping Heroku Dyno. The problem is it takes a while for a dyno to naturally sleep so it really slows down the debug process. I know how to turn off a dyno but the bug I'm try to fix seems to happen when the app makes a request to a sleeping dyno that doesn't immediately respond, yet eventually responds. 回答1: I got the definitive answer from a Heroku engineer. It's no, you can't force a dyno to sleep. 来源: https