MyBB Community Forums

Full Version: MySQL Queries overusing system resources
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Apparently two forums of mine that are present on shared hosting server are overusing system resources and because of that I have got information that my account will be disabled.

This is very strange indeed for me and I thought I will ask what might be the cause of this as this will be really quick.
If anyone got information about it than let me know, one of the forum link is :-
http://labourlawpractice.com/
(There is some spam on forum which I will deal with later but currently knowing the issue and removing the unwanted script is my priority.)

I have pasted the SQL log below, hope anyone knows about this strange issue

====================================[ MySQL Queries ]====================================

| 172056311 | servixx_mybb90  | localhost | servixx_mybb90         | Query          | 0    | Sending data       | SELECT COUNT(tid) as threads FROM mybbo0_threads WHERE fid = '39' AND (lastpost >= '1498454581' OR s | 0.000    |

| 172056323 | servixx_mybb966 | localhost | servixx_mybb966        | Sleep          | 0    |                    |                                                                                                      | 0.000    |

| 172059996 | servixx_mybb90 | localhost                       | servixx_mybb90         | Query          | 0    | Sending data                 | SELECT COUNT(tid) as threads FROM mybbo0_threads WHERE fid = '39' AND (lastpost >= '1498341340' OR s                        | 0.000    |

| 172060028 | servixx_mybb90 | localhost                       | servixx_mybb90         | Query          | 0    | Sending data                 | SELECT COUNT(tid) as threads FROM mybbo0_threads WHERE fid = '39' AND (lastpost >= '1498404489' OR s                        | 0.000    |

================================[ DataBase Load Report ]=================================

+-----------+-----------+--------+----------+----+---------+---+----+-----+------+--------+
|    FROM   |     TO    |  USER  |   CPU    |READ|  WRITE  |CON|lCPU|lREAD|lWRITE|RESTRICT|
+-----------+-----------+--------+----------+----+---------+---+----+-----+------+--------+
|08-11 05:25|08-11 06:25|servixx|33.3674396|0   |0.0438745|0  |400 |1000 |1000  |        |
|08-11 06:25|08-11 07:25|servixx|32.8841867|0   |0.045658 |0  |400 |1000 |1000  |        |
|08-11 07:25|08-11 08:25|servixx|31.3313406|0   |0.0443513|0  |400 |1000 |1000  |        |
|08-11 08:25|08-11 09:25|servixx|32.8532979|0   |0.0448679|0  |400 |1000 |1000  |        |
|08-11 09:25|08-11 10:25|servixx|32.9509306|0   |0.045412 |0  |400 |1000 |1000  |        |
|08-11 10:25|08-11 11:25|servixx|32.2105352|0   |0.0395638|0  |400 |1000 |1000  |        |
|08-11 11:25|08-11 12:25|servixx|32.1826246|0   |0.0380662|0  |400 |1000 |1000  |        |
|08-11 12:25|08-11 13:25|servixx|33.8312554|0   |0.040179 |0  |400 |1000 |1000  |        |
|08-11 13:25|08-11 14:25|servixx|36.3037825|0   |0.0473009|0  |400 |1000 |1000  |        |
|08-11 14:25|08-11 15:25|servixx|30.8644984|0   |0.0468407|0  |400 |1000 |1000  |        |
|08-11 15:25|08-11 16:25|servixx|32.7896294|0   |0.0407276|0  |400 |1000 |1000  |        |
|08-11 16:25|08-11 17:25|servixx|33.5561249|0   |0.0425133|0  |400 |1000 |1000  |        |
|08-11 17:25|08-11 18:25|servixx|31.4681969|0   |0.0423078|0  |400 |1000 |1000  |        |
|08-11 18:25|08-11 19:25|servixx|31.8607907|0   |0.0357675|0  |400 |1000 |1000  |        |
|08-11 19:25|08-11 20:25|servixx|25.403286 |0   |0.0360922|0  |400 |1000 |1000  |        |
|08-11 20:25|08-11 21:25|servixx|27.3907531|0   |0.0469325|0  |400 |1000 |1000  |        |
|08-11 21:25|08-11 22:25|servixx|25.3584932|0   |0.040244 |0  |400 |1000 |1000  |        |
|08-11 22:25|08-11 23:25|servixx|28.395478 |0   |0.0412372|0  |400 |1000 |1000  |        |
|08-11 23:25|08-12 00:25|servixx|24.5280323|0   |0.0462668|0  |400 |1000 |1000  |        |
|08-12 00:25|08-12 01:25|servixx|27.5912158|0   |0.0441709|0  |400 |1000 |1000  |        |
|08-12 01:25|08-12 02:25|servixx|28.4479799|0   |0.0483383|0  |400 |1000 |1000  |        |
|08-12 02:25|08-12 03:25|servixx|28.6456055|0   |0.0438182|0  |400 |1000 |1000  |        |
|08-12 03:25|08-12 04:25|servixx|26.9992417|0   |0.0270392|0  |400 |1000 |1000  |        |
|08-12 04:25|08-12 05:25|servixx|26.8888301|0   |0.0241035|0  |400 |1000 |1000  |        |
+-----------+-----------+--------+----------+----+---------+---+----+-----+------+--------+

======================================[ Notations ]======================================
======================================[ Notations ]======================================

ID — LVE ID or Username

aCPU — Average CPU Usage
mCPU — Max CPU Usage
lCPU — CPU Limit

aEP — Average Entry Processes
mEP — Max Entry Processes
lEP — Entry Processes Limit

aVMem — Average Virtual Memory Usage
mVMem — Max Virtual Memory Usage
lVMem — Virtual Memory Limit

VMemF — Out of Memory Faults
EPf — Entry Processes Faults

aPMem — Average Physical Memory Usage
mPMem — Max Physical Memory Usage
lPMem — Physical Memory Limit

aNproc — Average Number of Processes
mNproc — Max Number of Processes
lNproc — Number of Processes Limit

PMemF — Out of Physical Memory Faults
NprocF — Number of Processes Faults

aIO — Average Input/Output
mIO — Max Input/Output
lIO — Input/Output Limit

aIOPS: Average I/O Operations per second
mIOPS: Max I/O Operations per second
lIOPS: I/O Operations per second Limit

-----------------------------------------------------------------------------------------

TS : Timestamp
USER : Username
CPU : Average CPU Usage
READ : Average READ Usage
WRITE : Average WRITE Usage
CON : Average Outside Connections
lCPU : CPU Limit
lREAD : READ Limit
lWRITE : WRITE Limit
RESTRICT : C - CPU / R - READ / W - WRITE

=========================================================================================

Maybe it execute too many queries. It can be caused by plugins.
(2017-08-12, 03:42 PM)chack1172 Wrote: [ -> ]Maybe it execute too many queries. It can be caused by plugins.
Maybe, sent you response to the PM Smile

Thread can be closed, too late.
Account already banned.
Just get a VPS. Then you dont have to worry about shared hosting crap and the worry of your account being banned for resources used.
What are the limits?

If your board gets swamped with spambots (or you have people hammering F5 all the time) it's easy to break a "queries per hour" limit even if each individual request has only a moderate amount of queries. It's a matter of too many requests.

The query you posted above looks like a regular forumdisplay.php with a filter (datecut). If your tables have proper index structure and not an extremely large number of threads, it should not be an expensive query. See if your threads table has index for fid and lastpost.