環境為一台Apache 2.2.25+php 5.2.17開啟虛擬主機功能。 近日想將各vhost的流量實時提供給用戶查詢,並實現流量超標自動警告與關停。遂使用第三方模塊 mod_log_sql 實現實時將日誌導入mysql,通過bytes_in,bytes_on可計算出流量。但有vhost用戶反映網站快速刷新幾次后,會出現伺服器無響應: No data received Unable to load the webpage because the server sent no data. Error code: ERR_EMPTY_RESPONSE
查看系統日誌發現: tail /var/log/message
kernel: httpd: segfault at 7fcff0000128 ip 00007fcff0000128 sp 00007fd0075fd948 error 15 kernel: httpd general protection ip:7fd01407d2f2 sp:7fd00d82d950 error:0 in libmysqlclient.so.16.0.0 kernel: httpd general protection ip:7fd01407d2f2 sp:7fd0043f8950 error:0 in libmysqlclient.so.16.0.0