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

    <legend id='j6Djb'><style id='j6Djb'><dir id='j6Djb'><q id='j6Djb'></q></dir></style></legend>

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

      • <bdo id='j6Djb'></bdo><ul id='j6Djb'></ul>
      1. 当EC2微实例上的ubuntu在内存不足时将其杀死时自动重新启动Mysql

        Restart Mysql automatically when ubuntu on EC2 micro instance kills it when running out of memory(当EC2微实例上的ubuntu在内存不足时将其杀死时自动重新启动Mysql)
        <i id='Yqk6F'><tr id='Yqk6F'><dt id='Yqk6F'><q id='Yqk6F'><span id='Yqk6F'><b id='Yqk6F'><form id='Yqk6F'><ins id='Yqk6F'></ins><ul id='Yqk6F'></ul><sub id='Yqk6F'></sub></form><legend id='Yqk6F'></legend><bdo id='Yqk6F'><pre id='Yqk6F'><center id='Yqk6F'></center></pre></bdo></b><th id='Yqk6F'></th></span></q></dt></tr></i><div id='Yqk6F'><tfoot id='Yqk6F'></tfoot><dl id='Yqk6F'><fieldset id='Yqk6F'></fieldset></dl></div>
      2. <tfoot id='Yqk6F'></tfoot>

        <legend id='Yqk6F'><style id='Yqk6F'><dir id='Yqk6F'><q id='Yqk6F'></q></dir></style></legend>
          <tbody id='Yqk6F'></tbody>
          <bdo id='Yqk6F'></bdo><ul id='Yqk6F'></ul>

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

                1. 本文介绍了当EC2微实例上的ubuntu在内存不足时将其杀死时自动重新启动Mysql的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  当系统内存不足时,ubuntu 12.04杀死mysql进程:

                  When the system runs out of memory, ubuntu 12.04 kills the mysql process:

                  Out of memory: Kill process 17074 (mysqld) score 146 or sacrifice child
                  

                  所以这个进程最终被杀死了.这发生在服务器负载的高峰期,主要是因为 apache 变得疯狂并吃掉剩余的可用内存.可能的方法是:

                  So the process ends up killed. This happens at peaks of server load and mainly because of apache getting wild and eating the remaining available memory. Possible approaches could be:

                  • 以某种方式更改 mysql 的优先级,这样它就不会被杀死(可能是一个糟糕的修复,因为其他东西会被杀死)
                  • 监控mysql的状态并在它被杀死时自动重启(我正在考虑,但不知道如何去做).

                  你怎么看?

                  推荐答案

                  数据库服务器的突然终止是非常严重的崩溃.您需要在生产系统中避免这种情况,因为它可能无法干净地重新启动.

                  Abrupt termination of a database server is a very serious crash. You need to avoid this in a production system, because it may not restart cleanly.

                  数据库服务器是一种共享资源,在生产中几乎不应该以计划外的方式终止.唯一应该导致意外终止的是灾难性硬件或电源故障.大多数正确配置的生产数据库服务器每十年或更少地有一次计划外终止.认真的.

                  The database server is a shared resource, and should almost never terminate in an unplanned fashion in production. The only thing that should cause unplanned termination is a catastrophic hardware or power failure. Most properly configured production data base servers have an unplanned termination once every ten years or less frequently. Seriously.

                  怎么办?

                  修复您的 apache 配置.限制它可以使用的工作线程和进程的数量,这样它就不会疯狂运行.了解如何执行此操作.这是至关重要的.请参阅此处:http://httpd.apache.org/docs/current/mod/mpm_common.html#maxrequestworkers

                  Fix your apache configuration. Limit the number of worker threads and processes it can use, so it can't run wild. Learn how to do this. It's vital. See here: http://httpd.apache.org/docs/current/mod/mpm_common.html#maxrequestworkers

                  修复您的网络应用程序中导致您的 apache 疯狂运行的缺陷.

                  Fix the defects in your web app that are causing your apache to run wild.

                  如果可以,把你的mysqld服务器从apache移到不同的服务器机器上,这样两者就不会争夺相同的硬件资源.

                  If you can, move your mysqld server to a different server machine from apache, so the two don't contend for the same hardware resources.

                  配置您的 mysqld 以限制它将接受来自 apache 工作线程或其他客户端的连接数.您的 Web 应用程序可能会处理工作线程需要等待连接的情况.看这里.http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_max_connections

                  Configure your mysqld to limit the number of connections it will accept from apache worker threads or other clients. Your web app probably handles the situation where a worker thread needs to wait for a connection. See here. http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_max_connections

                  您使用的是 EC2 微型实例吗?你需要做一些认真的调整.请参阅此处:http://ubuntuforums.org/showthread.php?t=1979049

                  Are you on an EC2 micro instance? You need to do some serious tuning. See here: http://ubuntuforums.org/showthread.php?t=1979049

                  这篇关于当EC2微实例上的ubuntu在内存不足时将其杀死时自动重新启动Mysql的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  Set the variable result, from query(设置变量结果,来自查询)
                  What is dynamic SQL?(什么是动态 SQL?)
                  Mysql - How to quit/exit from stored procedure(Mysql - 如何退出/退出存储过程)
                  Does MySQL have time-based triggers?(MySQL 有基于时间的触发器吗?)
                  is it possible to call a sql script from a stored procedure in another sql script?(是否可以从另一个 sql 脚本中的存储过程调用 sql 脚本?)
                  Procedure to loop through comma separated string is not working(遍历逗号分隔字符串的过程不起作用)

                        • <small id='jmaPu'></small><noframes id='jmaPu'>

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