Vps هنگ ميكنه

erroring

Member
VPS با دو تا سايت و حدود 100-200 نفر آنلاين گاهي هنگ ميكنه و حتي با putty هم به زحمت ميشه httpd رو ريستارت كرد. (با ريستارت كردن httpd مشكل حل ميشه) كسي تا حالا با اين مشكل برخورده؟ راه حلش چيه؟

وقتي اين مشكل پيش مياد در قسمت Service Monitor دايركت ادمين مقابل httpd و mysqld پر ميشه از pid
 
آخرین ویرایش:

erroring

Member
لاگ ارور آپاچي :

کد:
[Wed Dec 24 16:13:48 2008] [error] child process 13378 still did not exit, sending a SIGKILL
[Wed Dec 24 16:13:48 2008] [error] child process 14254 still did not exit, sending a SIGKILL
[Wed Dec 24 16:13:48 2008] [error] child process 14525 still did not exit, sending a SIGKILL
[Wed Dec 24 16:13:48 2008] [error] child process 14809 still did not exit, sending a SIGKILL
[Wed Dec 24 16:13:48 2008] [error] child process 14257 still did not exit, sending a SIGKILL
[Wed Dec 24 16:13:48 2008] [error] child process 15599 still did not exit, sending a SIGKILL
[Wed Dec 24 16:13:48 2008] [error] child process 14838 still did not exit, sending a SIGKILL
[Wed Dec 24 16:13:48 2008] [error] child process 13846 still did not exit, sending a SIGKILL
[Wed Dec 24 16:13:48 2008] [error] child process 15199 still did not exit, sending a SIGKILL
[Wed Dec 24 16:13:48 2008] [error] child process 13879 still did not exit, sending a SIGKILL
[Wed Dec 24 16:13:48 2008] [error] child process 15035 still did not exit, sending a SIGKILL
[Wed Dec 24 16:13:48 2008] [error] child process 15220 still did not exit, sending a SIGKILL
[Wed Dec 24 16:13:48 2008] [error] child process 15340 still did not exit, sending a SIGKILL
[Wed Dec 24 16:13:48 2008] [error] child process 13899 still did not exit, sending a SIGKILL
[Wed Dec 24 16:13:48 2008] [error] child process 13900 still did not exit, sending a SIGKILL
[Wed Dec 24 16:13:48 2008] [error] child process 15122 still did not exit, sending a SIGKILL
[Wed Dec 24 16:13:48 2008] [error] child process 15360 still did not exit, sending a SIGKILL
[Wed Dec 24 16:13:48 2008] [error] child process 15362 still did not exit, sending a SIGKILL
[Wed Dec 24 16:13:48 2008] [error] child process 15124 still did not exit, sending a SIGKILL
[Wed Dec 24 16:13:48 2008] [error] child process 14420 still did not exit, sending a SIGKILL
[Wed Dec 24 16:13:48 2008] [error] child process 14619 still did not exit, sending a SIGKILL
[Wed Dec 24 16:13:48 2008] [error] child process 14427 still did not exit, sending a SIGKILL
[Wed Dec 24 16:13:48 2008] [error] child process 15370 still did not exit, sending a SIGKILL
[Wed Dec 24 16:13:48 2008] [error] child process 15371 still did not exit, sending a SIGKILL
[Wed Dec 24 16:13:48 2008] [error] child process 15394 still did not exit, sending a SIGKILL
[Wed Dec 24 16:13:48 2008] [error] child process 15044 still did not exit, sending a SIGKILL
[Wed Dec 24 16:13:48 2008] [error] child process 14441 still did not exit, sending a SIGKILL
[Wed Dec 24 16:13:48 2008] [error] child process 14652 still did not exit, sending a SIGKILL
[Wed Dec 24 16:13:48 2008] [error] child process 15054 still did not exit, sending a SIGKILL
[Wed Dec 24 16:13:48 2008] [error] child process 15134 still did not exit, sending a SIGKILL
[Wed Dec 24 16:13:48 2008] [error] child process 15405 still did not exit, sending a SIGKILL
[Wed Dec 24 16:13:48 2008] [error] child process 15062 still did not exit, sending a SIGKILL
[Wed Dec 24 16:13:48 2008] [error] child process 15138 still did not exit, sending a SIGKILL
[Wed Dec 24 16:13:48 2008] [error] child process 15160 still did not exit, sending a SIGKILL
[Wed Dec 24 16:13:48 2008] [error] child process 15459 still did not exit, sending a SIGKILL
[Wed Dec 24 16:13:48 2008] [error] child process 15473 still did not exit, sending a SIGKILL
[Wed Dec 24 16:13:49 2008] [notice] caught SIGTERM, shutting down
[Wed Dec 24 16:13:59 2008] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Wed Dec 24 16:13:59 2008] [warn] Init: SSL server IP/port conflict: www.********.com:443 (/usr/local/directadmin/data/users/********/httpd.conf:48) vs. www.forum.********.com:443 (/usr/local/directadmin/data/users/********/httpd.conf:124)
[Wed Dec 24 16:13:59 2008] [warn] Init: SSL server IP/port conflict: localhost:443 (/etc/httpd/conf/extra/httpd-vhosts.conf:38) vs. www.forum.********.com:443 (/usr/local/directadmin/data/users/********/httpd.conf:124)
[Wed Dec 24 16:13:59 2008] [warn] Init: You should not use name-based virtual hosts in conjunction with SSL!!
[Wed Dec 24 16:13:59 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Dec 24 16:14:00 2008] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Wed Dec 24 16:14:00 2008] [warn] Init: SSL server IP/port conflict: www.********.com:443 (/usr/local/directadmin/data/users/********/httpd.conf:48) vs. www.forum.********.com:443 (/usr/local/directadmin/data/users/********/httpd.conf:124)
[Wed Dec 24 16:14:00 2008] [warn] Init: SSL server IP/port conflict: localhost:443 (/etc/httpd/conf/extra/httpd-vhosts.conf:38) vs. www.forum.********.com:443 (/usr/local/directadmin/data/users/********/httpd.conf:124)
[Wed Dec 24 16:14:00 2008] [warn] Init: You should not use name-based virtual hosts in conjunction with SSL!!
[Wed Dec 24 16:14:00 2008] [notice] Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8b DAV/2 PHP/5.2.8 configured -- resuming normal operations
[Wed Dec 24 16:17:52 2008] [error] [client 85.133.253.145] request failed: error reading the headers, referer: http://img.#######.com/randimg.php?c=10&t=vh
[Wed Dec 24 16:18:49 2008] [error] [client 85.198.61.4] Invalid URI in request &lastID=1774 HTTP/1.1
[Wed Dec 24 16:18:49 2008] [error] [client 85.198.61.4] File does not exist: /var/www/html/400.shtml
 

erroring

Member
اينطوري كه تو نت سرچ زدم مشكل مربوط به خطوط اينطوري ميشه :
کد:
[Wed Dec 24 16:13:48 2008] [error] child process 15459 still did not exit, sending a SIGKILL
[Wed Dec 24 16:13:48 2008] [error] child process 15473 still did not exit, sending a SIGKILL
[Wed Dec 24 16:13:49 2008] [notice] caught SIGTERM, shutting down

اما جوابي براي حل اين مشكل پيدا نكردم.
 

Mozafary

Member
۱-اون سایتها php هستن؟اگر هستن نسخه php سرورت رو بگو
۲-نسخه ی apache و اینکه در تنظیمات keepalive و MaxClients چه متغییری داری؟
 

Mozafary

Member
http://forum.openvz.org/pdf.php?th=1342&
اینم مشکل شمارو داشته البته این خودش به بقیه vps میداده و میگه که یه دفعه روی همه vpsها apache مشکل پیدا میکرده.اخر هم مشکل رو در crond پیدا کرده.شما ببین توی cron چی داری.اینجور که این گفته ممکن هست اصلا مشکل از شما نباشه و از دیگر vpsهایی باشه که روی اون سرور هستن!
 

erroring

Member
بله php هستند. (مامبو البته smf و 4images هم نصبه)
مشخصات :
PHP Version 5.2.8
Apache 2.2.11

keepalive و MaxClients رو بايد از چه فايلي نگاه كنم؟ كجا ذخيره ميشه؟
 

Mozafary

Member
httpd.conf
/usr/local/apache/conf/httpd.cof
/etc/httpd/conf/httpd.conf
توی این مسیرها هست معمولا
 

erroring

Member
اين محتواي فايل httpd.conf كه در مسير دوم پيداش كردم (در مسير اول شاخه apache وجود نداشت) :

کد:
#
# This is the main Apache HTTP server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.2> for detailed information.
# In particular, see 
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do.  They're here only as hints or reminders.  If you are unsure
# consult the online docs. You have been warned.  

ServerRoot "/etc/httpd"
Listen 80

#LoadModule dummy_module /usr/lib/apache/mod_dummy.so
#LoadModule php5_module        /usr/lib/apache/libphp5.so
Include	/etc/httpd/conf/extra/httpd-phpmodules.conf

User apache
Group apache

ServerAdmin admin@localhost
DocumentRoot "/var/www/html"

<Directory /home/*>
    AllowOverride All
    Options -MultiViews -Indexes FollowSymlinks IncludesNoExec +Includes
<Limit GET POST OPTIONS PROPFIND>
    Order allow,deny
    Allow from all
</Limit>
<LimitExcept GET POST OPTIONS PROPFIND>
    Order deny,allow
    Deny from all
</LimitExcept>
</Directory>

<Directory />
    Options All
    AllowOverride All
</Directory>

<Directory "/var/www/html">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
   <IfModule mod_suphp.c>
        suPHP_Engine On
        suPHP_UserGroup webapps webapps
   </IfModule>
</Directory>

<IfModule dir_module>
    DirectoryIndex index.html index.htm index.shtml index.php index.php5 index.php4 index.php3 index.phtml index.cgi
</IfModule>

<FilesMatch "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy All
</FilesMatch>

ErrorLog /var/log/httpd/error_log
LogLevel warn

<IfModule log_config_module>
    #replace %b with %O for more accurate logging
    <IfModule mod_logio.c>
      LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
      LogFormat "%h %l %u %t \"%r\" %>s %O" common
      LogFormat "%O" bytes

      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    </IfModule>

    CustomLog /var/log/httpd/access_log common
</IfModule>

<IfModule alias_module>
    # Include some DirectAdmin alias
    Include conf/extra/httpd-alias.conf
</IfModule>

<Directory "/var/www/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>

DefaultType text/plain

<IfModule mime_module>
    TypesConfig conf/mime.types
    AddType application/x-gzip .tgz
    AddEncoding x-compress .Z
    AddEncoding x-gzip .gz .tgz
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
    AddHandler cgi-script .cgi
    AddHandler type-map var
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
	AddType video/x-ms-asf .avi
	AddType video/mpeg .mpg
	AddType video/mpeg .mpeg
	AddType video/quicktime .mov
	AddType video/x-ms-wmv .wmv
</IfModule>

#EnableMMAP off
#EnableSendfile off

#######################################################################################
# Do not change anything in included files, because they are rewritten by DirectAdmin #
#######################################################################################

# This is needed for PHP
Include conf/extra/httpd-php-handlers.conf

# Server-pool management (MPM specific)
Include conf/extra/httpd-mpm.conf

# Multi-language error messages
Include conf/extra/httpd-multilang-errordoc.conf

# Fancy directory listings
Include conf/extra/httpd-autoindex.conf

# Language settings
Include conf/extra/httpd-languages.conf

# User home directories
#Include conf/extra/httpd-userdir.conf

# Real-time info on requests and configuration
Include conf/extra/httpd-info.conf

# Virtual hosts
Include conf/extra/httpd-vhosts.conf

# Local access to the Apache HTTP Server Manual
#Include conf/extra/httpd-manual.conf

# Distributed authoring and versioning (WebDAV)
Include conf/extra/httpd-dav.conf

# Various default settings
Include conf/extra/httpd-default.conf

# Secure (SSL/TLS) connections
Include conf/extra/httpd-ssl.conf

# Deflate module settings
Include conf/extra/httpd-deflate.conf

# All the DirectAdmin vhosts
Include conf/extra/directadmin-vhosts.conf

# All suPHP directives
Include conf/extra/httpd-suphp.conf

# All the other includes needed by the custombuild script
Include conf/extra/httpd-includes.conf

#######################################################################################
# End of included files that are rewritten by DirectAdmin                             #
#######################################################################################

<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
 

erroring

Member
اما همونطور كه مي بينيد هيچ كدوم از اون دو پارامتر (keepalive و MaxClients) تو اين فايل مقدار دهي نشده (ممكنه تو include هاي دايركت ادمين تعريف شده باشه
297.gif
)
 
آخرین ویرایش:

Mozafary

Member
Timeout 300
KeepAlive On
MaxKeepAliveRequests 300
KeepAliveTimeout 15
MinSpareServers 5
MaxSpareServers 20
StartServers 8
MaxClients 150
MaxRequestsPerChild 0
با این شروع کن ببینیم چطور میشه
 

erroring

Member
منم فكر ميكنم مربوط به همين پارامتر ها باشه. چون تعداد بازديد كننده كه از يه حدي كمتره لود سايت پايينه اما وقتي از يه حدي مي گذره سرور هنگ ميكنه. ok ببينم چي ميشه.
 

erroring

Member
با تنظيم اين پارامتر ها و نصب فايروال توسط پشتيباني مشكل هنگ كردن حل شده اما الان لود بالاست اكثر اوغات روي 5 و گاهي تا 20 هم ميره بالا. اين مشكل به خاطر چيه؟
 

Mozafary

Member
5بالانیست.
اینکه بعضی اوقات خیلی load بالا میره هم طبیعی هست.اگر دائما بالا باشه بحثش متفاوت هست
با تنظيم اين پارامتر ها و نصب فايروال توسط پشتيباني مشكل هنگ كردن حل شده اما الان لود بالاست اكثر اوغات روي 5 و گاهي تا 20 هم ميره بالا. اين مشكل به خاطر چيه؟
 

erroring

Member
اما سرعت سايت به شدت كم شده (با سايت هاي چك كننده سرعت هم تست كردم) يك نرم افزار نمايش دهنده مراجعين ميزان Direct Access رو براي 12 ساعت حدود 20000 تا زده بود كه غير طبيعيه. اين ممكنه به خاطر حملات DoS باشه؟
 

erroring

Member
مرسي. ليستي از اي پي ها مياد كه يه عدد (حدس ميزنم تعداد Request يا كانكشن باشه) جلوشه. اين اعداد نشون دهنده چيه و چطوري ميشه يه اي پي رو بلاك كرد؟
 

جدیدترین ارسال ها

بالا