zoukankan      html  css  js  c++  java
  • apache 运行一段时间出现错误

    环境是win2008,apache 2.4.29 Win64 VC15,php 7.1.10(7.1.11)。事件完整内容:

    “--------------------------

    错误应用程序名称: httpd.exe,版本: 2.4.29.0,时间戳: 0x59e9c9a6
    错误模块名称: ntdll.dll,版本: 6.1.7601.23915,时间戳: 0x59b94ee4
    异常代码: 0xc0000005
    错误偏移量: 0x000000000004f23c
    错误进程 ID: 0x900
    错误应用程序启动时间: 0x01d388072496fd60
    错误应用程序路径: D:xwampApacheinhttpd.exe
    错误模块路径: C:WindowsSYSTEM32 tdll.dll
    报告 ID: c896327e-f3fe-11e7-8745-ff2c4350ba8c

    --------------------------”

    apache日志中频繁定期出现重启

    [mpm_winnt:notice] [pid 1040:tid 392] AH00422: Parent: Received shutdown signal -- Shutting down the server.
    [mpm_winnt:notice] [pid 3208:tid 296] AH00364: Child: All worker threads have exited.
    [mpm_winnt:notice] [pid 1040:tid 392] AH00430: Parent: Child process 3208 exited successfully.
    [mpm_winnt:notice] [pid 1028:tid 392] AH00455: Apache/2.4.29 (Win64) OpenSSL/1.1.0f configured -- resuming normal operations
    [mpm_winnt:notice] [pid 1028:tid 392] AH00456: Apache Lounge VC15 Server built: Oct 20 2017 12:12:11
    [core:notice] [pid 1028:tid 392] AH00094: Command line: 'D:\xwamp\Apache\bin\httpd.exe -d D:/xwamp/apache -d D:\xwamp\Apache -f D:\xwamp\conf/httpd.conf'
    [mpm_winnt:notice] [pid 1028:tid 392] AH00418: Parent: Created child process 1604
    [mpm_winnt:notice] [pid 1604:tid 296] AH00354: Child: Starting 350 worker threads.

    =====处理思路记录===

    网上出现类似错误的帖子和网页有很多,基本都是提问的,没有回答。

    1.可能设置了MaxConnectionsPerChild值使得定期重启。

    将改值设置为0,观察一段时间后,还是出现这样的情况。无效。

    2.手贱安装搜狗输入法,卸载之。发现还是没有解决。

    3.重新安装官方版本的vc2017.待观察效果如何。

    4.将php目录和其ext目录加入环境path中.待观察效果如何。

    问题仍然存在。

    =====新的问题记录===

    PHP错误日志:

    PHP Fatal error:  Couldn't find implementation for method Nil\Base\Headers::getiterator in Unknown on line 0

    PHP Fatal error:  Couldn't find implementation for method Nil\Log::getiterator in Unknown on line 0

    紧接着apache错误事件

    错误应用程序名称: httpd.exe,版本: 2.4.29.0,时间戳: 0x59e9c9a6
    错误模块名称: php7ts.dll,版本: 7.1.11.0,时间戳: 0x59f1053d
    异常代码: 0xc0000005
    错误偏移量: 0x000000000001d953
    错误进程 ID: 0xfd8
    错误应用程序启动时间: 0x01d3882389b740bc
    错误应用程序路径: D:xwampApacheinhttpd.exe
    错误模块路径: D:xwampphpphp-7.1.11-Win32-VC14-x64php7ts.dll
    报告 ID: 9d32a94e-f41e-11e7-8bb8-e17153452aaf

    =====处理思路记录===

    1.php7ts使用的vc14,重新安装vc14吧。VC15 is backward compatible to VC14. That means, a VC14 module can be used inside a VC15 binary (for example PHP VC14 as module).不需要安装vc14.

    2.将php升级到当前最新版本7.1.13。

     还是没有用。。。

    =====处理思路记录===

    1.使用ab测试,大量并发处理,直接出现错误

    apr_pollset_add(): Not enough space (12)

    与此同时,服务器出现之前的错误事件。

    2.ab测试静态文件,没有问题。ab测试单个php文件,没有问题。

    3.所以嘛,最终的原因就是php占用太多的资源导致。

    4.将nilcms框架的log日志关闭,定义一个简单路由(不写入任何文件日志),ab测试之,完好无损!!

    因此,下面分析:

    服务器中大量的请求,导致频繁写入日志,使得资源占用过高,导致apache异常频繁重启。

    验证:

    查看服务器中出现错误的那一刻,访问的请求数量。五六个并发而已,就挂掉了。。。(穷。。。)

    ========但是没有这么简单========

    1.开启opcache,目前没有发现问题。

    2.框架也有问题,测试发现使用ArrayObject类,ab测试就会崩溃,继续测试中。

  • 相关阅读:
    HDU 5059 Help him
    HDU 5058 So easy
    HDU 5056 Boring count
    HDU 5055 Bob and math problem
    HDU 5054 Alice and Bob
    HDU 5019 Revenge of GCD
    HDU 5018 Revenge of Fibonacci
    HDU 1556 Color the ball
    CodeForces 702D Road to Post Office
    CodeForces 702C Cellular Network
  • 原文地址:https://www.cnblogs.com/osfipin/p/8240987.html
Copyright © 2011-2022 走看看