Difference between revisions of "System is working on some queries already"
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
= Cause = | = Cause = | ||
You see this message if in the MOR menu: | |||
<br><br> | |||
'''Setup/Settings/Server Load''' TAB you have setup values | |||
<br><br> | |||
Server Load is too high when one of these conditions are met: | |||
<br><br> | |||
1. HDD utilisation higher than: | |||
<br><br> | |||
2. CPU General load higher than: | |||
<br><br> | |||
3. CPU Ruby process higher than: | |||
<br><br> | |||
And other | |||
<br><br> | |||
Why it happens ? | |||
<br><br> | |||
1. Many queres goes to mysql | |||
<br><br> | |||
2. Many calls. | |||
<br><br> | |||
3. Working with rates. | |||
<br><br> | |||
4. Working with reports. | |||
<br><br> | |||
5. In other cases when many users logged into the webgui and pressing different buttons to learn menu. | |||
<br><br> | |||
Also possible bad hard disk condition, which must be replaced. | |||
= Solutions = | |||
1. Log in to the server over SSH. | |||
<br><br> | |||
2. Check server load | |||
top | |||
<br><br> | |||
[root@mor /]# top | |||
top - 10:18:18 up 8 days, 4:33, 3 users, load average: 0.00, 0.02, 0.00 | |||
Tasks: 175 total, 1 running, 172 sleeping, 0 stopped, 2 zombie | |||
Cpu(s): 0.2%us, 0.6%sy, 0.1%ni, 99.1%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st | |||
Mem: 4056240k total, 3502792k used, 553448k free, 150176k buffers | |||
Swap: 4063228k total, 131476k used, 3931752k free, 402968k cached | |||
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND | |||
22 root 20 0 0 0 0 S 0.3 0.0 4:32.51 events/3 | |||
1886 mysql 20 0 2539m 574m 4716 S 0.3 14.5 19:32.47 mysqld | |||
2165 root 20 0 2530m 15m 4196 S 0.3 0.4 20:10.94 asterisk | |||
3561 root 20 0 949m 4584 2732 S 0.3 0.1 10:36.30 PassengerHelper | |||
25893 root 20 0 15020 1388 1008 R 0.3 0.0 0:00.01 top | |||
1 root 20 0 19360 1064 880 S 0.0 0.0 0:01.87 init | |||
3. Check Active calls | |||
asterisk -rx "core show channels" | |||
4. Check HDD | |||
atop -d | |||
Latest revision as of 10:50, 24 October 2018
Cause
You see this message if in the MOR menu:
Setup/Settings/Server Load TAB you have setup values
Server Load is too high when one of these conditions are met:
1. HDD utilisation higher than:
2. CPU General load higher than:
3. CPU Ruby process higher than:
And other
Why it happens ?
1. Many queres goes to mysql
2. Many calls.
3. Working with rates.
4. Working with reports.
5. In other cases when many users logged into the webgui and pressing different buttons to learn menu.
Also possible bad hard disk condition, which must be replaced.
Solutions
1. Log in to the server over SSH.
2. Check server load
top
[root@mor /]# top top - 10:18:18 up 8 days, 4:33, 3 users, load average: 0.00, 0.02, 0.00 Tasks: 175 total, 1 running, 172 sleeping, 0 stopped, 2 zombie Cpu(s): 0.2%us, 0.6%sy, 0.1%ni, 99.1%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 4056240k total, 3502792k used, 553448k free, 150176k buffers Swap: 4063228k total, 131476k used, 3931752k free, 402968k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 22 root 20 0 0 0 0 S 0.3 0.0 4:32.51 events/3 1886 mysql 20 0 2539m 574m 4716 S 0.3 14.5 19:32.47 mysqld 2165 root 20 0 2530m 15m 4196 S 0.3 0.4 20:10.94 asterisk 3561 root 20 0 949m 4584 2732 S 0.3 0.1 10:36.30 PassengerHelper 25893 root 20 0 15020 1388 1008 R 0.3 0.0 0:00.01 top 1 root 20 0 19360 1064 880 S 0.0 0.0 0:01.87 init
3. Check Active calls
asterisk -rx "core show channels"
4. Check HDD
atop -d
Wait
Kill MySQL Query
1. Log in to the server over SSH.
2. Connect to the mysql
mysql -u root -pkolmisoft
3. Check processlist
select * from INFORMATION_SCHEMA.PROCESSLIST where db = 'mor'\g
4. Kill process which is overloading mysql
mysql> kill 2488509;
Precaution
Setting for users to limit for how many days they can watch statistics
Check slow query log