我有一个Drupal Web服务器vps在6.3以下,自二月份以来一直运行良好。
在过去的几天里,网站已经开始closures:tcp连接,然后等待无限期。
如果我重新启动httpd,那么站点会在响应几分钟之前再次停止。
有足够的磁盘空间,CPU空闲,大约一半的系统内存在缓冲区和caching中。 Mysqld保持响应。
如果我在httpd工作进程上运行pstack,它们似乎陷在了同一个地方:
#0 0x00007f568d9c3a28 in poll () from /lib64/libc.so.6 #1 0x00007f568deb6717 in apr_wait_for_io_or_timeout () from /usr/lib64/libapr-1.so.0 #2 0x00007f568deb1a28 in apr_socket_sendv () from /usr/lib64/libapr-1.so.0 #3 0x00007f568f3d3083 in ?? () #4 0x00007f568f3d4035 in ap_core_output_filter () #5 0x00007f568f3e6194 in ap_http_chunk_filter () #6 0x00007f568f3e46db in ap_http_header_filter () #7 0x00007f568f3c8fd0 in ap_content_length_filter () #8 0x00007f568f3e6443 in ap_byterange_filter () #9 0x00007f568f3df9fc in ap_filter_flush () #10 0x00007f568f3c6f8e in ap_rwrite () #11 0x00007f5689814f76 in ?? () from /etc/httpd/modules/libphp5.so #12 0x00007f568974e36b in php_ub_body_write_no_header () from /etc/httpd/modules/libphp5.so #13 0x00007f568974e998 in php_end_ob_buffer () from /etc/httpd/modules/libphp5.so #14 0x00007f568974f32f in ?? () from /etc/httpd/modules/libphp5.so #15 0x00007f568974e998 in php_end_ob_buffer () from /etc/httpd/modules/libphp5.so #16 0x00007f568974f051 in ?? () from /etc/httpd/modules/libphp5.so #17 0x00007f56897db0c8 in ?? () from /etc/httpd/modules/libphp5.so #18 0x00007f56897b2400 in execute () from /etc/httpd/modules/libphp5.so #19 0x00007f568978cb3d in zend_execute_scripts () from /etc/httpd/modules/libphp5.so #20 0x00007f568973ada8 in php_execute_script () from /etc/httpd/modules/libphp5.so #21 0x00007f5689815a85 in ?? () from /etc/httpd/modules/libphp5.so #22 0x00007f568f3d4b00 in ap_run_handler () #23 0x00007f568f3d83be in ap_invoke_handler () #24 0x00007f568f3e386c in ap_internal_redirect () #25 0x00007f568b82a7a5 in ?? () from /etc/httpd/modules/mod_rewrite.so #26 0x00007f568f3d4b00 in ap_run_handler () #27 0x00007f568f3d83be in ap_invoke_handler () #28 0x00007f568f3e3a30 in ap_process_request () #29 0x00007f568f3e08f8 in ?? () #30 0x00007f568f3dc608 in ap_run_process_connection () #31 0x00007f568f3e8807 in ?? () #32 0x00007f568f3e8b1a in ?? () #33 0x00007f568f3e979c in ap_mpm_run () #34 0x00007f568f3c0900 in main ()
任何build议在哪里看下一个debugging呢?
尝试运行strace -p PID_OF_APACHE -f来debugging输出。 另外,也许你需要更新你的Apache版本和/或它的一个或多个依赖 – 甚至是Drupal(如果没有更新的话)。
您可能需要检查以上服务的更新日志,看看是否有任何已知问题。
堆栈跟踪显示php刷新输出缓冲区,并等待浏览器响应。
你应该做一个networking跟踪,看看来自某些客户的stream量不是不切实际的慢。 这可能是一个slowloris攻击。