LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Server locking on page loads? Which? (https://www.linuxquestions.org/questions/linux-software-2/server-locking-on-page-loads-which-379003/)

I_AM 11-01-2005 12:36 PM

Server locking on page loads? Which?
 
I have this server:

Dual Xeon 3.4GHz HT
4GB Memory
100MBit Uplink
2x300GB SCSI 10k Disks

Software
Apache 1.33
PHP 4.4.0
MySQL 4.1.13
cpanel 10.8x Current

APF
BFD
LSM
SIM
LES
mod dosevasive
mod throttle
zend optimizer
eaccelerator
nessus

Server Load:
CPU: always less than 0.25
Memory: always less than 20%
Disk: 10% usage
tmp: 2% usage

Problem: server is loading sites on/off. Half the time the pages lock u and give "page not found". This appies to all sites on the server (just a few as well).
1. Vbulletin forum (no more than 10-15 concurrent users max) about 300 unique hits per day
2. Business site (simple flash / php) about 300 unique hits per day

I do not know why it is happening but I am asking if maybe anything I installed above may cause this? Nothing was customized after the default installation (other than php/my.cnf mentioned)

Please let me know what could use the sites to act abnormally like the following

1. no page found
2. slow page load
3. normal page load (becomming almost rare).

I tried: Avant browser, IE 6.x (completely cleared cache/cookies and all). I'm on a cable LAN modem (extremely fast).

/etc/my.cnf

[mysqld]
datadir=/var/lib/mysql
skip-locking
skip-innodb
max_connections = 500
key_buffer = 128M
myisam_sort_buffer_size = 64M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 2M
table_cache = 1800
thread_cache_size = 384
wait_timeout = 900
connect_timeout = 10
tmp_table_size = 256M
read_rnd_buffer_size = 524288
bulk_insert_buffer_size = 8M
max_allowed_packet = 64M
max_connect_errors = 10
query_cache_limit = 3M
query_cache_size = 256M
query_cache_type = 1
query_prealloc_size = 16384
query_alloc_block_size = 16384
old-passwords

[mysql.server]
user=mysql
basedir=/var/lib

[mysqld_safe]
err-log=/var/log/mysqld.log
pid-file=/var/lib/mysql/mysql.pid
open_files_limit=8192

[mysqldump]
quick
max_allowed_packet=32M

[mysql]
no-auto-rehash
#safe-updates

[isamchk]
key_buffer=64M
sort_buffer=64M
read_buffer=16M
write_buffer=16M

[myisamchk]
key_buffer=256M
sort_buffer=256M
read_buffer=128M
write_buffer=128M

[mysqlhotcopy]
interactive-timeout

php.ini (Zend / eaccelerator)

zend_extension="/ea/eaccelerator-0.9.3/modules/eaccelerator.so"
eaccelerator.shm_size="1024"
eaccelerator.cache_dir="/tmp/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="5"

[Zend]
zend_optimizer.optimization_level=5
zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-2.5.10
zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-2.5.10
zend_optimizer.version=2.5.10a
zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so

max_execution_time = 30 ; Maximum execution time of each script, in seconds
memory_limit = 8M ; Maximum amount of memory a script may consume (8MB)

httpd.conf

Timeout 300
KeepAlive On
MaxKeepAliveRequests 120
KeepAliveTimeout 15
MinSpareServers 15
MaxSpareServers 20
StartServers 10
MaxClients 150
MaxRequestsPerChild 1000
#Listen 3000
#Listen 12.34.56.78:80

/etc/resolv.conf
confirmed with data center correct

TOP

Code:

17647 root      17  0  5780 1348  908 R    0.9  0.0  0:00  3 top
    1 root      16  0  2100  572  488 S    0.0  0.0  0:10  0 init
    2 root      RT  0    0    0    0 SW    0.0  0.0  0:07  0 migration/0
    3 root      34  19    0    0    0 SWN  0.0  0.0  0:02  0 ksoftirqd/0
    4 root      RT  0    0    0    0 SW    0.0  0.0  0:05  1 migration/1
    5 root      34  19    0    0    0 SWN  0.0  0.0  0:02  1 ksoftirqd/1
    6 root      RT  0    0    0    0 SW    0.0  0.0  0:09  2 migration/2
    7 root      34  19    0    0    0 SWN  0.0  0.0  0:09  2 ksoftirqd/2
    8 root      RT  0    0    0    0 SW    0.0  0.0  0:09  3 migration/3
    9 root      34  19    0    0    0 SWN  0.0  0.0  0:03  3 ksoftirqd/3
  10 root      5 -10    0    0    0 SW<  0.0  0.0  0:00  0 events/0
  11 root      5 -10    0    0    0 SW<  0.0  0.0  0:00  1 events/1
  12 root      5 -10    0    0    0 SW<  0.0  0.0  0:00  2 events/2
  13 root      5 -10    0    0    0 SW<  0.0  0.0  0:00  3 events/3
  14 root      12 -10    0    0    0 SW<  0.0  0.0  0:00  3 khelper
  15 root      15 -10    0    0    0 SW<  0.0  0.0  0:00  0 kacpid
  38 root      5 -10    0    0    0 SW<  0.0  0.0  0:00  0 kblockd/0
  39 root      5 -10    0    0    0 SW<  0.0  0.0  0:00  1 kblockd/1
  40 root      5 -10    0    0    0 SW<  0.0  0.0  0:00  2 kblockd/2
  41 root      5 -10    0    0    0 SW<  0.0  0.0  0:00  3 kblockd/3
  42 root      15  0    0    0    0 SW    0.0  0.0  0:00  3 khubd
  54 root      14 -10    0    0    0 SW<  0.0  0.0  0:00  0 aio/0
  55 root      14 -10    0    0    0 SW<  0.0  0.0  0:00  1 aio/1

Any help is appreciated.

vireshwali 11-02-2005 01:06 AM

No one better than apache error logs can tell you what is actually going on.
Set tye error loggin to debug in apache httpd.conf file.
Set display_errors to On in php.ini
Set debug level loggin in mysql.cnf

restart apache and mysql

and keep a strict eye on apache error log and mysql log.

My experiences say that you are bound to have a concrete reason for all your problem in about 30 minutes.

sundialsvcs 11-02-2005 09:21 AM

The good news is, this amount of load is positively trivial. There should be no delays of any kind... and since there are, it's probably some kind of error that's resulting in a (useless) retry until an (eventual) timeout. The log-files for Apache and/or MySQL should be littered with messages ...


All times are GMT -5. The time now is 05:26 AM.