MyBB Community Forums

Full Version: High CPU usage!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
Have you tried converting sessions table to innodb?

And is your MySQL version 5.5 or above? If not, I'd advise to upgrade to it and you'll notice a performance increase.
I guess I'm looking for one IP to have a high number in front?

1 107.22.123.140
1 110.70.11.162
1 112.205.1.220
1 112.205.90.27
1 114.94.43.26
1 121.7.252.252
1 122.116.229.29
1 174.129.151.245
1 183.89.62.107
1 218.186.19.234
1 220.255.2.81
1 23.20.107.108
1 50.17.118.136
1 70.192.65.197
1 95.149.101.114
2 115.66.50.172
2 124.121.209.163
2 129.11.221.211
2 174.230.66.153
2 188.222.183.74
2 203.125.128.250
2 66.108.26.188
2 93.209.3.132
2 94.8.167.191
3 110.159.234.186
3 115.66.22.177
3 116.14.36.182
3 119.74.135.182
3 198.228.200.149
3 218.186.17.11
4 124.104.146.31
4 218.186.17.237
4 218.186.18.242
4 218.186.18.249
5 112.204.202.100
5 183.89.79.43
6 110.138.18.238
6 112.151.99.66
6 116.6.64.36
6 118.101.200.16
6 119.192.9.209
6 175.156.192.252
6 210.6.222.170
6 58.212.239.190
6 68.109.28.70
6 71.183.188.43
6 94.194.227.85
6 94.197.127.93
7 121.6.122.144
7 124.128.113.255
7 186.204.146.226
7 210.195.197.113
7 58.26.90.194
8 142.56.5.35
8 155.69.2.11
8 220.244.41.44
8 99.135.195.180
9 129.98.209.112
9 198.72.219.52
9 50.18.227.170
10 114.93.18.53
12 111.94.210.211
13 98.224.243.27
17 175.156.146.181
20 114.199.185.97
21 146.232.65.202
21 87.112.84.137
24 139.194.236.56
35 175.140.25.9

Although right now my server load avg is back to 5-10 which sadly is waaay better then a couple hours ago
These are the IP's that are having above average connections:

21 146.232.65.202
21 87.112.84.137
24 139.194.236.56
35 175.140.25.9

A normal connection should at max utilize 3-4 concurrent connection, anything above 15 is many a times a sign of flood or DDOS.

I'd advise to try to block the last 2 connections and see if you see any reduction in server load.
(2012-11-07, 05:13 PM)euantor Wrote: [ -> ]It's not up to MyBB to tell you how to run a server...

If you didn't know what you were doing, you should have chosen a managed service or found somebody willing to manage your server for you.

I didn't think it would cause an issue...

(2012-11-07, 05:16 PM)crazy4cs Wrote: [ -> ]These are the IP's that are having above average connections:

21 146.232.65.202
21 87.112.84.137
24 139.194.236.56
35 175.140.25.9

A normal connection should at max utilize 3-4 concurrent connection, anything above 15 is many a times a sign of flood or DDOS.

I'd advise to try to block the last 2 connections and see if you see any reduction in server load.

How do I block connections?

if a normal connection at max utilize 3-4 connections then shouldn't i be blocking anything above that?

Thing everytime i push that command the highest two change...so it seems kinda random.

6 142.1.255.146
6 198.72.219.52
6 208.107.48.23
6 220.255.232.151
7 155.69.2.11
7 175.156.217.246
7 219.74.168.136
7 219.74.48.150
7 94.6.204.130
8 118.101.200.16
8 183.96.148.155
8 64.135.48.170
8 66.108.26.188
10 202.151.73.24
11 124.104.146.31
12 119.192.9.209
12 175.140.25.9
14 118.160.47.86
15 111.223.95.130
25 139.194.236.56



9 198.72.219.52
10 111.223.95.130
10 118.101.200.16
10 202.151.73.24
10 206.246.197.249
11 175.140.25.9
14 94.6.204.130
15 139.194.236.56
18 175.156.217.246
20 208.107.48.23

(2012-11-07, 05:14 PM)crazy4cs Wrote: [ -> ]Have you tried converting sessions table to innodb?

And is your MySQL version 5.5 or above? If not, I'd advise to upgrade to it and you'll notice a performance increase.

is it easy to convert? again i'm not very tech savvy nor do i have a testing environment.

My mybb dash shows i'm using MySQLi 5.1.65 so i guess i should upgrade. How do i do it?
Do you run on cPanel? If so WHM provides an option or you can google about manual MySQL upgrade, it's easy.

Regarding converting sessions table to innodb, yes it's easy. Just run this command from phpmyadmin:

ALTER TABLE mybb_sessions ENGINE = INNODB;

Although do make a backup first before running the command, just in case.
Thanks for all the suggestions, but so far it seems like I've got alot of options to lower my CPU usage but only one possible reason for my abnormally high CPU usage (being attacked).

As I originally stated, I'd like to find and fix the issue instead of lower my CPU usage in general.

So you said anything over 15 is usually suspicious? Does that mean I was under attack by several people then? how do I block them?
I'm switching to a dedicated so my hardware issues should be sorted?

Just really trying to find the reason for my abnormally high CPU usage.
Can you install CSF? (Config Server Firewall), it will let you easily block attacks. Or you can use iptables.
I just finished upgrading to a dedicated http://hostgator.com/dedicated (standard)

Started out around 1-2 avg server load. Now about 10 hours later it's around 4-8 avg server load.

What's a safe avg server load for my specs? I think i have 8 cores but I'm not sure because I think 4 aren't technically real cores.

The fact that the avg server load seems like it's growing again scares me, but we'll see by tomorrow...

(2012-11-08, 05:30 AM)crazy4cs Wrote: [ -> ]Can you install CSF? (Config Server Firewall), it will let you easily block attacks. Or you can use iptables.

Which one is easier?

and how sure are you about ips over 15 being flooders or ddos? how often do people get attacked?

Now i'm getting alot of MySQL errors. First it was

SQL Error:
1203 - User neochi_mybb3 already has more than 'max_user_connections' active connections

Then after my host tried to raise this limit I started getting

SQL Error:
1041 - Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space

They then revert the max user connection limit but I'm still getting the out of memory alot...

Here's my dedicated servers specs: http://hostgator.com/dedicated (standard plan)

Here's my MySQL conf:

[mysqld]
slow_query_log=1
slow_query_log_file=/var/log/mysql_slow_queries.log
innodb_file_per_table=1
tmp_table_size = 384M
max_heap_table_size = 384M
query_cache_size=64M # increment by 32M, max of 384M if busy MySQL server
thread_cache_size=64M # can be increased on servers with large numbers of active users
key_buffer_size=32M
max_allowed_packet=16M # don't change unless required for large blobs
table_cache=1024 # can be increased if more Opened tables - SHOW STATUS LIKE 'Opened_tables';
table_definition_cache=8192 # increase by the same factor as table_cache
innodb_buffer_pool_size=128M # check mysql -e "SHOW GLOBAL STATUS LIKE 'Innodb_buffer_pool%';" - free vs total
innodb_flush_method=O_DIRECT
open_files_limit=16384
max_connections=125 # Should be between 100-150, increase slowly because it causes MySQL to consume more memory!
max_user_connections=25
wait_timeout=20 # can be increased if using persistent connections
#delayed_insert_timeout=20 # Turn on if max_connections being reached due to delayed inserts
#delayed_queue_size=300 # Turn on if max_connections being reached due to delayed inserts
#query_cache_limit=2M # leave at default unless there is a good reason
#join_buffer=2M # leave at default unless there is a good reason
#sort_buffer_size=2M # leave at default unless there is a good reason
#read_rnd_buffer_size=256K # leave at default unless there is a good reason
#read_buffer_size=2M # leave at default unless there is a good reason
myisam_sort_buffer_size=2M # can be increased per sessions if needed for alter tables (indexes, repair)
thread_concurrency=8 # Number of physical + virtual CPU's, be careful of adding more
#general_log=1
slow_query_log=1
log-output=TABLE # select * from mysql.general_log order by event_time desc limit 10;
long_query_time=20 # select * from mysql.slow_log order by start_time desc limit 10;

Can someone please help me with this?

help, this isn't resolved.
Pages: 1 2 3 4