News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Forum running extremely slow

Started by backend, February 06, 2018, 02:07:21 AM

Previous topic - Next topic

backend

My host (godaddy) made some changes to my website (migrating to a new server) and after they fixed a whole set of issues, the forum is finally back online but it is extremely slow, if not accessible at times (Internal Server Error)

I have been in contact with them and they are looking into it.

I have tried to see what the issue is but can't pinpoint it, especially not when I am fully able to access my forums given how slow it is.

http://www.assyrianvoice.net/forum


For the record, no changes were made to the site in ages and everything was working perfectly fine until they made these changes.

vbgamer45

Add this to your settings.php

$db_show_debug = true;


Maybe we can see what queries are slow and or it could be godaddys mysql server is slow/poorly optimized.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

SaltedWeb

I noticed it very slow never too 50 sec to load from my end then another minute to open a specific topic. Definetly slow.
Is this the only site you have hosted with them?
Knowing your limitations makes you human, exceeding these limitations makes you worthy of being human.

Aleksi "Lex" Kilpinen

Page created in 68.285 seconds with 22 queries.

Oh, wow.... I'd be screaming at my host if they "migrated" me with results like that.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Illori

given some topics we have recently seen from godaddy moving/breaking forums, this is not so bad.

either way i would say leave godaddy and find a non-oversold host to replace them.

SaltedWeb

I got a The 500 Internal Server Error code twice loading pages.
So does indeed seems configured wrong.
Knowing your limitations makes you human, exceeding these limitations makes you worthy of being human.

backend

thank you guys, I just enabled debugging....

Here is what I am getting: (I will try to get more , but it is too slow and keeps timing out)

Templates: 3: index (default), Ads (default), BoardIndex (default).
Sub templates: 10: init, html_above, adsheaders_above, body_above, adsindex_above, main, adsindex_below, body_below, adsheaders_below, html_below.
Language files: 10: index+Modifications.english (default), index+Modifications.english-utf8 (default), markItUp.english (default), markItUp.english-utf8 (default), SimTopics.english (default), SimTopics.english-utf8 (default), Ads.english (default), Ads.english-utf8 (default), Aeva.english (default), Aeva.english-utf8 (default).
Style sheets: 0: .
Files included: 32 - 940KB. (./index.php, ./Settings.php, ./Sources/QueryString.php, ./Sources/Subs.php, ./Sources/Errors.php, ./Sources/Load.php, ./Sources/Security.php, ./Sources/LoadAds.php, ./Sources/Subs-Db-mysql.php, ./Sources/Subs-markItUp.php, ./Sources/Subs-SimTopics.php, ./Sources/Subs-MobileDetect.php, ./Themes/default/index.template.php, ./Themes/default/languages/index.english.php, ./Themes/default/languages/Modifications.english.php, ./Themes/default/languages/index.english-utf8.php, ./Themes/default/languages/Modifications.english-utf8.php, ./Themes/default/languages/markItUp.english.php, ./Themes/default/languages/SimTopics.english.php, ./Themes/default/Ads.template.php, ./Themes/default/languages/Ads.english.php, ./Themes/default/languages/Ads.english-utf8.php, ./Sources/BoardIndex.php, ./Themes/default/BoardIndex.template.php, ./Sources/Subs-BoardIndex.php, ./Sources/Subs-MembersOnline.php, ./Sources/Subs-Recent.php, ./Sources/Aeva-Embed.php, ./Sources/Aeva-Sites.php, ./Themes/default/languages/Aeva.english.php, ./Sources/Subs-Calendar.php, ./header.php)
Queries used: 15.

[Show Queries]

backend

Templates: 3: index (default), Ads (default), BoardIndex (default).
Sub templates: 10: init, html_above, adsheaders_above, body_above, adsindex_above, main, adsindex_below, body_below, adsheaders_below, html_below.
Language files: 10: index+Modifications.english (default), index+Modifications.english-utf8 (default), markItUp.english (default), markItUp.english-utf8 (default), SimTopics.english (default), SimTopics.english-utf8 (default), Ads.english (default), Ads.english-utf8 (default), Aeva.english (default), Aeva.english-utf8 (default).
Style sheets: 0: .
Files included: 32 - 940KB. (show)
Queries used: 24.

         SET NAMES utf8
    in .../Sources/Load.php line 137, which took 0.00072217 seconds at 0.00835586 into request.

         SELECT variable, value
          FROM smf_settings
    in .../Sources/Load.php line 147, which took 0.00211692 seconds at 0.00916195 into request.

      SELECT data
       FROM smf_sessions
       WHERE session_id = 'd84mlc43oan18s47dtflq6n882'
       LIMIT 1
    in .../Sources/Load.php line 2475, which took 0.00207996 seconds at 0.0133729 into request.

            SELECT mem.*, IFNULL(a.id_attach, 0) AS id_attach, a.filename, a.attachment_type
             FROM smf_members AS mem
                LEFT JOIN smf_attachments AS a ON (a.id_member = 2)
             WHERE mem.id_member = 2
             LIMIT 1
    in .../Sources/Load.php line 399, which took 0.00299501 seconds at 0.01586795 into request.

         SELECT variable, value, id_member, id_theme
          FROM smf_themes
          WHERE id_member IN (-1, 0, 2)
             AND id_theme = 1
    in .../Sources/Load.php line 1446, which took 0.00074387 seconds at 0.01902699 into request.

      SELECT *
       FROM smf_ads
    in .../Sources/LoadAds.php line 51, which took 0.00080109 seconds at 0.02720094 into request.

         SET NAMES utf8
    in .../Sources/Load.php line 137, which took 0.00052285 seconds at 0.00724006 into request.

         SELECT variable, value
          FROM smf_settings
    in .../Sources/Load.php line 147, which took 0.00213885 seconds at 0.00784707 into request.

      SELECT data
       FROM smf_sessions
       WHERE session_id = 'd84mlc43oan18s47dtflq6n882'
       LIMIT 1
    in .../Sources/Load.php line 2475, which took 0.00177383 seconds at 0.01107907 into request.

            SELECT mem.*, IFNULL(a.id_attach, 0) AS id_attach, a.filename, a.attachment_type
             FROM smf_members AS mem
                LEFT JOIN smf_attachments AS a ON (a.id_member = 2)
             WHERE mem.id_member = 2
             LIMIT 1
    in .../Sources/Load.php line 399, which took 0.00094199 seconds at 0.01324987 into request.

         SELECT variable, value, id_member, id_theme
          FROM smf_themes
          WHERE id_member IN (-1, 0, 2)
             AND id_theme = 1
    in .../Sources/Load.php line 1446, which took 0.00072503 seconds at 0.01435089 into request.

      SELECT *
       FROM smf_ads
    in .../Sources/LoadAds.php line 51, which took 0.0007031 seconds at 0.01676488 into request.

            DELETE FROM smf_log_online
             WHERE log_time < 1517935494
                AND session != 'd84mlc43oan18s47dtflq6n882'
    in .../Sources/Subs.php line 2675, which took 0.15018201 seconds at 0.0176909 into request.

         UPDATE smf_log_online
          SET log_time = 1517940894, ip = IFNULL(INET_ATON('142.205.241.254'), 0), url = 'a:1:{s:10:\"USER_AGENT\";s:68:\"Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko\";}'
          WHERE session = 'd84mlc43oan18s47dtflq6n882'
    in .../Sources/Subs.php line 2691, which took 0.00084805 seconds at 0.16801596 into request.

      UPDATE smf_members
       SET last_login = 1517940894, member_ip = '142.205.241.254', member_ip2 = '142.205.241.254', total_time_logged_in = 21518232
       WHERE id_member = 2
    in .../Sources/Subs.php line 547, which took 18.49642205 seconds at 0.16898394 into request.

      SELECT
          c.id_cat, c.name AS cat_name,
          b.id_board, b.name AS board_name, b.description,
          CASE WHEN b.redirect != '' THEN 1 ELSE 0 END AS is_redirect,
          b.num_posts, b.num_topics, b.unapproved_posts, b.unapproved_topics, b.id_parent,
          IFNULL(m.poster_time, 0) AS poster_time, IFNULL(mem.member_name, m.poster_name) AS poster_name,
          m.subject, m.id_topic, IFNULL(mem.real_name, m.poster_name) AS real_name,
         
          (IFNULL(lb.id_msg, 0) >= b.id_msg_updated) AS is_read, IFNULL(lb.id_msg, -1) + 1 AS new_from,
          c.can_collapse, IFNULL(cc.id_member, 0) AS is_collapsed,
          IFNULL(mem.id_member, 0) AS id_member, m.id_msg,
          IFNULL(mods_mem.id_member, 0) AS id_moderator, mods_mem.real_name AS mod_real_name
       FROM smf_boards AS b
          LEFT JOIN smf_categories AS c ON (c.id_cat = b.id_cat)
          LEFT JOIN smf_messages AS m ON (m.id_msg = b.id_last_msg)
          LEFT JOIN smf_members AS mem ON (mem.id_member = m.id_member)
          LEFT JOIN smf_log_boards AS lb ON (lb.id_board = b.id_board AND lb.id_member = 2)
          LEFT JOIN smf_collapsed_categories AS cc ON (cc.id_cat = c.id_cat AND cc.id_member = 2)
          LEFT JOIN smf_moderators AS mods ON (mods.id_board = b.id_board)
          LEFT JOIN smf_members AS mods_mem ON (mods_mem.id_member = mods.id_member)
       WHERE 1=1 ORDER BY b.board_order
    in .../Sources/Subs-BoardIndex.php line 72, which took 0.00633097 seconds at 18.66697407 into request.

      SELECT
          lo.id_member, lo.log_time, lo.id_spider, mem.real_name, mem.member_name, mem.show_online,
          mg.online_color, mg.id_group, mg.group_name
       FROM smf_log_online AS lo
          LEFT JOIN smf_members AS mem ON (mem.id_member = lo.id_member)
          LEFT JOIN smf_membergroups AS mg ON (mg.id_group = CASE WHEN mem.id_group = 0 THEN mem.id_post_group ELSE mem.id_group END)
    in .../Sources/Subs-MembersOnline.php line 82, which took 0.00435996 seconds at 18.67859292 into request.

      SELECT
          m.poster_time, m.subject, m.id_topic, m.id_member, m.id_msg,
          IFNULL(mem.real_name, m.poster_name) AS poster_name, t.id_board, b.name AS board_name,
          SUBSTRING(m.body, 1, 385) AS body, m.smileys_enabled
       FROM smf_messages AS m
          INNER JOIN smf_topics AS t ON (t.id_topic = m.id_topic)
          INNER JOIN smf_boards AS b ON (b.id_board = t.id_board)
          LEFT JOIN smf_members AS mem ON (mem.id_member = m.id_member)
       WHERE m.id_msg >= 916611
          AND b.id_board != 9
          AND 1=1
       ORDER BY m.id_msg DESC
       LIMIT 5
    in .../Sources/Subs-Recent.php line 50, which took 0.02579713 seconds at 18.68372989 into request.

               SELECT code, filename, description
                FROM smf_smileys
    in .../Sources/Subs.php line 2516, which took 0.00103092 seconds at 18.711061 into request.

      SELECT event_date, YEAR(event_date) AS year, title
       FROM smf_calendar_holidays
       WHERE event_date BETWEEN '2018-02-05' AND '2018-02-16'
          OR event_date BETWEEN '0004-02-05' AND '0004-02-16'
    in .../Sources/Subs-Calendar.php line 285, which took 0.00089812 seconds at 18.88130689 into request.

      SELECT id_member, real_name, YEAR(birthdate) AS birth_year, birthdate
       FROM smf_members
       WHERE YEAR(birthdate) != '0001'
          AND MONTH(birthdate) != 0
          AND DAYOFMONTH(birthdate) != 0
          AND YEAR(birthdate) <= 2018
          AND (
             DATE_FORMAT(birthdate, '2018-%m-%d') BETWEEN '2018-02-05' AND '2018-02-16'
          )
          AND is_activated = 1
    in .../Sources/Subs-Calendar.php line 137, which took 0.23375988 seconds at 18.88238502 into request.

      SELECT
          cal.id_event, cal.start_date, cal.end_date, cal.title, cal.id_member, cal.id_topic,
          cal.id_board, b.member_groups, t.id_first_msg, t.approved, b.id_board
       FROM smf_calendar AS cal
          LEFT JOIN smf_boards AS b ON (b.id_board = cal.id_board)
          LEFT JOIN smf_topics AS t ON (t.id_topic = cal.id_topic)
       WHERE cal.start_date <= '2018-02-16'
          AND cal.end_date >= '2018-02-05'
    in .../Sources/Subs-Calendar.php line 188, which took 1.67578793 seconds at 19.11656904 into request.

      UPDATE smf_log_activity
       SET
          hits = hits + 1
       WHERE date = '2018-02-06'
    in .../Sources/Subs.php line 3057, which took 0.01118684 seconds at 20.79311204 into request.

      UPDATE smf_ads
          SET hits = hits+1
             WHERE ADS_ID = 4
    in .../Sources/LoadAds.php line 301, which took 0.00329995 seconds at 20.84648299 into request.

[Hide Queries]

Aleksi "Lex" Kilpinen

All I see is that for some reason your members table took a whole lot of time to run this


UPDATE smf_members
       SET last_login = 1517940894, member_ip = '142.205.241.254', member_ip2 = '142.205.241.254', total_time_logged_in = 21518232
       WHERE id_member = 2
    in .../Sources/Subs.php line 547, which took 18.49642205 seconds at 0.16898394 into request.


I'm fairly useless with the database side of things, but in my opinion that query should not have taken long at all.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

drewactual

Quote from: Aleksi "Lex" Kilpinen on February 08, 2018, 12:20:25 PM
All I see is that for some reason your members table took a whole lot of time to run this

I'm fairly useless with the database side of things, but in my opinion that query should not have taken long at all.



i was reading elsewhere that there often follows an issue with member profiles not being complete- as in an example a registration date null which should never be null...

just as a curiosity, if i were him i'd check out member #2's profile, and add a value to whatever field is missing... being #2, it could likely be the original admin's?  or, one added immediately after install?  that kind of issue can lay dormant for a long time, until the trash is emptied and assertions re-made... and then boom- things run slow if at all. 

the same place i read about that was also talking about weird things in signature lines that can cause this, and is worth a look too- especially if it coughs on the same member/IP/account every time.

Aleksi "Lex" Kilpinen

I would be asking the host if they can offer an explanation on the lazy DB performance.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Advertisement: