ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Накопление процессов апача



PHP, и апач вместе с ним, ждут ответа от mysql-сервера. Проблема не в nginx.

2008/12/18 Дмитрий Леоненко <dmitry.leonenko@xxxxxxxxx>
Привет всем. Может быть тема обсуждалась и я спрашиваю "баян", но.
Стоит nginx за ним апач 2.2

через 5 минут накапливается под 300 процессов апача в состоянии sbwait. Атач к одному из них дает:

[root@customer-3891]/var/log#gdb /usr/local/sbin/httpd 60003
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-marcel-freebsd"...(no debugging symbols found)...
Attaching to program: /usr/local/sbin/httpd, process 60003
Reading symbols from /lib/libm.so.3...(no debugging symbols found)...done.
Loaded symbols for /lib/libm.so.3
Reading symbols from /usr/local/lib/libpcre.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libpcre.so.0
Reading symbols from /usr/local/lib/libaprutil-1.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libaprutil-1.so.3
Reading symbols from /usr/local/lib/libexpat.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libexpat.so.6
Reading symbols from /usr/local/lib/libiconv.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libiconv.so.3
Reading symbols from /usr/local/lib/libapr-1.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libapr-1.so.3
Reading symbols from /lib/libcrypt.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/libcrypt.so.2
Reading symbols from /usr/lib/libpthread.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libpthread.so.1
Reading symbols from /lib/libc.so.5...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.5
Reading symbols from /usr/local/libexec/apache22/mod_authn_file.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_authn_file.so
Reading symbols from /usr/local/libexec/apache22/mod_authn_dbm.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_authn_dbm.so
Reading symbols from /usr/local/libexec/apache22/mod_authn_anon.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_authn_anon.so
Reading symbols from /usr/local/libexec/apache22/mod_authn_default.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_authn_default.so
Reading symbols from /usr/local/libexec/apache22/mod_authn_alias.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_authn_alias.so
Reading symbols from /usr/local/libexec/apache22/mod_authz_host.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_authz_host.so
Reading symbols from /usr/local/libexec/apache22/mod_authz_groupfile.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_authz_groupfile.so
Reading symbols from /usr/local/libexec/apache22/mod_authz_user.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_authz_user.so
Reading symbols from /usr/local/libexec/apache22/mod_authz_dbm.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_authz_dbm.so
Reading symbols from /usr/local/libexec/apache22/mod_authz_owner.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_authz_owner.so
Reading symbols from /usr/local/libexec/apache22/mod_authz_default.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_authz_default.so
Reading symbols from /usr/local/libexec/apache22/mod_auth_basic.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_auth_basic.so
Reading symbols from /usr/local/libexec/apache22/mod_auth_digest.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_auth_digest.so
Reading symbols from /usr/local/libexec/apache22/mod_file_cache.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_file_cache.so
Reading symbols from /usr/local/libexec/apache22/mod_cache.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_cache.so
Reading symbols from /usr/local/libexec/apache22/mod_disk_cache.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_disk_cache.so
Reading symbols from /usr/local/libexec/apache22/mod_dumpio.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_dumpio.so
Reading symbols from /usr/local/libexec/apache22/mod_include.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_include.so
Reading symbols from /usr/local/libexec/apache22/mod_filter.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_filter.so
Reading symbols from /usr/local/libexec/apache22/mod_charset_lite.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_charset_lite.so
Reading symbols from /usr/local/libexec/apache22/mod_deflate.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_deflate.so
Reading symbols from /lib/libz.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/libz.so.2
Reading symbols from /usr/local/libexec/apache22/mod_log_config.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_log_config.so
Reading symbols from /usr/local/libexec/apache22/mod_logio.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_logio.so
Reading symbols from /usr/local/libexec/apache22/mod_env.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_env.so
Reading symbols from /usr/local/libexec/apache22/mod_mime_magic.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_mime_magic.so
Reading symbols from /usr/local/libexec/apache22/mod_cern_meta.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_cern_meta.so
Reading symbols from /usr/local/libexec/apache22/mod_expires.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_expires.so
Reading symbols from /usr/local/libexec/apache22/mod_headers.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_headers.so
Reading symbols from /usr/local/libexec/apache22/mod_usertrack.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_usertrack.so
Reading symbols from /usr/local/libexec/apache22/mod_unique_id.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_unique_id.so
Reading symbols from /usr/local/libexec/apache22/mod_setenvif.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_setenvif.so
Reading symbols from /usr/local/libexec/apache22/mod_version.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_version.so
Reading symbols from /usr/local/libexec/apache22/mod_ssl.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_ssl.so
Reading symbols from /usr/lib/libssl.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libssl.so.3
Reading symbols from /lib/libcrypto.so.3...(no debugging symbols found)...done.
Loaded symbols for /lib/libcrypto.so.3
Reading symbols from /usr/local/libexec/apache22/mod_mime.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_mime.so
Reading symbols from /usr/local/libexec/apache22/mod_dav.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_dav.so
Reading symbols from /usr/local/libexec/apache22/mod_status.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_status.so
Reading symbols from /usr/local/libexec/apache22/mod_autoindex.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_autoindex.so
Reading symbols from /usr/local/libexec/apache22/mod_asis.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_asis.so
Reading symbols from /usr/local/libexec/apache22/mod_info.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_info.so
Reading symbols from /usr/local/libexec/apache22/mod_cgi.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_cgi.so
Reading symbols from /usr/local/libexec/apache22/mod_dav_fs.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_dav_fs.so
Reading symbols from /usr/local/libexec/apache22/mod_vhost_alias.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_vhost_alias.so
Reading symbols from /usr/local/libexec/apache22/mod_negotiation.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_negotiation.so
Reading symbols from /usr/local/libexec/apache22/mod_dir.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_dir.so
Reading symbols from /usr/local/libexec/apache22/mod_imagemap.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_imagemap.so
Reading symbols from /usr/local/libexec/apache22/mod_actions.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_actions.so
Reading symbols from /usr/local/libexec/apache22/mod_speling.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_speling.so
Reading symbols from /usr/local/libexec/apache22/mod_userdir.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_userdir.so
Reading symbols from /usr/local/libexec/apache22/mod_alias.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_alias.so
Reading symbols from /usr/local/libexec/apache22/mod_rewrite.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_rewrite.so
Reading symbols from /usr/local/libexec/apache22/libphp5.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/libphp5.so
Reading symbols from /usr/local/lib/libxml2.so.5...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libxml2.so.5
Reading symbols from /usr/local/lib/libz.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libz.so
Reading symbols from /usr/local/libexec/apache22/mod_rpaf.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_rpaf.so
Reading symbols from /usr/local/libexec/apache22/mod_suexec.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache22/mod_suexec.so
Reading symbols from /usr/local/lib/php/20060613/eaccelerator.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/php/20060613/eaccelerator.so
Reading symbols from /usr/local/lib/php/20060613/mysql.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/php/20060613/mysql.so
Reading symbols from /usr/local/lib/mysql/libmysqlclient.so.16...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/mysql/libmysqlclient.so.16
Reading symbols from /usr/local/lib/php/20060613/simplexml.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/php/20060613/simplexml.so
Reading symbols from /usr/local/lib/php/20060613/spl.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/php/20060613/spl.so
Reading symbols from /usr/local/lib/php/20060613/mysqli.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/php/20060613/mysqli.so
Reading symbols from /usr/local/lib/php/20060613/session.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/php/20060613/session.so
Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols found)...done.
Loaded symbols for /libexec/ld-elf.so.1
[Switching to LWP 100663]
0x282dd447 in read () from /lib/libc.so.5
(gdb) where
#0  0x282dd447 in read () from /lib/libc.so.5
#1  0x28272b5d in read () from /usr/lib/libpthread.so.1
#2  0x289eaf41 in vio_read () from /usr/local/lib/mysql/libmysqlclient.so.16
#3  0x289eafae in vio_read_buff () from /usr/local/lib/mysql/libmysqlclient.so.16
#4  0x289ebcf0 in my_real_read () from /usr/local/lib/mysql/libmysqlclient.so.16
#5  0x289ebeed in my_net_read () from /usr/local/lib/mysql/libmysqlclient.so.16
#6  0x289e5bfa in cli_safe_read () from /usr/local/lib/mysql/libmysqlclient.so.16
#7  0x289e86a4 in cli_read_query_result () from /usr/local/lib/mysql/libmysqlclient.so.16
#8  0x289e895b in mysql_real_query () from /usr/local/lib/mysql/libmysqlclient.so.16
#9  0x289b6025 in php_mysql_do_query_general () from /usr/local/lib/php/20060613/mysql.so
#10 0x289b6215 in php_mysql_do_query () from /usr/local/lib/php/20060613/mysql.so
#11 0x289b623c in zif_mysql_query () from /usr/local/lib/php/20060613/mysql.so
#12 0x2874be1b in zend_do_fcall_common_helper_SPEC () from /usr/local/libexec/apache22/libphp5.so
#13 0x28752254 in ZEND_DO_FCALL_SPEC_CONST_HANDLER () from /usr/local/libexec/apache22/libphp5.so
#14 0x2874b605 in execute () from /usr/local/libexec/apache22/libphp5.so
#15 0x2874bf18 in zend_do_fcall_common_helper_SPEC () from /usr/local/libexec/apache22/libphp5.so
#16 0x2874c2b9 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER () from /usr/local/libexec/apache22/libphp5.so
#17 0x2874b605 in execute () from /usr/local/libexec/apache22/libphp5.so
#18 0x287257af in zend_call_function () from /usr/local/libexec/apache22/libphp5.so
#19 0x287247f0 in call_user_function_ex () from /usr/local/libexec/apache22/libphp5.so
#20 0x2869e7c0 in zif_call_user_func_array () from /usr/local/libexec/apache22/libphp5.so
#21 0x2874be1b in zend_do_fcall_common_helper_SPEC () from /usr/local/libexec/apache22/libphp5.so
#22 0x28752254 in ZEND_DO_FCALL_SPEC_CONST_HANDLER () from /usr/local/libexec/apache22/libphp5.so
#23 0x2874b605 in execute () from /usr/local/libexec/apache22/libphp5.so
#24 0x287257af in zend_call_function () from /usr/local/libexec/apache22/libphp5.so
#25 0x287247f0 in call_user_function_ex () from /usr/local/libexec/apache22/libphp5.so
#26 0x2869e7c0 in zif_call_user_func_array () from /usr/local/libexec/apache22/libphp5.so
#27 0x2874be1b in zend_do_fcall_common_helper_SPEC () from /usr/local/libexec/apache22/libphp5.so
#28 0x28752254 in ZEND_DO_FCALL_SPEC_CONST_HANDLER () from /usr/local/libexec/apache22/libphp5.so
#29 0x2874b605 in execute () from /usr/local/libexec/apache22/libphp5.so
#30 0x2874bf18 in zend_do_fcall_common_helper_SPEC () from /usr/local/libexec/apache22/libphp5.so
#31 0x2874c2b9 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER () from /usr/local/libexec/apache22/libphp5.so
#32 0x2874b605 in execute () from /usr/local/libexec/apache22/libphp5.so
#33 0x2874bf18 in zend_do_fcall_common_helper_SPEC () from /usr/local/libexec/apache22/libphp5.so
#34 0x2874c2b9 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER () from /usr/local/libexec/apache22/libphp5.so
#35 0x2874b605 in execute () from /usr/local/libexec/apache22/libphp5.so
#36 0x2874bf18 in zend_do_fcall_common_helper_SPEC () from /usr/local/libexec/apache22/libphp5.so
#37 0x2874c2b9 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER () from /usr/local/libexec/apache22/libphp5.so
#38 0x2874b605 in execute () from /usr/local/libexec/apache22/libphp5.so
#39 0x2874bf18 in zend_do_fcall_common_helper_SPEC () from /usr/local/libexec/apache22/libphp5.so
#40 0x2874c2b9 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER () from /usr/local/libexec/apache22/libphp5.so
#41 0x2874b605 in execute () from /usr/local/libexec/apache22/libphp5.so
#42 0x2874bf18 in zend_do_fcall_common_helper_SPEC () from /usr/local/libexec/apache22/libphp5.so
#43 0x2874c2b9 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER () from /usr/local/libexec/apache22/libphp5.so
#44 0x2874b605 in execute () from /usr/local/libexec/apache22/libphp5.so
#45 0x28731ab4 in zend_execute_scripts () from /usr/local/libexec/apache22/libphp5.so
#46 0x286f64e2 in php_execute_script () from /usr/local/libexec/apache22/libphp5.so
#47 0x287b10e5 in php_handler () from /usr/local/libexec/apache22/libphp5.so
#48 0x0807419e in ap_run_handler ()
#49 0x080746be in ap_invoke_handler ()
---Type <return> to continue, or q <return> to quit---
#50 0x0807f31c in ap_process_request ()
#51 0x0807d066 in ap_process_http_connection ()
#52 0x08079ea6 in ap_run_process_connection ()
#53 0x0807a1a3 in ap_process_connection ()
#54 0x0808384f in child_main ()
#55 0x080839c5 in make_child ()
#56 0x08083be1 in perform_idle_server_maintenance ()
#57 0x08083fd9 in ap_mpm_run ()
#58 0x08063cdb in main ()
(gdb)



Конфига nginx следующая:
---------------- ............. --------------------
    access_log  off;
    sendfile        on;
    tcp_nopush     on;


        client_header_timeout   1024;
        client_body_timeout     1024;
        send_timeout            9000;
        proxy_read_timeout      4000;

        connection_pool_size            256;
        client_header_buffer_size       2k;
        client_max_body_size            10m;
        large_client_header_buffers     2 8k;
        request_pool_size               8k;
        proxy_buffers 16 64k;
        proxy_buffer_size  64k;

    #keepalive_timeout  0;
    keepalive_timeout  65;

----------- ........................... --------------------


Подскажите, почему все начинает загибаться? Мне кажется апач перестает передавать данные на nginx.




--
С уважением, Борис Долгов.
icq 77556665
e-mail boris@xxxxxxxxxxx


 




Copyright © Lexa Software, 1996-2009.