• Resolved winterstreet

    (@winterstreet)


    Hello, We have a site that is hosted with Siteground and they keep shutting the site down because it goes over it’s allowed CPU seconds per month. the site doesn’t get a crazy amount of traffic, and I’ve made all the changes they recommended to try and fix the issue. They say that “it appears that there are a lot’s of MySQL executions and slow mysql queries running under your account”

    and then I’ve got this:

    === Last 24 hours - Hive Statistics ===============================================================================================
    | Script Statistics | Cron Statistics | MySQL Statistics
    Date From | Exec CPU MEM RIO WIO AVG | Exec CPU MEM RIO WIO AVG | Exec CPU AVG
    ---------------- - ------ ------- --------- -------- -------- ----- - ------ ----- ------ ----- ----- ----- - ------- ----- -----
    2017-05-16 17:00 | 324 2161.0 107.8 GB 33.6 MB 0 B 6.7 | 0 0.0 0 B 0 B 0 B 0.0 | 37870 97.0 0.0
    2017-05-16 18:00 | 681 3920.6 224.2 GB 69.2 MB 108.0 KB 5.8 | 0 0.0 0 B 0 B 0 B 0.0 | 37914 162.0 0.0
    2017-05-16 19:00 | 1174 5735.5 384.2 GB 183.8 MB 0 B 4.9 | 0 0.0 0 B 0 B 0 B 0.0 | 16653 2.0 0.0
    2017-05-16 20:00 | 571 2826.7 186.8 GB 133.7 MB 0 B 5.0 | 0 0.0 0 B 0 B 0 B 0.0 | 59211 53.0 0.0
    2017-05-16 21:00 | 353 1796.8 115.5 GB 69.0 MB 0 B 5.1 | 0 0.0 0 B 0 B 0 B 0.0 | 41406 33.0 0.0
    2017-05-16 22:00 | 213 1101.2 69.9 GB 42.5 MB 0 B 5.2 | 0 0.0 0 B 0 B 0 B 0.0 | 49127 23.0 0.0
    2017-05-16 23:00 | 140 917.1 45.4 GB 12.4 MB 0 B 6.6 | 0 0.0 0 B 0 B 0 B 0.0 | 76387 33.0 0.0
    2017-05-17 00:00 | 185 1917.7 62.4 GB 19.8 MB 0 B 10.4 | 0 0.0 0 B 0 B 0 B 0.0 | 107066 27.0 0.0
    2017-05-17 01:00 | 129 942.2 42.7 GB 20.1 MB 0 B 7.3 | 1 7.5 3.0 MB 0 B 0 B 7.5 | 68886 19.0 0.0
    2017-05-17 02:00 | 98 595.0 32.5 GB 7.7 MB 0 B 6.1 | 0 0.0 0 B 0 B 0 B 0.0 | 113334 22.0 0.0
    2017-05-17 03:00 | 101 596.5 32.9 GB 8.9 MB 0 B 5.9 | 0 0.0 0 B 0 B 0 B 0.0 | 22138 16.0 0.0
    2017-05-17 04:00 | 108 631.7 35.8 GB 23.0 MB 0 B 5.8 | 0 0.0 0 B 0 B 0 B 0.0 | 133117 23.0 0.0
    2017-05-17 05:00 | 89 546.5 29.6 GB 8.3 MB 0 B 6.1 | 0 0.0 0 B 0 B 0 B 0.0 | 63113 48.0 0.0
    2017-05-17 06:00 | 363 1783.1 118.7 GB 21.6 MB 0 B 4.9 | 0 0.0 0 B 0 B 0 B 0.0 | 61502 30.0 0.0
    2017-05-17 07:00 | 175 965.0 57.8 GB 39.5 MB 0 B 5.5 | 0 0.0 0 B 0 B 0 B 0.0 | 7093 37.0 0.0
    2017-05-17 08:00 | 266 1363.2 86.9 GB 34.6 MB 0 B 5.1 | 0 0.0 0 B 0 B 0 B 0.0 | 85992 26.0 0.0
    2017-05-17 09:00 | 139 808.0 45.9 GB 18.2 MB 0 B 5.8 | 0 0.0 0 B 0 B 0 B 0.0 | 134615 25.0 0.0
    2017-05-17 10:00 | 93 568.1 29.7 GB 10.7 MB 0 B 6.1 | 0 0.0 0 B 0 B 0 B 0.0 | 87861 40.0 0.0
    2017-05-17 11:00 | 236 1562.0 78.5 GB 30.3 MB 6.9 MB 6.6 | 0 0.0 0 B 0 B 0 B 0.0 | 246619 38.0 0.0
    2017-05-17 12:00 | 109 651.3 36.2 GB 11.8 MB 0 B 6.0 | 0 0.0 0 B 0 B 0 B 0.0 | 94478 38.0 0.0
    2017-05-17 13:00 | 210 1223.5 69.4 GB 34.8 MB 0 B 5.8 | 0 0.0 0 B 0 B 0 B 0.0 | 150444 29.0 0.0
    2017-05-17 14:00 | 116 705.5 38.3 GB 23.0 MB 0 B 6.1 | 0 0.0 0 B 0 B 0 B 0.0 | 428609 88.0 0.0
    2017-05-17 15:00 | 324 3843.7 103.7 GB 57.6 MB 10.6 MB 11.9 | 0 0.0 0 B 0 B 0 B 0.0 | 77810 34.0 0.0
    2017-05-17 16:00 | 170 1361.0 53.0 GB 84.3 MB 20.7 MB 8.0 | 0 0.0 0 B 0 B 0 B 0.0 | 0 0.0 0.0
    Total | 6367 38522.9 2087.9 GB 998.4 MB 38.3 MB 6.1 | 1 7.5 3.0 MB 0 B 0 B 7.5 | 2201245 943.0 0.0

    and this:

    1. Executed 22h 5m 1s ago for 2.093712 sec on Database --> onelifem_5ac74
    Date: 2017-05-16 18:29:06 Query_time: 2.093712 Rows_examined: 0: Rows_sent 0 Lock_time: 0.000076
    # Schema: onelifem_5ac74 Last_errno: 1300 Killed: 0 select blockedTime, reason from wp_wfBlocks where IP='\0\0\0\0\0\0\0\0\0\0��B�E�' and (permanent=1 OR (blockedTime + '300' > unix_timestamp()));
    ------------------------------------------------------------------------------------------------
    2. Executed 1h 25m 25s ago for 1.920733 sec on Database --> onelifem_5ac74
    Date: 2017-05-17 15:08:42 Query_time: 1.920733 Rows_examined: 1: Rows_sent 0 Lock_time: 0.000043
    # Schema: onelifem_5ac74 Last_errno: 0 Killed: 0 UPDATE wp_wfNotifications SET <code>new</code> = 0 WHERE <code>id</code> = 'site-YQAQAAA';
    ------------------------------------------------------------------------------------------------
    3. Executed 22h 5m 3s ago for 1.772056 sec on Database --> onelifem_5ac74
    Date: 2017-05-16 18:29:04 Query_time: 1.772056 Rows_examined: 0: Rows_sent 0 Lock_time: 0.000058
    # Schema: onelifem_5ac74 Last_errno: 0 Killed: 0 SELECT IP, blockedTime, reason, permanent, wfsn FROM wp_wfBlocks WHERE permanent = 1 OR (blockedTime + 300 > unix_timestamp());
    ------------------------------------------------------------------------------------------------
    4. Executed 22h 5m 3s ago for 1.765384 sec on Database --> onelifem_5ac74
    Date: 2017-05-16 18:29:04 Query_time: 1.765384 Rows_examined: 1: Rows_sent 1 Lock_time: 0.000087
    # Schema: onelifem_5ac74 Last_errno: 0 Killed: 0 SELECT option_value FROM wp_options WHERE option_name = 'can_compress_scripts' LIMIT 1;
    ------------------------------------------------------------------------------------------------
    5. Executed 22h 5m 2s ago for 1.181733 sec on Database --> onelifem_5ac74
    Date: 2017-05-16 18:29:05 Query_time: 1.181733 Rows_examined: 1: Rows_sent 1 Lock_time: 0.000054
    # Schema: onelifem_5ac74 Last_errno: 0 Killed: 0 SELECT option_value FROM wp_options WHERE option_name = 'can_compress_scripts' LIMIT 1;
    ------------------------------------------------------------------------------------------------
    6. Executed 20h 20m 32s ago for 1.024025 sec on Database --> onelifem_5ac74
    Date: 2017-05-16 20:13:35 Query_time: 1.024025 Rows_examined: 1009: Rows_sent 0 Lock_time: 0.005775
    # Schema: onelifem_5ac74 Last_errno: 0 Killed: 0 DELETE FROM wp_options WHERE option_name IN ('_wp_session_expires_09d6a82bfdbd5bbda24f9f3aaa716919','_wp_session_09d6a82bfdbd5

    Most of this is beyond me, but I see that some of the tables they mention have ‘wf’ as part of the title. Does it look to you like they’re saying it’s Wordfence that is the problem?

    Any help would be appreciated.

    Thanks,
    Dave White

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi Dave,
    I don’t think this is the case, since in the second report you attached I can see a couple of simple “SELECT” queries that are taking more than one second to run, this isn’t normal, it could be the database tables need to be optimized (this can be done via phpMyAdmin for example), however, there are many helpful suggestions that could help in reducing the CPU usage on some hosting providers with usage restrictions.

    Thanks.

    Winterstreet, A general server configuration efficiency issue to consider is that of eliminating most of your hosting based email. I had good results a while back when I migrated all my clients to services such as Gmail. Now, for each of our websites we only have one administration email account that is used very little, if at all.

    By using this strategy and many others, I’ve managed to keep my hosting affordable and fast.

    It might be stating the obvious, but another strategy is to obsessively utilize services such as Gtmetrix.com. In my experience, getting all my websites up into the 90th percentile in their speed rating was a good use of my time.

    Lastly, sometimes you just have to switch hosting providers. I’ve done so something like 5 times over quite a few years of being a pro blogger and website manager for a small group of clients. It’s been a pain to do so, but worth it in the end. Some of the hosting providers out there are really lame.

    MTN

    Thread Starter winterstreet

    (@winterstreet)

    @mountainguy2 thanks for the information, I’ll ask them about the email. For now she decided to upgrade to their next plan up. I think eventually we will just move it away from Siteground. Some things about their hosting are great, but the CPU seconds issue is a deal breaker for me. I’ve not had this problem anywhere else.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Siteground CPU Seconds per month’ is closed to new replies.