<i id='31SNw'><tr id='31SNw'><dt id='31SNw'><q id='31SNw'><span id='31SNw'><b id='31SNw'><form id='31SNw'><ins id='31SNw'></ins><ul id='31SNw'></ul><sub id='31SNw'></sub></form><legend id='31SNw'></legend><bdo id='31SNw'><pre id='31SNw'><center id='31SNw'></center></pre></bdo></b><th id='31SNw'></th></span></q></dt></tr></i><div id='31SNw'><tfoot id='31SNw'></tfoot><dl id='31SNw'><fieldset id='31SNw'></fieldset></dl></div>

    <legend id='31SNw'><style id='31SNw'><dir id='31SNw'><q id='31SNw'></q></dir></style></legend>
    • <bdo id='31SNw'></bdo><ul id='31SNw'></ul>
      1. <tfoot id='31SNw'></tfoot>

        <small id='31SNw'></small><noframes id='31SNw'>

        在 Heroku dyno 上运行多个进程是否可行?

        Is it feasible to run multiple processeses on a Heroku dyno?(在 Heroku dyno 上运行多个进程是否可行?)
        • <bdo id='ohdgF'></bdo><ul id='ohdgF'></ul>

            <i id='ohdgF'><tr id='ohdgF'><dt id='ohdgF'><q id='ohdgF'><span id='ohdgF'><b id='ohdgF'><form id='ohdgF'><ins id='ohdgF'></ins><ul id='ohdgF'></ul><sub id='ohdgF'></sub></form><legend id='ohdgF'></legend><bdo id='ohdgF'><pre id='ohdgF'><center id='ohdgF'></center></pre></bdo></b><th id='ohdgF'></th></span></q></dt></tr></i><div id='ohdgF'><tfoot id='ohdgF'></tfoot><dl id='ohdgF'><fieldset id='ohdgF'></fieldset></dl></div>

                    <tbody id='ohdgF'></tbody>

                  <small id='ohdgF'></small><noframes id='ohdgF'>

                1. <tfoot id='ohdgF'></tfoot>
                2. <legend id='ohdgF'><style id='ohdgF'><dir id='ohdgF'><q id='ohdgF'></q></dir></style></legend>

                  本文介绍了在 Heroku dyno 上运行多个进程是否可行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我知道 Heroku 平台的内存限制,并且我知道将应用程序分离为 web 和 worker dynos 更具可扩展性.但是,出于测试目的,我仍然希望在 Web 进程旁边运行异步任务.Dynos 很昂贵,我想在 Heroku 提供的免费实例上进行原型设计.

                  I am aware of the memory limitations of the Heroku platform, and I know that it is far more scalable to separate an app into web and worker dynos. However, I still would like to run asynchronous tasks alongside the web process for testing purposes. Dynos are costly and I would like to prototype on the free instance that Heroku provides.

                  在与 Web 进程相同的测功机中将新作业作为进程或子进程生成是否有任何问题?

                  Are there any issues with spawning a new job as a process or subprocess in the same dyno as a web process?

                  推荐答案

                  在较新的 Cedar 堆栈上,生成多个进程没有问题.每个 dyno 都是一个虚拟机,除了内存和 CPU 使用(我认为大约 512 MB 内存和 1 个 CPU 内核)之外没有特别的限制.遵循某些堆栈(例如 Python)的较新安装说明将导致配置具有开箱即用的多个(Web 服务器)进程.

                  On the newer Cedar stack, there are no issues with spawning multiple processes. Each dyno is a virtual machine and has no particular limitations except in memory and CPU usage (about 512 MB of memory, I think, and 1 CPU core). Following the newer installation instructions for some stacks such as Python will result in a configuration with multiple (web server) processes out of the box.

                  安装在 web dynos 上的软件可能会因您使用的 buildpack 而异;如果您的子流程需要特殊软件,那么您可能必须将其与您的应用程序捆绑在一起,或者(更好地)推出您自己的 buildpack.

                  Software installed on web dynos may vary depending on what buildpack you are using; if your subprocesses need special software then you may have to either bundle it with your application or (better) roll your own buildpack.

                  在这一点上,我通常会提醒您,强烈建议使用适当的任务队列系统在工作人员 dynos 而不是 web dynos 上运行异步任务,但听起来您已经知道这一点.请记住,只有一个 Web dyno 的帐户(通常这意味着免费"帐户)将在一个小时左右未收到任何 Web 请求后使该 dyno 停止运行,并且任何后台进程在该 dyno 上运行时间必然会被扼杀.拥有多个网络 dyno 的帐户不受此限制.

                  At this point I would normally remind you that running asynchronous tasks on worker dynos instead of web dynos, with a proper task queue system, is strongly encouraged, but it sounds like you know that already. Do keep in mind that accounts with only one web dyno (typically this means, "free" accounts) will have that dyno spun down after an hour or so of not receiving any web requests, and that any background processes running on the dyno at that time will necessarily be killed. Accounts with multiple web dynos are not subject to this restriction.

                  这篇关于在 Heroku dyno 上运行多个进程是否可行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Initialize Multiple Numpy Arrays (Multiple Assignment) - Like MATLAB deal()(初始化多个 Numpy 数组(多重赋值) - 像 MATLAB deal())
                  How to extend Python class init(如何扩展 Python 类初始化)
                  What#39;s the difference between dict() and {}?(dict() 和 {} 有什么区别?)
                  What is a wrapper_descriptor, and why is Foo.__init__() one in this case?(什么是 wrapper_descriptor,为什么 Foo.__init__() 在这种情况下是其中之一?)
                  Initialize list with same bool value(使用相同的布尔值初始化列表)
                  setattr with kwargs, pythonic or not?(setattr 与 kwargs,pythonic 与否?)
                  <tfoot id='dTpXk'></tfoot>

                      <legend id='dTpXk'><style id='dTpXk'><dir id='dTpXk'><q id='dTpXk'></q></dir></style></legend>
                    1. <small id='dTpXk'></small><noframes id='dTpXk'>

                          <tbody id='dTpXk'></tbody>

                          • <bdo id='dTpXk'></bdo><ul id='dTpXk'></ul>

                            <i id='dTpXk'><tr id='dTpXk'><dt id='dTpXk'><q id='dTpXk'><span id='dTpXk'><b id='dTpXk'><form id='dTpXk'><ins id='dTpXk'></ins><ul id='dTpXk'></ul><sub id='dTpXk'></sub></form><legend id='dTpXk'></legend><bdo id='dTpXk'><pre id='dTpXk'><center id='dTpXk'></center></pre></bdo></b><th id='dTpXk'></th></span></q></dt></tr></i><div id='dTpXk'><tfoot id='dTpXk'></tfoot><dl id='dTpXk'><fieldset id='dTpXk'></fieldset></dl></div>