Apache + MYSQL Optimization For High End Server
Jun 24, 2008
I have a fairly high end server in which I have installed SIM. SIM is restarting Apache up to 10 times a day, presumably due to high load causing un-availability.
On restart, Apache / MYSQL is stable until the load / mem usage begins to climb then it is restarted again. Here are my 'load' stats for today:
Load for today
High (2:18am): 4.63
Low (3:30am): 1.20
Mean: 1.84
Latest: 1.61
Mem usage for today
High (1:36am): 9,192.9 MB
Low (1:48am): 7,995.7 MB
Mean: 8,683.1 MB
Latest: 8,781.7 MB
I have seen it using 20GB RAM before.
I have tried to follow various optimisation guides but these seem tailored to less powerful servers.
The web application I run on this server is almost entirely MYSQL based, with thousands of DB calls a day. Across the entire system I probably get 200,000 bot hits per day or even more. At peak times search engine bots are literally hammering the server.
My server specs are:
# Processor: Quad-Core Xeon Processor * 8
# CPU Speed: 3Ghz
# RAM: 32 GB DDR2
# HDD: 36 GB 15k Raptor X2 + 1TB Sata
# OS: 32Bit CentOS
Changes / optimisation of the actual application is not possible.
My configuration files are:
My.cnf ....
View 11 Replies
ADVERTISEMENT
Apr 21, 2008
So the site got featured on [url]and now the server is drowning...
The Coppermine Gallery usually hovers around 30~50 users daily and now, 1800, and im at a lost as how I should configure mysql to take on such a load. right now it takes about 10 secs or more to load a page and sometimes it would time out. Because it si coppermine, all pages are dynamic and can't be cached -_-"
Here's the my.cnf right now after i played around with the numbers
server spec
Opteron 170 (2ghz)
2gb ram
250 7200rpm
[mysqld]
set-variable=local-infile=0
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
#skip-networking
back_log = 75
key_buffer = 256M
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 = 7200
max_connections = 600
connect_timeout = 100
wait_timeout = 12000
tmp_table_size = 100M
max_heap_table_size = 64M
max_allowed_packet = 15M
max_connect_errors = 9999999
read_rnd_buffer_size = 524288
bulk_insert_buffer_size = 8M
query_cache_limit = 40M
query_cache_size = 150M
query_cache_type = 1
query_prealloc_size = 65536
tmp_table_size = 64M
query_alloc_block_size = 131072
default-storage-engine = MyISAM
[mysql.server]
user=mysql
basedir=/var/lib
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
nice = -5
open_files_limit = 8192
[mysqldump]
quick
max_allowed_packet = 16M
[myisamchk]
key_buffer = 64M
sort_buffer = 64M
read_buffer = 16M
write_buffer = 16M
httpd.conf
Timeout 20
#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive Off
#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100
#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 15
##
## Server-Pool Size Regulation (MPM specific)
##
# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# ServerLimit: maximum value for MaxClients for the lifetime of the server
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 20
ServerLimit 200
MaxClients 200
MaxRequestsPerChild 1500
</IfModule>
# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule worker.c>
StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>
View 11 Replies
View Related
Jun 18, 2009
Can anyone recommend a Apached and MYSQL optimization expert? I just some optimization done on mysql and apache upgraded... but pache wouldn't restart with the following entries:
MinSpareThreads 25
MaxSpareThreads 35
ThreadsPerChild 25
if i remove above then it starts... but my CPU spikes and I am getting a ton of errors emailed to me:
Invalid SQL:
SELECT COUNT(DISTINCT(userid)) AS count FROM vb_session WHERE vb_session.userid>0 AND vb_session.lastactivity>1245294346;
MySQL Error : Out of memory (Needed 8388580 bytes)
Error Number : 5
Request Date : Wednesday, June 17th 2009 @ 09:39:06 PM
Error Date : Wednesday, June 17th 2009 @ 09:39:06 PM
Its constantly complaining about this same query and i thought i removed all of the vbulletin options...
i am pulling my hair out... cuz my server isn't swapping, ther are 0ver 8GBs in cache.... but my CPU goes up
Here is original problem thread...
[url]
2nd post has recommended config... and my subsequent probs
View 6 Replies
View Related
Jan 27, 2007
I just switched to a new server - I went from a Dual Opteron 248 with 3GB of RAM to a Dual Clovertown with 4GB of RAM. Yet, despite having mild traffic right now, my load is rather high and my memory usage is like 80% (which is ridiculous, since that would mean I would be maxing out on the old box).
For some reason, my servers usually lose access when I get around 400 people on TEXT-BASED, non-MySQL pages? How is that possible? I have really solid servers, yet people running basic Pentiums with 1 or 2GB never run into this issue.
Is there any good, cheap site that would be able to properly optimize mySQL and Apache to lower the load and figure out why the memory usage is so high? Platinum Server Management never really got this done, so even though they're great for other support issues, please don't recommend them.
View 0 Replies
View Related
Mar 3, 2007
We just upgraded to VBulletin 3.6.5, and are experiencing strange behavior. My forums are on a dedicated server, 27,000 users.
We'll be running along fine with loads of .5-2.00, etc. Then suddenly, the loads start climbing to 50, 70, 85+. We've been trying to figure out why. We even went on a different (much more robust) server, still the same result. This only started happening after the upgrade. Restarting the server corrects the problem, but only until it happens again. It can happen at anytime - during peak or off peak. The server may run for an hour or two until this happens, or it can happen 10 minutes after a restart.
Late last night when loads were normal we benched the server hard, and it ran just fine. We just can't figure out where this load spike is coming from.
Server info below:
Servers:
Mysql: server version: 5.0.27-log
PHP: PHP 5.1.6 (cli) Zend Engine v2.1.0,
Apache Server version: Apache/2.2.3
Kernel: 2.6.19-1.2911.fc6 #1 SMP
Server:
Pentium III with 1 gig of ram
15k RPM SCSI Raid 5
1 Gig RAM
-----------------------------------------------------------------------
[root@forums forums]# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 8
model name : Pentium III (Coppermine)
stepping : 6
cpu MHz : 861.001
cache size : 256 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca
cmov pat pse36 mmx fxsr sse
bogomips : 1722.41
processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 8
model name : Pentium III (Coppermine)
stepping : 6
cpu MHz : 861.001
cache size : 256 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca
cmov pat pse36 mmx fxsr sse
bogomips : 1721.51
--------------------------------------------------------------------------
my.cnf:
[root@forums forums]# cat /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
log_error = /var/log/mysql_error.log
log-slow-queries = /var/log/mysql_slow_queries.log
safe-show-database
old_passwords
back_log = 20
skip-innodb
key_buffer_size = 256M
myisam_sort_buffer_size = 64M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 2M
table_cache = 600
thread_cache_size = 384
wait_timeout = 35
connect_timeout = 10
tmp_table_size = 64M
max_heap_table_size = 64M
max_allowed_packet = 64M
max_connect_errors = 10
read_rnd_buffer_size = 524288
bulk_insert_buffer_size = 8M
query_cache_limit = 4M
query_cache_size = 48M
query_cache_type = 1
query_prealloc_size = 163840
query_alloc_block_size = 32768
default-storage-engine = MyISAM
[mysql.server]
user=mysql
basedir=/var/lib
[mysqld_safe]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
open_files_limit = 8192
[mysqldump]
quick
max_allowed_packet = 16M
[myisamchk]
key_buffer = 64M
sort_buffer = 64M
read_buffer = 16M
write_buffer = 16M
-------------------------------------------------------
Relevant Apache:
StartServers 10
MinSpareServers 10
MaxSpareServers 15
ServerLimit 256
MaxClients 90
MaxRequestsPerChild 1000
---------------------------------------------------------
View 3 Replies
View Related
Jul 2, 2008
My server is running a AMD Athlon(tm) XP 2000+ (1662 MHz)CPU
I only host one site, a vb forum on my server and its killing the CPU with only 80-100 people online.
The load averages are:
23.73 (1 mins) , 20.39 (5 mins) , 10.88 (15 mins)
and these are the processes that are making it slow:
Code:
ID Owner CPU Command
8003 mysql 34.1 % /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-f ...
7777 apache 2.1 % /usr/sbin/httpd
7911 apache 2.1 % /usr/sbin/httpd
8382 apache 2.1 % /usr/sbin/httpd
7857 apache 1.9 % /usr/sbin/httpd
7776 apache 1.8 % /usr/sbin/httpd
8384 apache 1.7 % /usr/sbin/httpd
7849 apache 1.6 % /usr/sbin/httpd
9159 root 1.6 % /usr/libexec/webmin/proc/index_cpu.cgi
7852 apache 1.5 % /usr/sbin/httpd
8790 apache 1.4 % /usr/sbin/httpd
8724 apache 1.2 % /usr/sbin/httpd
8775 apache 1.2 % /usr/sbin/httpd
8779 apache 1.1 % /usr/sbin/httpd
8841 apache 1.1 % /usr/sbin/httpd
155 root 1.0 % [kswapd0]
8752 apache 1.0 % /usr/sbin/httpd
8881 root 1.0 % /usr/bin/perl /usr/libexec/webmin/virtual-server/collectinfo.pl
8961 apache 1.0 % /usr/sbin/httpd
8759 apache 0.9 % /usr/sbin/httpd
8777 apache 0.9 % /usr/sbin/httpd
8956 apache 0.9 % /usr/sbin/httpd
8962 apache 0.9 % /usr/sbin/httpd ..
View 6 Replies
View Related
Oct 30, 2007
i run a fedora server with plesk 8 on it i was wondering if some one can help me to find the best way to optimize the databases on the server at once my servers contains many clients with unicode data in the database.
View 0 Replies
View Related
Mar 20, 2007
I currently have a server for proxy websites only.
I have disabled MySQL, is that ok?
Will my statistics software still work (awstats)?
What else can i disable or do to optimize the server for proxy websites.
I'm using the phproxy scripts.
View 0 Replies
View Related
Jul 2, 2009
I have a site that is eating up my server resources and need to know what the best solution for this is. I'm thinking of getting another server just for mysql but do not know what specs the server should be to handle the current traffic/database load and have the site run smoothly without slowing down to a snail's pace.
An alternative is to get another server just for the videos being served and leave the database and html on the current server. This is where I'm stuck and don't know what route to take with this.
My current server stats:
Dual Xeon 5130
4GB RAM
250GB
50 Mbit/sec
CentOS 3.9
Website traffic stats:
15,000 visitors/day
150,000 pageviews/day
Serving videos
I've attached screenshots of top and bandwidth usage per day. Hopefully with this information you could tell me if I need another server or if there are any things I can do to the current server to help things move faster.
View 13 Replies
View Related
Oct 31, 2009
My server is very slow, High CPU, High Apache load....
I got a new server and i had setup a script on it.
No server tweaks has been done.
I run a filehosting site so it gets very slow when traffic is high.
Here is some info:
Code:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
4135 filedip 19 0 12812 8892 2212 R 18.9 0.4 0:00.74 index.cgi
3140 apache 15 0 22624 9604 2768 S 17.3 0.5 1:54.45 httpd
3556 apache 15 0 22792 9592 2768 S 17.3 0.5 0:43.53 httpd
3739 apache 15 0 22672 9556 2744 S 17.3 0.5 1:09.67 httpd
3884 apache 15 0 22664 9560 2744 S 17.3 0.5 0:23.98 httpd
3474 apache 15 0 22672 9572 2756 R 16.1 0.5 1:34.09 httpd
3548 apache 15 0 22792 9560 2740 S 16.1 0.5 1:33.67 httpd
3991 apache 15 0 22640 9588 2756 S 15.1 0.5 0:22.44 httpd
3475 apache 15 0 22672 9580 2756 S 13.2 0.5 1:31.42 httpd
3493 apache 15 0 22664 9592 2768 S 12.9 0.5 1:15.52 httpd
3769 apache 15 0 22664 9580 2756 S 12.9 0.5 0:45.19 httpd
3638 apache 15 0 22664 9576 2756 S 12.3 0.5 0:32.82 httpd
3724 apache 16 0 22664 9580 2756 R 12.3 0.5 0:34.25 httpd
3626 apache 15 0 22672 9580 2756 S 11.7 0.5 0:52.54 httpd
4023 apache 16 0 22792 9560 2740 R 11.3 0.5 0:13.16 httpd
3882 apache 15 0 22664 9576 2756 S 10.1 0.5 0:38.56 httpd
3005 apache 15 0 22672 9588 2768 R 9.1 0.5 2:06.61 httpd
I dont know much about server managment...
how to fix this so server doesnt go slow?
View 6 Replies
View Related
Dec 11, 2007
just got a new server and got my site up and running on it perfectly but ive noticed its a bit slower than my old server and i think this is down to my incorrctly optimized mysql setup. ive used the my.cnf off my old server with some minor edits but im wondering what people can suggest i change for the following server spec
AMD Athlon 64 X2 4200+
2GB DDR2
120gb Sata hd
currently my my.cnf is as follows
Quote:
# This is for a system with little memory (32M - 64M) where MySQL plays
# an important part, or systems up to 128M where MySQL is used together with
# other programs (such as a web server)
#
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is /var/lib/mysql) or
# ~/.my.cnf to set user-specific options.
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.
# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /var/lib/mysql/mysql.sock
# Here follows entries for some specific programs
# The MySQL server
[mysqld]
old-passwords
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-locking
max_connections=1000
key_buffer = 1M
long_query_time = 5
query_cache_size = 64M
query_cache_limit = 64M
max_allowed_packet = 5M
table_cache = 2000
max_heap_table_size=32M
tmp_table_size=30M
thread_cache_size = 256
sort_buffer_size = 32M
net_buffer_length = 8K
read_buffer_size = 6M
read_rnd_buffer_size = 1M
myisam_sort_buffer_size = 32M
join_buffer_size = 3M
open_files_limit = 50000
#log-queries-not-using-indexes
low_priority_updates = 1
#loonsies
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates
[isamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M
[myisamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout
according to mysql tuning primer it reports the following
Quote:
-- MYSQL PERFORMANCE TUNING PRIMER --
- By: Matthew Montgomery -
MySQL Version 4.1.20-log x86_64
Uptime = 0 days 17 hrs 52 min 44 sec
Avg. qps = 15
Total Questions = 1028682
Threads Connected = 1
Warning: Server has not been running for at least 48hrs.
It may not be safe to use these recommendations
To find out more information on how each of these
runtime variables effects performance visit:
[url]
Visit [url]
for info about MySQL's Enterprise Monitoring and Advisory Service
SLOW QUERIES
Current long_query_time = 5 sec.
You have 0 out of 1028694 that take longer than 5 sec. to complete
The slow query log is NOT enabled.
Your long_query_time seems to be fine
WORKER THREADS
Current thread_cache_size = 256
Current threads_cached = 3
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine
MAX CONNECTIONS
Current max_connections = 1000
Current threads_connected = 1
Historic max_used_connections = 4
The number of used connections is 0% of the configured maximum.
You are using less than 10% of your configured max_connections.
Lowering max_connections could help to avoid an over-allocation of memory
See "MEMORY USAGE" section to make sure you are not over-allocating
MEMORY USAGE
Max Memory Ever Allocated : 243 M
Configured Max Per-thread Buffers : 41 G
Configured Max Global Buffers : 75 M
Configured Max Memory Limit : 41 G
Physical Memory : 1.90 G
Max memory limit exceeds 90% of physical memory
KEY BUFFER
Current MyISAM index space = 12 M
Current key_buffer_size = 1 M
Key cache miss rate is 1 : 14581
Key buffer fill ratio = 44.00 %
Your key_buffer_size seems to be too high.
Perhaps you can use these resources elsewhere
QUERY CACHE
Query cache is enabled
Current query_cache_size = 64 M
Current query_cache_used = 5 M
Current query_cache_limit = 64 M
Current Query cache Memory fill ratio = 8.42 %
Current query_cache_min_res_unit = 4 K
Query Cache is 15 % fragmented
Run "FLUSH QUERY CACHE" periodically to defragment the query cache memory
If you have many small queries lower 'query_cache_min_res_unit' to reduce fragmentation.
Your query_cache_size seems to be too high.
Perhaps you can use these resources elsewhere
MySQL won't cache query results that are larger than query_cache_limit in size
SORT OPERATIONS
Current sort_buffer_size = 32 M
Current record/read_rnd_buffer_size = 1020 K
Sort buffer seems to be fine
JOINS
Current join_buffer_size = 3.00 M
You have had 378 queries where a join could not use an index properly
You should enable "log-queries-not-using-indexes"
Then look for non indexed joins in the slow query log.
If you are unable to optimize your queries you may want to increase your
join_buffer_size to accommodate larger joins in one pass.
Note! This script will still suggest raising the join_buffer_size when
ANY joins not using indexes are found.
OPEN FILES LIMIT
Current open_files_limit = 50000 files
The open_files_limit should typically be set to at least 2x-3x
that of table_cache if you have heavy MyISAM usage.
Your open_files_limit value seems to be fine
TABLE CACHE
Current table_cache value = 2000 tables
You have a total of 908 tables
You have 102 open tables.
The table_cache value seems to be fine
TEMP TABLES
Current max_heap_table_size = 31 M
Current tmp_table_size = 30 M
Of 3666 temp tables, 0% were created on disk
Created disk tmp tables ratio seems fine
TABLE SCANS
Current read_buffer_size = 5 M
Current table scan ratio = 1544 : 1
read_buffer_size seems to be fine
TABLE LOCKING
Current Lock Wait ratio = 1 : 4664
You may benefit from selective use of InnoDB.
View 11 Replies
View Related
Mar 13, 2007
PIV 2.8Ghz, 1GB Ram, MySQL 3.23, RHL E3.0
The servers load is vey bad, most of the time 7-8+ and the IO WAIT more than 60% which is decreasing server performace. Please help me to optimzie the MySQL specially. If you have the good my.cnf config please give me the complete config file.
[client]
port = 3306
socket = /var/lib/mysql/mysql.sock
[mysqld]
safe-show-database
innodb_data_file_path=ibdata1:10M:autoextend
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
set-variable = connect_timeout=10
set-variable = interactive_timeout=100
set-variable = join_buffer_size=1M
set-variable = key_buffer=128M
set-variable = max_allowed_packet=16M
set-variable = max_connections=250
set-variable = max_connect_errors=10
set-variable = myisam_sort_buffer_size=16M
set-variable = table_cache=256
set-variable = thread_cache_size=32
set-variable = thread_concurrency=2
set-variable = wait_timeout=15
[mysqldump]
quick
set-variable = max_allowed_packet=16M
[mysql.server]
user=mysql
basedir=/var/lib
[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
log-slow-queries = /var/log/mysql-slow.log
long_query_time = 5
View 7 Replies
View Related
Apr 9, 2009
someone to look at my DB and optimize it as it is running ridiculously high loads of 25. It is vbulletin. I'm only looking for professional companies for this job.
View 1 Replies
View Related
Feb 16, 2008
I have a friend which owns a 2k alexa rank forum using VB
The server hangs and he gets mysql connection error in logs
Quote:
Database error in vBulletin : mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'
The server is a dual Pentium D with 4GB RAM
currently 600 users online and 20% RAM used
in rush hours there are 2000 users online and 50% RAM used
We want to optimize mysql - this is the current my.cnf
Quote:
[mysqld]
safe-show-database
old_passwords
back_log = 75
skip-innodb
max_connections = 2000
key_buffer = 80M
myisam_sort_buffer_size = 64M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 3M
table_cache = 2500
thread_cache_size = 384
wait_timeout = 15
connect_timeout = 10
tmp_table_size = 64M
max_heap_table_size = 64M
max_allowed_packet = 64M
net_buffer_length = 16384
max_connect_errors = 10
thread_concurrency = 8
read_rnd_buffer_size = 786432
bulk_insert_buffer_size = 8M
query_cache_limit = 4M
query_cache_size = 64M
query_cache_type = 1
query_prealloc_size = 262144
query_alloc_block_size = 65536
transaction_alloc_block_size = 8192
transaction_prealloc_size = 4096
default-storage-engine = MyISAM
[mysql.server]
user=mysql
basedir=/var/lib
old-passwords = 1
[mysqld_safe]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
nice = -5
open_files_limit = 8192
[mysqldump]
quick
max_allowed_packet = 16M
[myisamchk]
key_buffer = 64M
sort_buffer = 64M
read_buffer = 64M
write_buffer = 64M
[mysqlhotcopy]
interactive-timeout
View 7 Replies
View Related
Jul 8, 2007
On one of my servers (Intel P4 2.8Ghz, 1GB RAM, cPanel), I've been tweaking some of the MySQL values in my.cnf and using the MySQL Tuning Primer shell script to evaluate the results.
This is my current my.cnf. I'm running MySQL 5.0.27.
Code:
[mysqld]
set-variable = max_connections=500
safe-show-database
skip-innodb
long_query_time=5
log-slow-queries=/var/log/mysql/log-slow-queries.log
query_cache_type=1
query_cache_size=16M
query_cache_limit=1M
table_cache=512
key_buffer=150M
thread_concurrency=2
thread_cache_size=80
sort_buffer_size=1M
read_buffer_size=1M
read_rnd_buffer_size=768K
The tuning primer script is telling me the following.
PHP Code:
Current max_heap_table_size = 16 MCurrent tmp_table_size = 32 MOf 3875 temp tables, 52% were created on diskEffective in-memory tmp_table_size is limited to max_heap_table_size.Perhaps you should increase your tmp_table_size and/or max_heap_table_sizeto reduce the number of disk-based temporary tables
What values should I increase (if at all) max_heap_table_size and tmp_table_size to?
View 3 Replies
View Related
Feb 16, 2007
Code:
mysql> SHOW STATUS;
+----------------------------+------------+
| Variable_name | Value |
+----------------------------+------------+
| Aborted_clients | 510 |
| Aborted_connects | 0 |
| Binlog_cache_disk_use | 0 |
| Binlog_cache_use | 0 |
| Bytes_received | 441269798 |
| Bytes_sent | 2031527307 |
| Com_admin_commands | 27428 |
| Com_alter_db | 0 |
| Com_alter_table | 4 |
| Com_analyze | 0 |
| Com_backup_table | 0 |
| Com_begin | 0 |
| Com_change_db | 27481 |
| Com_change_master | 0 |
| Com_check | 0 |
| Com_checksum | 0 |
| Com_commit | 0 |
| Com_create_db | 0 |
| Com_create_function | 0 |
| Com_create_index | 0 |
| Com_create_table | 0 |
| Com_dealloc_sql | 0 |
| Com_delete | 16883 |
| Com_delete_multi | 0 |
| Com_do | 0 |
| Com_drop_db | 0 |
| Com_drop_function | 0 |
| Com_drop_index | 0 |
| Com_drop_table | 0 |
| Com_drop_user | 0 |
| Com_execute_sql | 0 |
| Com_flush | 0 |
| Com_grant | 0 |
| Com_ha_close | 0 |
| Com_ha_open | 0 |
| Com_ha_read | 0 |
| Com_help | 0 |
| Com_insert | 5515 |
| Com_insert_select | 379 |
| Com_kill | 0 |
| Com_load | 0 |
| Com_load_master_data | 0 |
| Com_load_master_table | 0 |
| Com_lock_tables | 0 |
| Com_optimize | 0 |
| Com_preload_keys | 0 |
| Com_prepare_sql | 0 |
| Com_purge | 0 |
| Com_purge_before_date | 0 |
| Com_rename_table | 0 |
| Com_repair | 1 |
| Com_replace | 0 |
| Com_replace_select | 0 |
| Com_reset | 0 |
| Com_restore_table | 0 |
| Com_revoke | 0 |
| Com_revoke_all | 0 |
| Com_rollback | 0 |
| Com_savepoint | 0 |
| Com_select | 154467 |
| Com_set_option | 132 |
| Com_show_binlog_events | 0 |
| Com_show_binlogs | 7 |
| Com_show_charsets | 33 |
| Com_show_collations | 33 |
| Com_show_column_types | 0 |
| Com_show_create_db | 0 |
| Com_show_create_table | 0 |
| Com_show_databases | 6 |
| Com_show_errors | 0 |
| Com_show_fields | 0 |
| Com_show_grants | 17 |
| Com_show_innodb_status | 0 |
| Com_show_keys | 0 |
| Com_show_logs | 0 |
| Com_show_master_status | 0 |
| Com_show_ndb_status | 0 |
| Com_show_new_master | 0 |
| Com_show_open_tables | 0 |
| Com_show_privileges | 0 |
| Com_show_processlist | 0 |
| Com_show_slave_hosts | 0 |
| Com_show_slave_status | 0 |
| Com_show_status | 2 |
| Com_show_storage_engines | 0 |
| Com_show_tables | 38 |
| Com_show_variables | 79 |
| Com_show_warnings | 0 |
| Com_slave_start | 0 |
| Com_slave_stop | 0 |
| Com_stmt_close | 0 |
| Com_stmt_execute | 0 |
| Com_stmt_prepare | 0 |
| Com_stmt_reset | 0 |
| Com_stmt_send_long_data | 0 |
| Com_truncate | 0 |
| Com_unlock_tables | 0 |
| Com_update | 38964 |
| Com_update_multi | 0 |
| Connections | 306 |
| Created_tmp_disk_tables | 6302 |
| Created_tmp_files | 3 |
| Created_tmp_tables | 26220 |
| Delayed_errors | 0 |
| Delayed_insert_threads | 0 |
| Delayed_writes | 0 |
| Flush_commands | 1 |
| Handler_commit | 0 |
| Handler_delete | 7984 |
| Handler_discover | 0 |
| Handler_read_first | 10826 |
| Handler_read_key | 80354286 |
| Handler_read_next | 921590052 |
| Handler_read_prev | 0 |
| Handler_read_rnd | 2852179 |
| Handler_read_rnd_next | 358019891 |
| Handler_rollback | 0 |
| Handler_update | 34804652 |
| Handler_write | 3299547 |
| Key_blocks_not_flushed | 0 |
| Key_blocks_unused | 350900 |
| Key_blocks_used | 136652 |
| Key_read_requests | 177777142 |
| Key_reads | 234783 |
| Key_write_requests | 192997 |
| Key_writes | 70499 |
| Max_used_connections | 18 |
| Not_flushed_delayed_rows | 0 |
| Open_files | 126 |
| Open_streams | 0 |
| Open_tables | 89 |
| Opened_tables | 124 |
| Qcache_free_blocks | 1493 |
| Qcache_free_memory | 101831304 |
| Qcache_hits | 247556 |
| Qcache_inserts | 154232 |
| Qcache_lowmem_prunes | 0 |
| Qcache_not_cached | 170 |
| Qcache_queries_in_cache | 2670 |
| Qcache_total_blocks | 6866 |
| Questions | 491633 |
| Rpl_status | NULL |
| Select_full_join | 0 |
| Select_full_range_join | 0 |
| Select_range | 15228 |
| Select_range_check | 0 |
| Select_scan | 42652 |
| Slave_open_temp_tables | 0 |
| Slave_retried_transactions | 0 |
| Slave_running | OFF |
| Slow_launch_threads | 0 |
| Slow_queries | 29 |
| Sort_merge_passes | 0 |
| Sort_range | 26186 |
| Sort_rows | 92603755 |
| Sort_scan | 28212 |
| Table_locks_immediate | 427295 |
| Table_locks_waited | 239 |
| Threads_cached | 1 |
| Threads_connected | 17 |
| Threads_created | 18 |
| Threads_running | 2 |
| Uptime | 9400 |
+----------------------------+------------+
163 rows in set (0.00 sec)
this is what SHOW STATUS; commands give me can anyone provide me any helpful tips on what I can adjust in my.cnf to lower my server load which is above 10 during peak hours and mysql is the only thing eating this serve up I have lots og 3gb ram and a 64bit AMD 2800 server
View 6 Replies
View Related
Jul 27, 2009
I'm trying to optimize a server (Intel E8300) with 8Gb of RAM and WHM/cPanel administration panel.
Now the server has only 46 accounts in WHM, and about 10.000 unique visitors / day
As mysql is always on top for CPU ussage I have edited 2 values in my.cnf, but this was done in 10 minutes and not to much research, any more help will be appreciated. On this server as I see it's been using MyISAM for storage engine and maybe just a few tabels with InnoDB ....
View 13 Replies
View Related
Jun 29, 2009
Whenever I run the "top" command, I see that some of the user "mysql" records always have very high CPU usage, anywhere from 20-80% on average (I've seen 100%). There are multiple records that show this, which means that the CPU is always above 100%. My cacti monitoring account also shows messed up CPU statistics.
I am not too knowledgeable with servers, but I believe that this is a problem. How much CPU usage is a mysqld command supposed to use on average? Here is a copy of the top part of a sample top command:
=========
top - 06:54:50 up 92 days, 5:32, 1 user, load average: 3.82, 3.89, 4.24
Tasks: 181 total, 4 running, 176 sleeping, 0 stopped, 1 zombie
Cpu(s): 0.2%us, 18.6%sy, 80.9%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.3%si, 0.0%st
Mem: 2075600k total, 1905400k used, 170200k free, 331912k buffers
Swap: 4096564k total, 104k used, 4096460k free, 1187304k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
21663 mysql 24 6 63032 30m 3004 R 66 1.5 38:24.06 mysqld
28483 mysql 24 6 63032 30m 3004 R 66 1.5 35:52.86 mysqld
20538 mysql 22 6 63032 30m 3004 S 15 1.5 40:29.74 mysqld
20837 mysql 24 6 63032 30m 3004 R 15 1.5 13:44.15 mysqld
1209 mysql 22 6 63032 30m 3004 S 11 1.5 32:46.26 mysqld
20591 mysql 22 6 63032 30m 3004 S 11 1.5 40:02.76 mysqld
20592 mysql 23 6 63032 30m 3004 S 6 1.5 40:48.29 mysqld
15301 apache 19 4 29928 15m 3608 S 3 0.8 0:00.60 httpd
15317 apache 19 4 28380 14m 3640 S 3 0.7 0:00.58 httpd
15249 apache 19 4 28612 14m 3732 S 1 0.7 0:01.49 httpd
15349 apache 19 4 28876 14m 3324 S 1 0.7 0:00.10 httpd
15319 apache 19 4 28368 14m 3528 S 1 0.7 0:00.34 httpd
15334 apache 19 4 28612 14m 3404 S 1 0.7 0:00.35 httpd
12343 root 15 0 2324 1088 804 R 1 0.1 0:03.31 top
15336 apache 19 4 28876 14m 3500 S 0 0.7 0:00.63 httpd
1 root 15 0 2064 588 508 S 0 0.0 1:01.28 init
2 root RT -5 0 0 0 S 0 0.0 0:09.39 migration/0
3 root 34 19 0 0 0 S 0 0.0 0:01.25 ksoftirqd/0
4 root RT -5 0 0 0 S 0 0.0 0:00.00 watchdog/0
=================================
I told my system manager about the cpu problem, and he said that he installed the cpulimit function on my server. I'm not sure if this is a good solution.
View 2 Replies
View Related
Dec 18, 2008
MySQL the last few days seems to be constantly the most demanding process in top, which it never was before. As far as I can tell, nothing has substantially changed with regards to traffic to MySQL driven sites on the server. Is there anything that might be wrong with the databases, etc., that might throw MySQL into a tizzy?
View 8 Replies
View Related
Jun 15, 2008
if I could get some input on this. Currently I'm running an Opteron 246, 2GB RAM with 2TB bandwidth/mo. I run a single site which is currently 99% HTML, along with an invision forum which is fairly popular. I get about 300-400k pageviews per day.
Right now the server is able to handle this stuff without much of a problem, and the average CPU load is between .5 and 3 (after a TON of tweaking!) - the only exception is when the forum db is being backed up/optimized, which isn't a huge problem since it happens during the off hours.
The problem is that I'm running out of bandwidth quickly, and need to come up with some kind of solution soon. My current provider offers bandwidth at $1/GB, which to me seems crazy compared to other providers, so that's not really an option.
I was thinking about switching to a more affordable provider and upgrading hardware, but I'm not sure what the best approach would be. I'm in the process of moving my HTML content over to a PHP-powered CMS, so I need to make sure whatever I do can handle that... What might be a decent setup for a site like mine which consumes a lot of bandwidth and will probably need more CPU power in the near future for PHP/MySQL stuff?
View 8 Replies
View Related
Oct 13, 2009
I am facing problem regarding my site. I have dedicated server with WHM/cPanel, i have integrated tomcat with apache , the apache processes are too high aroung 1200-1400, So please guide me howto optimize my apache for better performance.
root@trick [/]# ps aux | grep -c httpd
1403
root@trick [/]# ps aux | grep -c mysql
3
root@trick [/l]# free -m
total used free shared buffers cached
Mem: 4053 3408 645 0 220 1890
-/+ buffers/cache: 1297 2756
Swap: 4094 0 4094
---------------------------------------------
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
<IfModule prefork.c>
StartServers 10
MinSpareServers 10
MaxSpareServers 20
ServerLimit 1000
MaxClients 600
MaxRequestsPerChild 0
</IfModule>
View 7 Replies
View Related
May 25, 2009
I'm looking to get some tips to optimize my Apache webservers. Now i have 2 apache servers with load balancer. If someone can guide me and bring some tips for this purpose is highly appreciated.
Also, i would like to know about disadvantages of enabling KeepAlive. Recently i have enabled it and found my site load much better. But the disadvantage (that i experienced personally) is after stop browsing for a while (about 40-60 minutes) i need to keep triggering the URL of site several times to get enter the website. If not i can't get into it and it likes the site giving no response at all.
View 4 Replies
View Related
Jun 15, 2008
I've got a VPS server with a total process limit of 100 process.
I know this sounds like a newbie question, what numbers would you recommend for the Apache 2 Conf file to get it running as best as possible without it taking the server down?
View 4 Replies
View Related
Jan 29, 2009
Anyone know a good script that I can run with cron or something? Mysql seems to be the #1 problem with a lot of my web sites, a restart usually fixes it right away for me, but I can't keep restarting my servers everyday manually.
View 1 Replies
View Related
Feb 28, 2008
My video sharing site has high traffic, alexa rate:3,000
My site has 2 servers to split the load. 2 servers share a mysql server. Using rrdns to load the balance.
Server A running mysql 5.0,lighttpd
Server B running lighttpd.
Server B connect to A's mysql database.
During peak time. B can not connect to A's mysql server. It says server not responding. But A still running fine.
When I check mysql log file.
/usr/libexec/mysqld: Forcing close of thread .....
And when run top, the load average is 20.
The spec of Server A
Intel(R) Xeon(TM) CPU 3.06GHz dual core.
2G Ram.
Here is the my.cnf
Quote:
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
max_connections = 1000
wait_timeout=60
connect_timeout=10
interactive_timeout=120
join_buffer_size=1M
query_cache_size=128M
query_cache_limit=2M
max_allowed_packet=16M
table_cache=1024
sort_buffer_size=2M
read_buffer_size=2M
My question, do I need another maching C to run lighttpd, and just keep mysql on A.
Or I can do some mysql optimization on A.
Also, if my site keeps going, can I have 1 mysql server and 5 http servers?
View 11 Replies
View Related
Jul 2, 2007
cpu speed/type single or dual cpus): Intel Xeon 2x3.6
how much memory installed: 2048MB
hard drive type/configuration: 2x160GB SATA
linux distributor or windows version: CentOS 4.5 x86_64
apache/IIS version: apache 1.3.37
PHP version: php 4.4.7
MySQL version: 4.1.22-standard
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
19017 teknoloj 16 0 0 0 0 Z 27 0.0 0:00.93 php <defunct>
17751 mysql 15 0 241m 55m 3148 S 25 2.8 0:53.73 mysqld
19025 root 18 0 16204 6104 1392 D 6 0.3 0:00.17 cpcpan_check_in
18968 sohbetgo 16 0 44596 7540 3556 S 5 0.4 0:00.44 php
18552 nobody 15 0 32636 4208 1204 S 2 0.2 0:00.28 httpd
18808 resimsit 17 0 46944 9960 3616 R 1 0.5 0:00.23 php
18896 resimsit 16 0 46944 9984 3616 D 1 0.5 0:00.08 php
18921 resimsit 17 0 46404 9444 3572 R 1 0.5 0:00.09 php
18819 nobody 17 0 32644 4176 1192 S 1 0.2 0:00.06 httpd
18868 haylazt 16 0 0 0 0 Z 1 0.0 0:00.48 php <defunct>
18871 nobody 15 0 32504 4056 1148 S 1 0.2 0:00.06 httpd
18892 root 16 0 6416 1180 756 R 1 0.1 0:00.24 top
18978 nobody 16 0 32504 4028 1132 S 1 0.2 0:00.02 httpd
11 root 5 -10 0 0 0 S 0 0.0 0:24.56 events/1
2638 root 0 -20 0 0 0 S 0 0.0 0:16.96 loop0
2981 named 18 0 88016 2328 1152 S 0 0.1 8:44.12 named
3592 mailman 16 0 50316 2320 1828 S 0 0.1 0:00.78 python2.4
my.cnf
[mysqld]
safe-show-database
skip-innodb
max_connections = 500
key_buffer = 80M
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 = 25
connect_timeout = 10
tmp_table_size = 128M
max_heap_table_size = 128M
max_allowed_packet = 64M
max_connect_errors = 10
read_rnd_buffer_size = 524288
bulk_insert_buffer_size = 8M
query_cache_limit = 4M
query_cache_size = 96M
query_cache_type = 1
query_prealloc_size = 16384
query_alloc_block_size = 32768
ft_min_word_len=3
ft_max_word_len=25
[mysqld_safe]
open_files_limit = 8192
[mysqldump]
quick
max_allowed_packet = 16M
[myisamchk]
key_buffer = 64M
sort_buffer = 64M
read_buffer = 16M
write_buffer = 16M
ft_min_word_len=3
ft_max_word_len=25
[mysqlhotcopy]
interactive-timeout
MySQL 4.1.22-standard uptime 0 0:39:9 Sat Jun 30 21:33:29 2007
__ Key __________________________________________________ _______________
Buffer used 19.34M of 80.00M %Used: 24.17
Current 33.70M %Usage: 42.12
Write hit 32.57%
Read hit 98.45%
__ Questions __________________________________________________ _________
Total 63.26k 26.9/s
Slow 2 0.0/s %Total: 0.00 %DMS: 0.01
DMS 32.14k 13.7/s 50.80
__ Table Locks __________________________________________________ _______
Waited 40 0.0/s %Total: 0.08
Immediate 50.58k 21.5/s
__ Tables __________________________________________________ ____________
Open 486 of 1800 %Cache: 27.00
Opened 702 0.3/s
__ Connections __________________________________________________ _______
Max used 12 of 500 %Max: 2.40
Total 4.33k 1.8/s
__ Created Temp __________________________________________________ ______
Disk table 26 0.0/s
Table 2.23k 1.0/s
File 428 0.2/s
6-7 vbulletin sites-vbseo and other scripts online avarage;
120 registered user ve 500+ unregistered user
cookie timeout : 7200
unique hit : 15000-20000
KeepAlive ON
MaxKeepAliveRequests 100
KeepAliveTimeout 2
MinSpareServers 10
MaxSpareServers 15
StartServers 10
MaxClients 180
Maxrequestsperchild value 1000
[root@server ~]# uname -a
Linux server.xxxxx 2.6.9-55.ELsmp #1 SMP Wed May 2 14:04:42 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux
[root@server ~]# ulimit -aH
core file size (blocks, -c) 1000000
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
pending signals (-i) 1024
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 4096
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 14335
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
[root@server ~]# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Xeon(TM) CPU 3.60GHz
stepping : 10
cpu MHz : 3600.322
cache size : 2048 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm pni monitor ds_cpl est tm2 cid cx16 xtpr
bogomips : 7207.08
clflush size : 64
cache_alignment : 128
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 1
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Xeon(TM) CPU 3.60GHz
stepping : 10
cpu MHz : 3600.322
cache size : 2048 KB
physical id : 3
siblings : 2
core id : 3
cpu cores : 1
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm pni monitor ds_cpl est tm2 cid cx16 xtpr
bogomips : 7199.29
clflush size : 64
cache_alignment : 128
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 2
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Xeon(TM) CPU 3.60GHz
stepping : 10
cpu MHz : 3600.322
cache size : 2048 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm pni monitor ds_cpl est tm2 cid cx16 xtpr
bogomips : 7509.03
clflush size : 64
cache_alignment : 128
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 3
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Xeon(TM) CPU 3.60GHz
stepping : 10
cpu MHz : 3600.322
cache size : 2048 KB
physical id : 3
siblings : 2
core id : 3
cpu cores : 1
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm pni monitor ds_cpl est tm2 cid cx16 xtpr
bogomips : 7199.26
clflush size : 64
cache_alignment : 128
address sizes : 36 bits physical, 48 bits virtual
power management:
View 4 Replies
View Related
Apr 27, 2007
we have mysql 5 setup and this morning at around 10:07 tables started disappearing as they were being accessed by different clients.
Databases that had 40 tables now had 30, etc. Only the tables that were attempted to be accessed were gone. This is the first time something like this has happened.
The following output was given:
This could be because you hit a bug. It is also possible that this binary or one of the libraries it was linked against is corrupt, improperly built, or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose the
problem, but since we have already crashed, something is definitely wrong and this may fail.
key_buffer_size=8388600
read_buffer_size=131072
max_used_connections=208
max_connections=500
threads_connected=156
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 1096188 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
thd=0xaf82930
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
Cannot determine thread, fp=0xb143932c, backtrace may not be correct.
Stack range sanity check OK, backtrace follows:
0x816b1a0
0xaf1898
0x20
0x81ac49d
0x8182914
0x8189010
0x8189df1
0x818a738
0x818ae5c
0xaeb371
0x9c4ffe
New value of fp=(nil) failed sanity check, terminating stack trace!
Please read [url]and follow instructions on how to resolve the stack trace. Resolved
stack trace is much more helpful in diagnosing the problem, so please do
resolve it
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0xaf36620 = SELECT * FROM `sessions` WHERE `PHPSESSID` = '5e6775cd3c6f187d8c575127ba73be19'
thd->thread_id=113407
The manual page at [url]contains
information that should help you find out what is causing the crash.
mysqld: my_new.cc:51: int __cxa_pure_virtual(): Assertion `"Pure virtual method called." == "Aborted"' failed.
Number of processes running now: 0
070427 10:07:49 mysqld restarted
070427 10:07:50 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
070427 10:07:53 InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 227822203.
InnoDB: Doing recovery: scanned up to log sequence number 0 227822203
070427 10:07:53 InnoDB: Started; log sequence number 0 227822203
070427 10:07:54 [Note] /usr/sbin/mysqld: ready for connections.
View 0 Replies
View Related
Apr 13, 2007
I have server in LT, the network is so good, but i got problem with the apache, it keep going down because the process too high ( i think)
when i list the process it show me :
nobody
0.000.250.0 Top Process%CPU 98.9/usr/local/apache/bin/httpd -DSSL Top Process%CPU 98.8/usr/local/apache/bin/httpd -DSSL Top Process%CPU 2.9
Other than that all domain only use not more than 10% process, I use Cpanel X and Cpanel XP skin, please help
Now my domain , will get blank page when try to access, i dont know why, even though all service is running and i already reboot the server
View 11 Replies
View Related
May 28, 2008
We have flash files site hosted on dedicated server in that Apache is utilizing the more CPU. When the server reached more than 1000 connections server get down automatically.
Hard Server Limit : 2048
MaxClients : 2000
Please find below the TOP status.
8450 nobody 16 0 19 0:20.52 1.2 39404 23m 3008 R httpd
3242 nobody 15 0 16 1:07.17 1.2 39696 24m 3032 S httpd
9492 nobody 16 0 12 0:00.39 0.7 29616 14m 3000 R httpd
3372 nobody 15 0 12 1:23.31 0.5 24864 9992 3036 S httpd
9477 nobody 15 0 11 0:00.88 0.5 24692 9784 3000 S httpd
9021 nobody 15 0 10 0:01.69 1.2 39660 24m 2996 S httpd
3240 nobody 15 0 10 1:39.71 1.2 39664 24m 3420 R httpd
4141 nobody 16 0 10 1:30.65 1.2 39792 24m 3032 R httpd
5458 nobody 15 0 10 1:04.21 0.5 24720 9824 3012 S httpd
9466 nobody 15 0 10 0:00.96 0.5 24672 9764 3000 S httpd
9478 nobody 15 0 10 0:00.98 0.5 24676 9764 2996 S httpd
3354 nobody 16 0 10 1:23.78 0.5 25132 9m 3044 R httpd
3361 nobody 15 0 10 1:21.61 0.5 24864 10m 3576 S httpd
5451 nobody 16 0 10 1:09.14 1.2 39664 23m 3036 R httpd
5457 nobody 15 0 10 1:12.76 1.2 39664 24m 3556 S httpd
9444 nobody 16 0 10 0:01.72 1.2 39656 24m 2996 R httpd
9481 nobody 15 0 10 0:00.65 1.2 39652 24m 3000 R httpd
3338 nobody 16 0 9 1:32.72 1.2 39256 23m 3036 R httpd
3360 nobody 15 0 9 1:44.38 1.2 39772 24m 3440 R httpd
4142 nobody 15 0 9 1:40.64 1.2 39760 24m 3440 S httpd
9493 nobody 15 0 9 0:01.25 0.5 24704 9796 3024 S httpd
9504 nobody 15 0 9 0:00.29 0.5 24688 9744 2984 S httpd
3305 nobody 16 0 9 1:08.11 1.2 39404 23m 3012 R httpd
3359 nobody 15 0 9 0:47.17 0.5 24812 9936 3032 S httpd
3363 nobody 16 0 9 1:44.42 1.2 39432 23m 3044 R httpd
5450 nobody 15 0 9 1:18.81 0.5 24900 9996 3032 S httpd
9486 nobody 16 0 9 0:00.59 1.2 39664 23m 2996 R httpd
3358 nobody 16 0 9 1:46.50 1.2 39520 24m 3452 R httpd
9096 nobody 16 0 9 0:07.87 1.1 38612 23m 3004 R httpd
3370 nobody 16 0 8 1:32.55 1.2 39200 23m 3012 R httpd
8515 nobody 16 0 8 0:12.52 1.2 39404 23m 3024 R httpd
9445 nobody 16 0 8 0:02.70 1.2 39404 23m 3000 R httpd
Apache Compailed with following modules.
./configure' '--disable-pdo' '--enable-ftp' '--enable-gd-native-ttf' '--enable-libxml' '--enable-magic-quotes' '--enable-mbstring' '--enable-sockets' '--prefix=/usr/local' '--with-apxs=/usr/local/apache/bin/apxs' '--with-curl=/opt/curl/' '--with-freetype-dir=/usr' '--with-gd' '--with-jpeg-dir=/usr' '--with-libxml-dir=/opt/xml2/' '--with-mhash=/opt/mhash/' '--with-mysql' '--with-png-dir=/usr' '--with-ttf' '--with-xpm-dir=/usr/X11R6' '--with-zlib' '--with-zlib-dir=/usr'
Apache : 2.2.8
PHP : 5.2.4
MySQL : 4.1.1
RAM : 2 GB
CPU : Intel(R) Xeon(R)
Cpanel Installed
View 3 Replies
View Related
Sep 2, 2007
I deal with a server that gets positivey slammed once a week for a few months per year. I'd tell you how many hits we got tonight, but I'm still waiting for AWSTATS to chew through the 2gb access_log file...
Tonight, I made some changes that SEEM to work, but I"mn not sure what the long-term effects could be. If we have any apache experts on the forums, I'd really like to bend your ear for a few to see what you know.
Obviously, with PHP, we're limited to prefork MPM.
First of all, I dropped Timeout from 300 to 120. That should be MORE than enough time to know that we've timed out. Then I dropped KeepAliveTimeout to 5 from 15.
Here's the radical one. Watching the process list and the load, it seemed that load spiked when the processes hit their end of useful life and respawned. Duh. This was happening every four seconds at the load we were under. MaxRequestsPerChild was set to 10,000. I upped this to 80,000 over a period of hours that we were under the load. I didn't see any significant memory leakage, but it's the change I'm worried about the most. I've seen Apache do some bad things when people allow this to go unlimited, and had always used the relatively low default as a guide.
Besides not loading a bunch of dynamic modules (also done, I usually do this so I'm not worried about it), what else can I do tuning-wise to keep load down? Please note that caching and load-balancing aren't acceptable solutions; I have one server to work with (for now) and the boss says no to caching because of how frequently our information updates. We also have extensive .htaccess files, so there's no LHTTPD in my future.
View 2 Replies
View Related