banner

[Rule] Rules  [Home] Main Forum  [Portal] Portal  
[Members] Member Listing  [Statistics] Statistics  [Search] Search  [Reading Room] Reading Room 
[Register] Register  
[Login] Loginhttp  | https  ]
 
Forum Index Thảo luận hệ điều hành *nix Máy chủ apache load chậm  XML
  [Question]   Máy chủ apache load chậm 18/02/2009 04:59:07 (+0700) | #1 | 169819
mrchick
Member

[Minus]    0    [Plus]
Joined: 30/07/2008 12:24:46
Messages: 19
Offline
[Profile] [PM]
Máy chủ web của e cấu hình dual core 3GHz , Ram 2Gb cấu hình file httpd.conf MPM prefork như sau:

KeepAlive On

MaxKeepAliveRequests 100

KeepAliveTimeout 10

<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 20
ServerLimit 256
MaxClients 256
MaxRequestsPerChild 4000
</IfModule>

E dung lệnh kiểm tra process ps –ef |grep httpd | wc –l thì cứ dưới 14 thì vào web ổn định cứ từ 19 trở lên là load khá lâu. Các a chỉ dùm e cách giải quyết
[Up] [Print Copy]
  [Question]   Re: Máy chủ apache load chậm 18/02/2009 06:14:28 (+0700) | #2 | 169829
mrchick
Member

[Minus]    0    [Plus]
Joined: 30/07/2008 12:24:46
Messages: 19
Offline
[Profile] [PM]
bổ sung thêm file error_log :

[Sun Feb 15 04:02:26 2009] [notice] LDAP: Built with OpenLDAP LDAP SDK
[Sun Feb 15 04:02:26 2009] [notice] LDAP: SSL support unavailable
[Sun Feb 15 04:02:26 2009] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Sun Feb 15 04:02:26 2009] [notice] Apache/2.0.52 (Red Hat) configured -- resuming normal operations
[Sun Feb 15 04:22:01 2009] [error] [client 74.6.8.102] File does not exist: /var/www/html/robots.txt
[Sun Feb 15 07:53:25 2009] [error] [client 65.55.209.244] File does not exist: /var/www/html/robots.txt
[Sun Feb 15 11:21:05 2009] [error] [client 72.30.142.247] File does not exist: /var/www/html/robots.txt
[Sun Feb 15 11:23:18 2009] [error] [client 66.249.67.185] File does not exist: /var/www/html/robots.txt
[Sun Feb 15 11:42:50 2009] [error] [client 123.24.150.65] File does not exist: /var/www/html/hittc/images/note_vuong.gif, referer: http://www.hittc.org.vn/css/views.css
[Sun Feb 15 11:42:53 2009] [error] [client 123.24.150.65] File does not exist: /var/www/html/portal/amlich-hnd.js, referer: http://www.hittc.org.vn/portal/index.php
[Sun Feb 15 11:43:00 2009] [error] [client 123.24.150.65] File does not exist: /var/www/html//favicon.ico
[Sun Feb 15 11:43:03 2009] [error] [client 123.24.150.65] File does not exist: /var/www/html//favicon.ico
[client 72.30.142.247] PHP Fatal error: Maximum execution time of 3000 seconds exceeded in /var/www/html/hittc/portal/clsNews.php on line 136
[client 72.30.142.247] PHP Fatal error: Maximum execution time of 3000 seconds exceeded in /var/www/html/hittc/portal/clsNews.php on line 136
[client 72.30.142.247] PHP Fatal error: Maximum execution time of 3000 seconds exceeded in /var/www/html/hittc/portal/clsNews.php on line 136

[Up] [Print Copy]
  [Question]   Re: Máy chủ apache load chậm 22/02/2009 02:19:17 (+0700) | #3 | 170398
[Avatar]
LM
Moderator

Joined: 16/04/2002 09:27:22
Messages: 129
Offline
[Profile] [PM] [WWW] [Yahoo!]
Vấn đề apache load chậm không ẳn do cấu hình server mà do ừng dụng.

Các log đã nói lên điều đó. ngay dìng 136 của code nó execute 3000s.

Nên coi code chỗ đó xử lý SQL hay gì không mà quá nặng.
[Up] [Print Copy]
  [Question]   Re: Máy chủ apache load chậm 23/02/2009 11:21:00 (+0700) | #4 | 170542
mrchick
Member

[Minus]    0    [Plus]
Joined: 30/07/2008 12:24:46
Messages: 19
Offline
[Profile] [PM]
E cảm ơn a LM . E sẽ kiểm tra lại
[Up] [Print Copy]
[digg] [delicious] [google] [yahoo] [technorati] [reddit] [stumbleupon]
Go to: 
 Users currently in here 
1 Anonymous

Powered by JForum - Extended by HVAOnline
 hvaonline.net  |  hvaforum.net  |  hvazone.net  |  hvanews.net  |  vnhacker.org
1999 - 2013 © v2012|0504|218|