News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Database Error after upgrade 2.0.13 to 2.0.14

Started by spiros, June 01, 2017, 01:56:12 AM

Previous topic - Next topic

spiros

I got this after a search.

QuoteDatabase Error
MySQL server has gone away
File: ...Sources/Post.php
Line: 2480

spiros

Also:

Database Error
MySQL server has gone away
File: ....Sources/Search.php
Line: 1743

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.14, while your database is at version 2.0.2. The above error might possibly go away if you execute the latest version of upgrade.php.

Sir Osis of Liver

That looks like a server problem, contact host support.  Don't worry about the db version error.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

spiros

The reply was:

Can you please tell us how can we replicate your problem so we can investigate it further and try to fix it.


I get frequent errors when posting:

QuoteDatabase Error
MySQL server has gone away
File: ...Sources/Subs-Post.php
Line: 1705

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.14, while your database is at version 2.0.2. The above error might possibly go away if you execute the latest version of upgrade.php.

MySQL server has gone away
File: ...Sources/Post.php
Line: 2478

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.14, while your database is at version 2.0.2. The above error might possibly go away if you execute the latest version of upgrade.php.

vbgamer45

The database query might be taking too long of a time. Or query is too large.
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

spiros


Sir Osis of Liver

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

spiros

Quote from: spiros on July 12, 2017, 08:56:45 AM
The reply was:

Can you please tell us how can we replicate your problem so we can investigate it further and try to fix it.


Sir Osis of Liver

They should be able to find it in server logs.  It's typically an intermittent problem, sometimes it works, sometimes it doesn't, and that usually indicates a glitch on the db server.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

u133066

I received the same error message after an update today.
Now I cannot get the Forum to open.
Frustrated.
Any help will be appreciated

Database Error
MySQL server has gone away
File: ....Sources/Search.php
Line: 1743

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.13, while your database is at version 2.0.1. The above error might possibly go away if you execute the latest version of upgrade.php.

Illori

please open your own topic, as your issue may have a different resolution then the op may need for their topicl.

spiros

Reply from host:

According to http://wiki.simplemachines.org/smf/MySQL_has_gone_away_/_Lost_connection_to_server_during_query this is a common problem.

We increased the wait_timeout and connect_timeout settings in the my.cnf file.


I have not seen the issue come up again, but often I see very long unjustified delays in posting, similar to the ones that previously resulted in the error.

vbgamer45

I would turn on debug mode in your settings.php
You can then see what queries are ran which might be slowing it down.
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

spiros

The funny thing is that although the post may take a number of seconds to go through, the query time appears very short, i.e.

Page created in 0.083 seconds with 26 queries.

Not sure what to make of this.

spiros

I turned on debug, but although the queries time is pretty quick, the actual time for posting this one was about 12 secs

Page created in 0.064 seconds with 25 queries.

Templates: 4: index (citiez_20a), Ads (default), Display (default), GenericControls (default).
Sub templates: 10: init, html_above, adsheaders_above, body_above, adsindex_above, main, adsindex_below, body_below, adsheaders_below, html_below.
Language files: 7: index+Modifications.english (citiez_20a), ThemeStrings.english (citiez_20a), Ads.english (citiez_20a), Post.english (citiez_20a), BadBehavior_bbc.english (citiez_20a), ShareThis.english (citiez_20a), TopicRenamer/.english (citiez_20a).
Style sheets: 2: editor (default), pagination (default).
Files included: 39 - 1027KB. (show)
Cache hits: 7: 0.00528s for 39124 bytes (show)
Queries used: 26.

         SET NAMES utf8
   in .../Sources/Load.php line 136, which took 0.00012493 seconds at 0.008214 into request.

         SELECT variable, value
         FROM smf_settings
   in .../Sources/Load.php line 146, which took 0.00113201 seconds at 0.00842404 into request.

      SELECT data
      FROM smf_sessions
      WHERE session_id = '7e391320118299d6ceeb5a3164002aa4'
      LIMIT 1
   in .../Sources/Load.php line 2539, which took 0.00034213 seconds at 0.01563692 into request.

      DELETE FROM smf_sessions
      WHERE last_update < 1500218472
   in .../Sources/Load.php line 2611, which took 0.00560498 seconds at 0.01604891 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 = 1)
            WHERE mem.id_member = 1
            LIMIT 1
   in .../Sources/Load.php line 389, which took 0.00067091 seconds at 0.02192903 into request.

         SELECT
            c.id_cat, b.name AS bname, b.description, b.num_topics, b.member_groups,
            b.id_parent, c.name AS cname, IFNULL(mem.id_member, 0) AS id_moderator,
            mem.real_name, b.id_board, b.child_level,
            b.id_theme, b.override_theme, b.count_posts, b.id_profile, b.redirect,
            b.unapproved_topics, b.unapproved_posts, t.approved, t.id_member_started
         FROM smf_boards AS b
            INNER JOIN smf_topics AS t ON (t.id_topic = 463449)
            LEFT JOIN smf_categories AS c ON (c.id_cat = b.id_cat)
            LEFT JOIN smf_moderators AS mods ON (mods.id_board = t.id_board)
            LEFT JOIN smf_members AS mem ON (mem.id_member = mods.id_member)
         WHERE b.id_board = t.id_board
   in .../Sources/Load.php line 679, which took 0.00063491 seconds at 0.02275205 into request.

         SELECT variable, value, id_member, id_theme
         FROM smf_themes
         WHERE id_member = 1
            AND id_theme IN (12, 1)
   in .../Sources/Load.php line 1500, which took 0.00051498 seconds at 0.02645993 into request.

      SELECT *
      FROM smf_ads
   in .../Sources/LoadAds.php line 49, which took 0.00035501 seconds at 0.02864099 into request.

         UPDATE smf_log_online
         SET log_time = 1500221352, ip = IFNULL(INET_ATON('79.131.73.218'), 0), url = 'a:3:{s:5:\"topic\";i:463449;s:5:\"board\";i:60;s:10:\"USER_AGENT\";s:115:\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36\";}'
         WHERE session = '7e391320118299d6ceeb5a3164002aa4'
   in .../Sources/Subs.php line 2698, which took 0.00048208 seconds at 0.02940989 into request.

         UPDATE smf_topics
         SET num_views = num_views + 1
         WHERE id_topic = 463449
   in .../Sources/Display.php line 172, which took 0.00026512 seconds at 0.03003693 into request.

      SELECT
         t.num_replies, t.num_views, t.locked, ms.subject, t.is_sticky, t.id_poll,
         t.id_member_started, t.id_first_msg, t.id_last_msg, t.approved, t.unapproved_posts, mem.member_name,
         IFNULL(lt.id_msg, IFNULL(lmr.id_msg, -1)) + 1 AS new_from
         
      FROM smf_topics AS t
         INNER JOIN smf_messages AS ms ON (ms.id_msg = t.id_first_msg)
         LEFT JOIN smf_log_topics AS lt ON (lt.id_topic = 463449 AND lt.id_member = 1)
         LEFT JOIN smf_log_mark_read AS lmr ON (lmr.id_board = 60 AND lmr.id_member = 1)
         LEFT JOIN smf_members AS mem ON (mem.id_member = t.id_member_started)
      WHERE t.id_topic = 463449
      LIMIT 1
   in .../Sources/Display.php line 196, which took 0.00055504 seconds at 0.03036189 into request.

      SELECT poster_time
      FROM smf_messages
      WHERE id_msg = 708905
      LIMIT 1
   in .../Sources/Display.php line 241, which took 0.00020909 seconds at 0.03100085 into request.

               SELECT IFNULL(lt.id_msg, IFNULL(lmr.id_msg, -1)) + 1 AS new_from
               FROM smf_topics AS t
                  LEFT JOIN smf_log_topics AS lt ON (lt.id_topic = 463449 AND lt.id_member = 1)
                  LEFT JOIN smf_log_mark_read AS lmr ON (lmr.id_board = 60 AND lmr.id_member = 1)
               WHERE t.id_topic = 463449
               LIMIT 1
   in .../Sources/Display.php line 275, which took 0.00030589 seconds at 0.03127599 into request.

SELECT m.subject, m.id_topic
      FROM smf_topics AS t
         INNER JOIN smf_topics AS t2 ON (
         (t2.id_last_msg > t.id_last_msg AND t2.is_sticky >= t.is_sticky) OR t2.is_sticky > t.is_sticky)
         LEFT JOIN smf_messages AS m ON (t2.id_first_msg = m.id_msg)
      WHERE t.id_topic = 463449
         AND t2.id_board = 60
      ORDER BY t2.is_sticky, t2.id_last_msg
      LIMIT 1
   in .../Sources/Subs-Seo.php line 877, which took 0.00087905 seconds at 0.03169584 into request.

SELECT m.subject, m.id_topic
         FROM smf_topics AS t
            LEFT JOIN smf_messages AS m ON (m.id_topic = t.id_first_msg)
         WHERE t.id_board = 60
         ORDER BY t.is_sticky, t.id_last_msg
         LIMIT 1
   in .../Sources/Subs-Seo.php line 892, which took 0.00044107 seconds at 0.03263187 into request.

SELECT m.subject, m.id_topic
      FROM smf_topics AS t
         INNER JOIN smf_topics AS t2 ON (
         (t2.id_last_msg < t.id_last_msg AND t2.is_sticky <= t.is_sticky) OR t2.is_sticky < t.is_sticky)
         LEFT JOIN smf_messages AS m ON (t2.id_first_msg = m.id_msg)
      WHERE t.id_topic = 463449
         AND t2.id_board = 60
      ORDER BY t2.is_sticky DESC, t2.id_last_msg DESC
      LIMIT 1
   in .../Sources/Subs-Seo.php line 910, which took 0.00063515 seconds at 0.03313589 into request.

      SELECT body
      FROM smf_messages
      WHERE id_msg = 708905
      LIMIT 1
   in .../Seo.php line 278, which took 0.00023508 seconds at 0.03429389 into request.

         SELECT
            lo.id_member, lo.log_time, 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)
         WHERE INSTR(lo.url, 's:5:\"topic\";i:463449;') > 0 OR lo.session = '7e391320118299d6ceeb5a3164002aa4'
   in .../Sources/Display.php line 447, which took 0.00132895 seconds at 0.03569293 into request.

      SELECT id_msg, id_member, approved
      FROM smf_messages
      WHERE id_topic = 463449
      ORDER BY id_msg
      LIMIT 0, 15
   in .../Sources/Display.php line 853, which took 0.00035381 seconds at 0.03740501 into request.

         SELECT sent, id_topic
         FROM smf_log_notify
         WHERE (id_topic = 463449 OR id_board = 60)
            AND id_member = 1
         LIMIT 2
   in .../Sources/Display.php line 898, which took 0.01934981 seconds at 0.03783703 into request.

            SELECT
               a.id_attach, a.id_folder, a.id_msg, a.filename, a.file_hash, IFNULL(a.size, 0) AS filesize, a.downloads, a.approved,
               a.width, a.height
            FROM smf_attachments AS a
            WHERE a.id_msg IN (708905)
               AND a.attachment_type = 0
   in .../Sources/Display.php line 994, which took 0.00036001 seconds at 0.05727696 into request.

         SELECT
         IFNULL(lo.log_time, 0) AS is_online, IFNULL(a.id_attach, 0) AS id_attach, a.filename, a.attachment_type,
         mem.signature, mem.personal_text, mem.location, mem.gender, mem.avatar, mem.id_member, mem.member_name,
         mem.real_name, mem.email_address, mem.hide_email, mem.date_registered, mem.website_title, mem.website_url,
         mem.birthdate, mem.member_ip, mem.member_ip2, mem.icq, mem.aim, mem.yim, mem.msn, mem.posts, mem.last_login,
         mem.karma_good, mem.id_post_group, mem.karma_bad, mem.lngfile, mem.id_group, mem.time_offset, mem.show_online,
         mem.buddy_list, mg.online_color AS member_group_color, IFNULL(mg.group_name, '') AS member_group,
         pg.online_color AS post_group_color, IFNULL(pg.group_name, '') AS post_group, mem.is_activated, mem.warning,
         CASE WHEN mem.id_group = 0 OR mg.stars = '' THEN pg.stars ELSE mg.stars END AS stars,
         mem.usertitle
         FROM smf_members AS mem
         LEFT JOIN smf_log_online AS lo ON (lo.id_member = mem.id_member)
         LEFT JOIN smf_attachments AS a ON (a.id_member = mem.id_member)
         LEFT JOIN smf_membergroups AS pg ON (pg.id_group = mem.id_post_group)
         LEFT JOIN smf_membergroups AS mg ON (mg.id_group = mem.id_group)
         WHERE mem.id_member = 1
   in .../Sources/Load.php line 1042, which took 0.000772 seconds at 0.0577569 into request.

         SELECT *
         FROM smf_themes
         WHERE id_member = 1
   in .../Sources/Load.php line 1071, which took 0.000489 seconds at 0.05859995 into request.

         SELECT
            id_msg, icon, subject, poster_time, poster_ip, id_member, modified_time, modified_name, body,
            smileys_enabled, poster_name, poster_email, approved,
            id_msg_modified < 708906 AS is_read
         FROM smf_messages
         WHERE id_msg IN (708905)
         ORDER BY id_msg
   in .../Sources/Display.php line 1030, which took 0.00029993 seconds at 0.05920005 into request.

      UPDATE smf_log_activity
      SET
         hits = hits + 1
      WHERE date = '2017-07-16'
   in .../Sources/Subs.php line 3065, which took 0.00027013 seconds at 0.05971789 into request.

         INSERT INTO smf_log_errors(`id_member`, `log_time`, `ip`, `url`, `message`, `session`, `error_type`, `file`, `line`)
         VALUES
            (1, 1500221353, SUBSTRING('79.131.73.218', 1, 16), SUBSTRING('?topic=463449.new', 1, 65534), SUBSTRING('2: Parameter 1 to smart_pagination_buffer() expected to be a reference, value given', 1, 65534), 'b2981f39505a658dbe46e50f613c5ff9', 'general', SUBSTRING('/home/translat/public_html/forum/Sources/Subs.php', 1, 255), 3580)
   in .../Sources/Errors.php line 143, which took 0.00031495 seconds at 0.06516695 into request.

Advertisement: