如何使用 ssh 在 Heroku 上保持日志尾部处于活动状态?
使用 Heroku Logs --tail 可以在几分钟内发挥作用。然后它停止显示日志。看来 ssh 连接超时并终止。没有错误或消息。在 Ubuntu 11.04 中使用有线连接。
我将以下内容添加到 ~/.ssh/config:
ServerAliveInterval 5
但它不起作用。配置文件中还需要其他内容吗?我怎么知道它是否在做任何事情?如何监控流量并查看保活请求?我正在查看系统监视器,但每 5 秒没有看到任何内容。
谢谢。
Using heroku logs --tail
which works great for a few minutes. Then it stops displaying the logs. It seems that the ssh connection is timing out and dying. There is no error or message. Working in Ubuntu 11.04 on wired conneciton.
I added the following to ~/.ssh/config:
ServerAliveInterval 5
But it didn't work. Do I need anything else in the config file? How do I know if it is doing anything? How can I monitor the traffic and see the keepalive request? I am looking at System Monitor but don't see anything every 5 seconds.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这一切你都做到了吗:
Have you done all of this:
事实证明我正在寻找错误问题的答案。为什么要用tail来保存日志呢?这是有问题的、劳动密集型的并且容易出错。
我找到的解决方案是Papertrail。小网站是免费的。 papertrailapp.com。
这是我博客中的完整故事: http://www.onlineinvestingai.com/blog/2011/08/07/better-logging-with-papertrail-on-heroku/
It turns out that I was looking for an answer to the wrong question. Why use the tail to save logs? It is problematic, labor intensive, and error prone.
The solution I found was Papertrail. Small sites are free. papertrailapp.com.
Here's the complete story from my blog: http://www.onlineinvestingai.com/blog/2011/08/07/better-logging-with-papertrail-on-heroku/
我也看到过同样的问题。我不确定是否是 ssh 超时,但确实有问题。目前,我们已将监视器置于循环中,以便在超时时自动恢复。
我们还使用 PaperTrail,但它对您可以转账的金额有限制。我们将 PaperTrail 用于一般用途,并跟踪日志以获取快速耗尽所有可用 PaperTrail 容量的令人难以忍受的详细日志。
I have seen the same issue. I'm not certain that it is ssh that times out but something does. For now, we've placed our monitor in a loop so it resumes automatically in case of time-out.
We also use PaperTrail, however it has limits in the amount that you can transfer. We use PaperTrail for general purpose use, and tail the logs for the excrutiating-detail logs that quickly use up all avaiable PaperTrail capacity.