News:

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

Main Menu

Can't install mods after upgrade from 2.0.19 to 2.1.4

Started by hustreamload, July 21, 2023, 11:53:29 AM

Previous topic - Next topic

hustreamload

#60
Quote from: shawnb61 on July 25, 2023, 01:45:47 AMCan you show the structure for the smf_boards & smf_topics records? 

Include the indexes.  Screen shot from phpmyadmin Structure tab is OK.

If we confirm those indexes are missing, that might explain the 503.  That can be easily fixed.

Sorry because of the previous post, it was misunderstanding. So the smf_boards contains  cca. 500 rows, but smf topics 87000! I send smf_boards attached, but smf_topics is 7 MB, , therefore I send download link instead:


(Edit by Kindred: link and attachment removed)

shawnb61

Not the contents.  The Structure. 

Select the table, then select the Structure tab in phpmyadmin.

For both boards & topics.

Shouldn't be very big.
A question worth asking is born in experience & driven by necessity. - Fripp

hustreamload

#62
Boards


Topics:


The good news, that after the 57th clean upgarde I tried another portal (EzPortal) with succes, and then almost every mod could be installed...already 5 or 6. The bad news, that the two corrupted tables are still red, maybe this info helps.

Thanks!

hustreamload

Also bad news, that after the first 5 every mod failed

shawnb61

We need to add those missing indexes.

I believe that will fix the 503 error.  Possibly more.  We'll see.

I'll be able to help in a couple hours.  (At work now...)
A question worth asking is born in experience & driven by necessity. - Fripp

shawnb61

#65
OK, there are 3 indexes that need to be built.  You can run this sql in phpmyadmin, in the SQL tab:

ALTER TABLE smf_boards ADD INDEX idx_member_groups (member_groups(48));ALTER TABLE smf_topics ADD UNIQUE idx_last_message (id_last_msg, id_board);ALTER TABLE smf_topics ADD UNIQUE idx_first_message (id_first_msg, id_board);
After doing this, please attempt the "Find and repair errors" task.

Also, did you try the "Optimize all tables" as suggested above?

Also please rerun the DB compare utility to confirm no more RED missing items.

Let us know how these tasks go...
A question worth asking is born in experience & driven by necessity. - Fripp

hustreamload

#66
Oh, thanks a lot shawnb61!

After running sql scripts in phpmyadmin a full repair check was made, then db optimalization, after that I tried to run Find and repair errors task, but 503 error remained. More tragical, that  mod unavailability as well. The good news, that DB compare is already OK, no red missing items.

shawnb61

Something is causing your database to run away, and we still don't know the root cause.  There are two things I'd like to look at next:
(1) Do you have the mysql log entries?  Normally the only entries in the mysql log are startup/shutdown, but in the event of something deeper, errors may be logged here.
(2) Let's turn on SMF's mysql debug mode...  Place the following in your Settings.php file, near the other $db settings:
$db_show_debug = true;
After turning debug mode, attempt one of the actions that is failing.  Then, let's look at the queries that were executing.
A question worth asking is born in experience & driven by necessity. - Fripp

hustreamload

Thanks again shawnb61!

To the first point: I dont know, from where/what sholud I send. Do you mean the log_error table from the DB? Attached. Or sholuld send the backtraces?

To the second point: After activating debug mode the first test was running "Find and repair any errors". Earlier this ended with 503 error, now only a blank screen came out after 60 seconds (and error log remained empty). The second was activating mod !Forum with settings". After 60 seconds this query came out:
Warning: mysqli_stmt_bind_param() expects parameter 1 to be mysqli_stmt, bool given in /home/strea334/public_html/Sources/Subs-Db-mysql.php on line 1027
array(14) { [0]=> array(4) { ["file"]=> string(52) "/home/strea334/public_html/Sources/Subs-Db-mysql.php" ["line"]=> int(590) ["function"]=> string(9) "log_error" ["args"]=> array(4) { [0]=> string(42) "Database Error: MySQL server has gone away" [1]=> string(8) "database" [2]=> string(45) "/home/strea334/public_html/Sources/Errors.php" [3]=> int(138) } } [1]=> array(4) { ["file"]=> string(52) "/home/strea334/public_html/Sources/Subs-Db-mysql.php" ["line"]=> int(494) ["function"]=> string(12) "smf_db_error" ["args"]=> array(2) { [0]=> string(44) " SELECT COUNT(*) FROM smf_log_errors" [1]=> object(mysqli)#1 (18) { ["affected_rows"]=> int(-1) ["client_info"]=> string(14) "mysqlnd 7.4.33" ["client_version"]=> int(70433) ["connect_errno"]=> int(0) ["connect_error"]=> NULL ["errno"]=> int(2006) ["error"]=> string(26) "MySQL server has gone away" ["error_list"]=> array(2) { [0]=> array(3) { ["errno"]=> int(2006) ["sqlstate"]=> string(5) "HY000" ["error"]=> string(26) "MySQL server has gone away" } [1]=> array(3) { ["errno"]=> int(2006) ["sqlstate"]=> string(5) "HY000" ["error"]=> string(26) "MySQL server has gone away" } } ["field_count"]=> int(1) ["host_info"]=> string(25) "Localhost via UNIX socket" ["info"]=> NULL ["insert_id"]=> int(0) ["server_info"]=> string(29) "5.5.5-10.6.14-MariaDB-cll-lve" ["server_version"]=> int(100614) ["sqlstate"]=> string(5) "HY000" ["protocol_version"]=> int(10) ["thread_id"]=> int(1762952) ["warning_count"]=> int(0) } } } [2]=> array(4) { ["file"]=> string(45) "/home/strea334/public_html/Sources/Errors.php" ["line"]=> int(138) ["function"]=> string(12) "smf_db_query" ["args"]=> array(3) { [0]=> string(0) "" [1]=> string(44) " SELECT COUNT(*) FROM smf_log_errors" [2]=> array(0) { } } } [3]=> array(4) { ["file"]=> string(45) "/home/strea334/public_html/Sources/Errors.php" ["line"]=> int(301) ["function"]=> string(9) "log_error" ["args"]=> array(4) { [0]=> string(77) "2: mysqli_stmt_bind_param() expects parameter 1 to be mysqli_stmt, bool given" [1]=> string(7) "general" [2]=> string(52) "/home/strea334/public_html/Sources/Subs-Db-mysql.php" [3]=> int(1027) } } [4]=> array(2) { ["function"]=> string(17) "smf_error_handler" ["args"]=> array(5) { [0]=> int(2) [1]=> string(74) "mysqli_stmt_bind_param() expects parameter 1 to be mysqli_stmt, bool given" [2]=> string(52) "/home/strea334/public_html/Sources/Subs-Db-mysql.php" [3]=> int(1027) [4]=> array(4) { ["error_array"]=> array(10) { [0]=> &int(3) [1]=> &int(1690433413) [2]=> &string(8) "0526f8d0" [3]=> &string(80) "?action=admin;area=packages;sa=install2;package=smf-forum-width_1.2.tar.gz;pid=0" [4]=> &string(42) "Database Error: MySQL server has gone away" [5]=> &string(32) "a0afdff95d5bdcde424b9b0294ac5e13" [6]=> &string(8) "database" [7]=> &string(47) "/home/strea334/public_html/Sources/Packages.php" [8]=> &int(928) [9]=> &string(1482) "[{"file":"\/home\/strea334\/public_html\/Sources\/Subs-Db-mysql.php","line":494,"function":"smf_db_error","args":["\n\t\tSELECT version, themes_installed, db_changes\n\t\tFROM smf_log_packages\n\t\tWHERE package_id = 'SychO:forum_width_setting'\n\t\t\tAND install_state != 0\n\t\tORDER BY time_installed DESC\n\t\tLIMIT 1",{"affected_rows":null,"client_info":null,"client_version":null,"connect_errno":null,"connect_error":null,"errno":null,"error":null,"error_list":null,"field_count":null,"host_info":null,"info":null,"insert_id":null,"server_info":null,"server_version":null,"sqlstate":null,"protocol_version":null,"thread_id":null,"warning_count":null}]},{"file":"\/home\/strea334\/public_html\/Sources\/Packages.php","line":928,"function":"smf_db_query","args":["","\n\t\tSELECT version, themes_installed, db_changes\n\t\tFROM smf_log_packages\n\t\tWHERE package_id = 'SychO:forum_width_setting'\n\t\t\tAND install_state != 0\n\t\tORDER BY time_installed DESC\n\t\tLIMIT 1",{"not_installed":0,"current_package":"SychO:forum_width_setting"}]},{"file":"\/home\/strea334\/public_html\/Sources\/Subs.php","line":6042,"function":"PackageInstall","args":[]},{"file":"\/home\/strea334\/public_html\/Sources\/Packages.php","line":91,"function":"call_helper","args":["PackageInstall"]},{"file":"\/home\/strea334\/public_html\/Sources\/Admin.php","line":501,"function":"Packages","args":[]},{"file":"\/home\/strea334\/public_html\/index.php","line":184,"function":"AdminMain","args":[]}]" } ["db_prefix"]=> &string(4) "smf_" ["db_connection"]=> &object(mysqli)#1 (18) { ["affected_rows"]=> int(-1) ["client_info"]=> string(14) "mysqlnd 7.4.33" ["client_version"]=> int(70433) ["connect_errno"]=> int(0) ["connect_error"]=> NULL ["errno"]=> int(2006) ["error"]=> string(26) "MySQL server has gone away" ["error_list"]=> array(2) { [0]=> array(3) { ["errno"]=> int(2006) ["sqlstate"]=> string(5) "HY000" ["error"]=> string(26) "MySQL server has gone away" } [1]=> array(3) { ["errno"]=> int(2006) ["sqlstate"]=> string(5) "HY000" ["error"]=> string(26) "MySQL server has gone away" } } ["field_count"]=> int(1) ["host_info"]=> string(25) "Localhost via UNIX socket" ["info"]=> NULL ["insert_id"]=> int(0) ["server_info"]=> string(29) "5.5.5-10.6.14-MariaDB-cll-lve" ["server_version"]=> int(100614) ["sqlstate"]=> string(5) "HY000" ["protocol_version"]=> int(10) ["thread_id"]=> int(1762952) ["warning_count"]=> int(0) } ["mysql_error_data_prep"]=> &bool(false) } } } [5]=> array(4) { ["file"]=> string(52) "/home/strea334/public_html/Sources/Subs-Db-mysql.php" ["line"]=> int(1027) ["function"]=> string(22) "mysqli_stmt_bind_param" ["args"]=> array(12) { [0]=> bool(false) [1]=> string(10) "iissssssis" [2]=> &int(3) [3]=> &int(1690433413) [4]=> &string(8) "0526f8d0" [5]=> &string(80) "?action=admin;area=packages;sa=install2;package=smf-forum-width_1.2.tar.gz;pid=0" [6]=> &string(42) "Database Error: MySQL server has gone away" [7]=> &string(32) "a0afdff95d5bdcde424b9b0294ac5e13" [8]=> &string(8) "database" [9]=> &string(47) "/home/strea334/public_html/Sources/Packages.php" [10]=> &int(928) [11]=> &string(1482) "[{"file":"\/home\/strea334\/public_html\/Sources\/Subs-Db-mysql.php","line":494,"function":"smf_db_error","args":["\n\t\tSELECT version, themes_installed, db_changes\n\t\tFROM smf_log_packages\n\t\tWHERE package_id = 'SychO:forum_width_setting'\n\t\t\tAND install_state != 0\n\t\tORDER BY time_installed DESC\n\t\tLIMIT 1",{"affected_rows":null,"client_info":null,"client_version":null,"connect_errno":null,"connect_error":null,"errno":null,"error":null,"error_list":null,"field_count":null,"host_info":null,"info":null,"insert_id":null,"server_info":null,"server_version":null,"sqlstate":null,"protocol_version":null,"thread_id":null,"warning_count":null}]},{"file":"\/home\/strea334\/public_html\/Sources\/Packages.php","line":928,"function":"smf_db_query","args":["","\n\t\tSELECT version, themes_installed, db_changes\n\t\tFROM smf_log_packages\n\t\tWHERE package_id = 'SychO:forum_width_setting'\n\t\t\tAND install_state != 0\n\t\tORDER BY time_installed DESC\n\t\tLIMIT 1",{"not_installed":0,"current_package":"SychO:forum_width_setting"}]},{"file":"\/home\/strea334\/public_html\/Sources\/Subs.php","line":6042,"function":"PackageInstall","args":[]},{"file":"\/home\/strea334\/public_html\/Sources\/Packages.php","line":91,"function":"call_helper","args":["PackageInstall"]},{"file":"\/home\/strea334\/public_html\/Sources\/Admin.php","line":501,"function":"Packages","args":[]},{"file":"\/home\/strea334\/public_html\/index.php","line":184,"function":"AdminMain","args":[]}]" } } [6]=> array(4) { ["file"]=> string(45) "/home/strea334/public_html/Sources/Errors.php" ["line"]=> int(129) ["function"]=> string(19) "smf_db_error_insert" ["args"]=> array(1) { [0]=> array(10) { [0]=> &int(3) [1]=> &int(1690433413) [2]=> &string(8) "0526f8d0" [3]=> &string(80) "?action=admin;area=packages;sa=install2;package=smf-forum-width_1.2.tar.gz;pid=0" [4]=> &string(42) "Database Error: MySQL server has gone away" [5]=> &string(32) "a0afdff95d5bdcde424b9b0294ac5e13" [6]=> &string(8) "database" [7]=> &string(47) "/home/strea334/public_html/Sources/Packages.php" [8]=> &int(928) [9]=> &string(1482) "[{"file":"\/home\/strea334\/public_html\/Sources\/Subs-Db-mysql.php","line":494,"function":"smf_db_error","args":["\n\t\tSELECT version, themes_installed, db_changes\n\t\tFROM smf_log_packages\n\t\tWHERE package_id = 'SychO:forum_width_setting'\n\t\t\tAND install_state != 0\n\t\tORDER BY time_installed DESC\n\t\tLIMIT 1",{"affected_rows":null,"client_info":null,"client_version":null,"connect_errno":null,"connect_error":null,"errno":null,"error":null,"error_list":null,"field_count":null,"host_info":null,"info":null,"insert_id":null,"server_info":null,"server_version":null,"sqlstate":null,"protocol_version":null,"thread_id":null,"warning_count":null}]},{"file":"\/home\/strea334\/public_html\/Sources\/Packages.php","line":928,"function":"smf_db_query","args":["","\n\t\tSELECT version, themes_installed, db_changes\n\t\tFROM smf_log_packages\n\t\tWHERE package_id = 'SychO:forum_width_setting'\n\t\t\tAND install_state != 0\n\t\tORDER BY time_installed DESC\n\t\tLIMIT 1",{"not_installed":0,"current_package":"SychO:forum_width_setting"}]},{"file":"\/home\/strea334\/public_html\/Sources\/Subs.php","line":6042,"function":"PackageInstall","args":[]},{"file":"\/home\/strea334\/public_html\/Sources\/Packages.php","line":91,"function":"call_helper","args":["PackageInstall"]},{"file":"\/home\/strea334\/public_html\/Sources\/Admin.php","line":501,"function":"Packages","args":[]},{"file":"\/home\/strea334\/public_html\/index.php","line":184,"function":"AdminMain","args":[]}]" } } } [7]=> array(4) { ["file"]=> string(52) "/home/strea334/public_html/Sources/Subs-Db-mysql.php" ["line"]=> int(590) ["function"]=> string(9) "log_error" ["args"]=> array(4) { [0]=> string(42) "Database Error: MySQL server has gone away" [1]=> &string(8) "database" [2]=> string(47) "/home/strea334/public_html/Sources/Packages.php" [3]=> int(928) } } [8]=> array(4) { ["file"]=> string(52) "/home/strea334/public_html/Sources/Subs-Db-mysql.php" ["line"]=> int(494) ["function"]=> string(12) "smf_db_error" ["args"]=> array(2) { [0]=> string(187) " SELECT version, themes_installed, db_changes FROM smf_log_packages WHERE package_id = 'SychO:forum_width_setting' AND install_state != 0 ORDER BY time_installed DESC LIMIT 1" [1]=> object(mysqli)#1 (18) { ["affected_rows"]=> int(-1) ["client_info"]=> string(14) "mysqlnd 7.4.33" ["client_version"]=> int(70433) ["connect_errno"]=> int(0) ["connect_error"]=> NULL ["errno"]=> int(2006) ["error"]=> string(26) "MySQL server has gone away" ["error_list"]=> array(2) { [0]=> array(3) { ["errno"]=> int(2006) ["sqlstate"]=> string(5) "HY000" ["error"]=> string(26) "MySQL server has gone away" } [1]=> array(3) { ["errno"]=> int(2006) ["sqlstate"]=> string(5) "HY000" ["error"]=> string(26) "MySQL server has gone away" } } ["field_count"]=> int(1) ["host_info"]=> string(25) "Localhost via UNIX socket" ["info"]=> NULL ["insert_id"]=> int(0) ["server_info"]=> string(29) "5.5.5-10.6.14-MariaDB-cll-lve" ["server_version"]=> int(100614) ["sqlstate"]=> string(5) "HY000" ["protocol_version"]=> int(10) ["thread_id"]=> int(1762952) ["warning_count"]=> int(0) } } } [9]=> array(4) { ["file"]=> string(47) "/home/strea334/public_html/Sources/Packages.php" ["line"]=> int(928) ["function"]=> string(12) "smf_db_query" ["args"]=> array(3) { [0]=> string(0) "" [1]=> string(187) " SELECT version, themes_installed, db_changes FROM smf_log_packages WHERE package_id = 'SychO:forum_width_setting' AND install_state != 0 ORDER BY time_installed DESC LIMIT 1" [2]=> array(2) { ["not_installed"]=> int(0) ["current_package"]=> string(25) "SychO:forum_width_setting" } } } [10]=> array(4) { ["file"]=> string(43) "/home/strea334/public_html/Sources/Subs.php" ["line"]=> int(6042) ["function"]=> string(14) "PackageInstall" ["args"]=> array(0) { } } [11]=> array(4) { ["file"]=> string(47) "/home/strea334/public_html/Sources/Packages.php" ["line"]=> int(91) ["function"]=> string(11) "call_helper" ["args"]=> array(1) { [0]=> string(14) "PackageInstall" } } [12]=> array(4) { ["file"]=> string(44) "/home/strea334/public_html/Sources/Admin.php" ["line"]=> int(501) ["function"]=> string(8) "Packages" ["args"]=> array(0) { } } [13]=> array(4) { ["file"]=> string(36) "/home/strea334/public_html/index.php" ["line"]=> int(184) ["function"]=> string(9) "AdminMain" ["args"]=> array(0) { } } } Error loop.
Then I tried another mod "SoundCloud Embed Widget", and the result:
Warning: mysqli_stmt_bind_param() expects parameter 1 to be mysqli_stmt, bool given in /home/strea334/public_html/Sources/Subs-Db-mysql.php on line 1027
array(14) { [0]=> array(4) { ["file"]=> string(52) "/home/strea334/public_html/Sources/Subs-Db-mysql.php" ["line"]=> int(590) ["function"]=> string(9) "log_error" ["args"]=> array(4) { [0]=> string(42) "Database Error: MySQL server has gone away" [1]=> string(8) "database" [2]=> string(45) "/home/strea334/public_html/Sources/Errors.php" [3]=> int(138) } } [1]=> array(4) { ["file"]=> string(52) "/home/strea334/public_html/Sources/Subs-Db-mysql.php" ["line"]=> int(494) ["function"]=> string(12) "smf_db_error" ["args"]=> array(2) { [0]=> string(44) " SELECT COUNT(*) FROM smf_log_errors" [1]=> object(mysqli)#1 (18) { ["affected_rows"]=> int(-1) ["client_info"]=> string(14) "mysqlnd 7.4.33" ["client_version"]=> int(70433) ["connect_errno"]=> int(0) ["connect_error"]=> NULL ["errno"]=> int(2006) ["error"]=> string(26) "MySQL server has gone away" ["error_list"]=> array(2) { [0]=> array(3) { ["errno"]=> int(2006) ["sqlstate"]=> string(5) "HY000" ["error"]=> string(26) "MySQL server has gone away" } [1]=> array(3) { ["errno"]=> int(2006) ["sqlstate"]=> string(5) "HY000" ["error"]=> string(26) "MySQL server has gone away" } } ["field_count"]=> int(1) ["host_info"]=> string(25) "Localhost via UNIX socket" ["info"]=> NULL ["insert_id"]=> int(0) ["server_info"]=> string(29) "5.5.5-10.6.14-MariaDB-cll-lve" ["server_version"]=> int(100614) ["sqlstate"]=> string(5) "HY000" ["protocol_version"]=> int(10) ["thread_id"]=> int(1765933) ["warning_count"]=> int(0) } } } [2]=> array(4) { ["file"]=> string(45) "/home/strea334/public_html/Sources/Errors.php" ["line"]=> int(138) ["function"]=> string(12) "smf_db_query" ["args"]=> array(3) { [0]=> string(0) "" [1]=> string(44) " SELECT COUNT(*) FROM smf_log_errors" [2]=> array(0) { } } } [3]=> array(4) { ["file"]=> string(45) "/home/strea334/public_html/Sources/Errors.php" ["line"]=> int(301) ["function"]=> string(9) "log_error" ["args"]=> array(4) { [0]=> string(77) "2: mysqli_stmt_bind_param() expects parameter 1 to be mysqli_stmt, bool given" [1]=> string(7) "general" [2]=> string(52) "/home/strea334/public_html/Sources/Subs-Db-mysql.php" [3]=> int(1027) } } [4]=> array(2) { ["function"]=> string(17) "smf_error_handler" ["args"]=> array(5) { [0]=> int(2) [1]=> string(74) "mysqli_stmt_bind_param() expects parameter 1 to be mysqli_stmt, bool given" [2]=> string(52) "/home/strea334/public_html/Sources/Subs-Db-mysql.php" [3]=> int(1027) [4]=> array(4) { ["error_array"]=> array(10) { [0]=> &int(3) [1]=> &int(1690433606) [2]=> &string(8) "0526f8d0" [3]=> &string(77) "?action=admin;area=packages;sa=install2;package=SoundCloudEmbed-v13.zip;pid=0" [4]=> &string(42) "Database Error: MySQL server has gone away" [5]=> &string(32) "a0afdff95d5bdcde424b9b0294ac5e13" [6]=> &string(8) "database" [7]=> &string(47) "/home/strea334/public_html/Sources/Packages.php" [8]=> &int(928) [9]=> &string(1479) "[{"file":"\/home\/strea334\/public_html\/Sources\/Subs-Db-mysql.php","line":494,"function":"smf_db_error","args":["\n\t\tSELECT version, themes_installed, db_changes\n\t\tFROM smf_log_packages\n\t\tWHERE package_id = 'shawnb61:SoundCloudEmbed'\n\t\t\tAND install_state != 0\n\t\tORDER BY time_installed DESC\n\t\tLIMIT 1",{"affected_rows":null,"client_info":null,"client_version":null,"connect_errno":null,"connect_error":null,"errno":null,"error":null,"error_list":null,"field_count":null,"host_info":null,"info":null,"insert_id":null,"server_info":null,"server_version":null,"sqlstate":null,"protocol_version":null,"thread_id":null,"warning_count":null}]},{"file":"\/home\/strea334\/public_html\/Sources\/Packages.php","line":928,"function":"smf_db_query","args":["","\n\t\tSELECT version, themes_installed, db_changes\n\t\tFROM smf_log_packages\n\t\tWHERE package_id = 'shawnb61:SoundCloudEmbed'\n\t\t\tAND install_state != 0\n\t\tORDER BY time_installed DESC\n\t\tLIMIT 1",{"not_installed":0,"current_package":"shawnb61:SoundCloudEmbed"}]},{"file":"\/home\/strea334\/public_html\/Sources\/Subs.php","line":6042,"function":"PackageInstall","args":[]},{"file":"\/home\/strea334\/public_html\/Sources\/Packages.php","line":91,"function":"call_helper","args":["PackageInstall"]},{"file":"\/home\/strea334\/public_html\/Sources\/Admin.php","line":501,"function":"Packages","args":[]},{"file":"\/home\/strea334\/public_html\/index.php","line":184,"function":"AdminMain","args":[]}]" } ["db_prefix"]=> &string(4) "smf_" ["db_connection"]=> &object(mysqli)#1 (18) { ["affected_rows"]=> int(-1) ["client_info"]=> string(14) "mysqlnd 7.4.33" ["client_version"]=> int(70433) ["connect_errno"]=> int(0) ["connect_error"]=> NULL ["errno"]=> int(2006) ["error"]=> string(26) "MySQL server has gone away" ["error_list"]=> array(2) { [0]=> array(3) { ["errno"]=> int(2006) ["sqlstate"]=> string(5) "HY000" ["error"]=> string(26) "MySQL server has gone away" } [1]=> array(3) { ["errno"]=> int(2006) ["sqlstate"]=> string(5) "HY000" ["error"]=> string(26) "MySQL server has gone away" } } ["field_count"]=> int(1) ["host_info"]=> string(25) "Localhost via UNIX socket" ["info"]=> NULL ["insert_id"]=> int(0) ["server_info"]=> string(29) "5.5.5-10.6.14-MariaDB-cll-lve" ["server_version"]=> int(100614) ["sqlstate"]=> string(5) "HY000" ["protocol_version"]=> int(10) ["thread_id"]=> int(1765933) ["warning_count"]=> int(0) } ["mysql_error_data_prep"]=> &bool(false) } } } [5]=> array(4) { ["file"]=> string(52) "/home/strea334/public_html/Sources/Subs-Db-mysql.php" ["line"]=> int(1027) ["function"]=> string(22) "mysqli_stmt_bind_param" ["args"]=> array(12) { [0]=> bool(false) [1]=> string(10) "iissssssis" [2]=> &int(3) [3]=> &int(1690433606) [4]=> &string(8) "0526f8d0" [5]=> &string(77) "?action=admin;area=packages;sa=install2;package=SoundCloudEmbed-v13.zip;pid=0" [6]=> &string(42) "Database Error: MySQL server has gone away" [7]=> &string(32) "a0afdff95d5bdcde424b9b0294ac5e13" [8]=> &string(8) "database" [9]=> &string(47) "/home/strea334/public_html/Sources/Packages.php" [10]=> &int(928) [11]=> &string(1479) "[{"file":"\/home\/strea334\/public_html\/Sources\/Subs-Db-mysql.php","line":494,"function":"smf_db_error","args":["\n\t\tSELECT version, themes_installed, db_changes\n\t\tFROM smf_log_packages\n\t\tWHERE package_id = 'shawnb61:SoundCloudEmbed'\n\t\t\tAND install_state != 0\n\t\tORDER BY time_installed DESC\n\t\tLIMIT 1",{"affected_rows":null,"client_info":null,"client_version":null,"connect_errno":null,"connect_error":null,"errno":null,"error":null,"error_list":null,"field_count":null,"host_info":null,"info":null,"insert_id":null,"server_info":null,"server_version":null,"sqlstate":null,"protocol_version":null,"thread_id":null,"warning_count":null}]},{"file":"\/home\/strea334\/public_html\/Sources\/Packages.php","line":928,"function":"smf_db_query","args":["","\n\t\tSELECT version, themes_installed, db_changes\n\t\tFROM smf_log_packages\n\t\tWHERE package_id = 'shawnb61:SoundCloudEmbed'\n\t\t\tAND install_state != 0\n\t\tORDER BY time_installed DESC\n\t\tLIMIT 1",{"not_installed":0,"current_package":"shawnb61:SoundCloudEmbed"}]},{"file":"\/home\/strea334\/public_html\/Sources\/Subs.php","line":6042,"function":"PackageInstall","args":[]},{"file":"\/home\/strea334\/public_html\/Sources\/Packages.php","line":91,"function":"call_helper","args":["PackageInstall"]},{"file":"\/home\/strea334\/public_html\/Sources\/Admin.php","line":501,"function":"Packages","args":[]},{"file":"\/home\/strea334\/public_html\/index.php","line":184,"function":"AdminMain","args":[]}]" } } [6]=> array(4) { ["file"]=> string(45) "/home/strea334/public_html/Sources/Errors.php" ["line"]=> int(129) ["function"]=> string(19) "smf_db_error_insert" ["args"]=> array(1) { [0]=> array(10) { [0]=> &int(3) [1]=> &int(1690433606) [2]=> &string(8) "0526f8d0" [3]=> &string(77) "?action=admin;area=packages;sa=install2;package=SoundCloudEmbed-v13.zip;pid=0" [4]=> &string(42) "Database Error: MySQL server has gone away" [5]=> &string(32) "a0afdff95d5bdcde424b9b0294ac5e13" [6]=> &string(8) "database" [7]=> &string(47) "/home/strea334/public_html/Sources/Packages.php" [8]=> &int(928) [9]=> &string(1479) "[{"file":"\/home\/strea334\/public_html\/Sources\/Subs-Db-mysql.php","line":494,"function":"smf_db_error","args":["\n\t\tSELECT version, themes_installed, db_changes\n\t\tFROM smf_log_packages\n\t\tWHERE package_id = 'shawnb61:SoundCloudEmbed'\n\t\t\tAND install_state != 0\n\t\tORDER BY time_installed DESC\n\t\tLIMIT 1",{"affected_rows":null,"client_info":null,"client_version":null,"connect_errno":null,"connect_error":null,"errno":null,"error":null,"error_list":null,"field_count":null,"host_info":null,"info":null,"insert_id":null,"server_info":null,"server_version":null,"sqlstate":null,"protocol_version":null,"thread_id":null,"warning_count":null}]},{"file":"\/home\/strea334\/public_html\/Sources\/Packages.php","line":928,"function":"smf_db_query","args":["","\n\t\tSELECT version, themes_installed, db_changes\n\t\tFROM smf_log_packages\n\t\tWHERE package_id = 'shawnb61:SoundCloudEmbed'\n\t\t\tAND install_state != 0\n\t\tORDER BY time_installed DESC\n\t\tLIMIT 1",{"not_installed":0,"current_package":"shawnb61:SoundCloudEmbed"}]},{"file":"\/home\/strea334\/public_html\/Sources\/Subs.php","line":6042,"function":"PackageInstall","args":[]},{"file":"\/home\/strea334\/public_html\/Sources\/Packages.php","line":91,"function":"call_helper","args":["PackageInstall"]},{"file":"\/home\/strea334\/public_html\/Sources\/Admin.php","line":501,"function":"Packages","args":[]},{"file":"\/home\/strea334\/public_html\/index.php","line":184,"function":"AdminMain","args":[]}]" } } } [7]=> array(4) { ["file"]=> string(52) "/home/strea334/public_html/Sources/Subs-Db-mysql.php" ["line"]=> int(590) ["function"]=> string(9) "log_error" ["args"]=> array(4) { [0]=> string(42) "Database Error: MySQL server has gone away" [1]=> &string(8) "database" [2]=> string(47) "/home/strea334/public_html/Sources/Packages.php" [3]=> int(928) } } [8]=> array(4) { ["file"]=> string(52) "/home/strea334/public_html/Sources/Subs-Db-mysql.php" ["line"]=> int(494) ["function"]=> string(12) "smf_db_error" ["args"]=> array(2) { [0]=> string(186) " SELECT version, themes_installed, db_changes FROM smf_log_packages WHERE package_id = 'shawnb61:SoundCloudEmbed' AND install_state != 0 ORDER BY time_installed DESC LIMIT 1" [1]=> object(mysqli)#1 (18) { ["affected_rows"]=> int(-1) ["client_info"]=> string(14) "mysqlnd 7.4.33" ["client_version"]=> int(70433) ["connect_errno"]=> int(0) ["connect_error"]=> NULL ["errno"]=> int(2006) ["error"]=> string(26) "MySQL server has gone away" ["error_list"]=> array(2) { [0]=> array(3) { ["errno"]=> int(2006) ["sqlstate"]=> string(5) "HY000" ["error"]=> string(26) "MySQL server has gone away" } [1]=> array(3) { ["errno"]=> int(2006) ["sqlstate"]=> string(5) "HY000" ["error"]=> string(26) "MySQL server has gone away" } } ["field_count"]=> int(1) ["host_info"]=> string(25) "Localhost via UNIX socket" ["info"]=> NULL ["insert_id"]=> int(0) ["server_info"]=> string(29) "5.5.5-10.6.14-MariaDB-cll-lve" ["server_version"]=> int(100614) ["sqlstate"]=> string(5) "HY000" ["protocol_version"]=> int(10) ["thread_id"]=> int(1765933) ["warning_count"]=> int(0) } } } [9]=> array(4) { ["file"]=> string(47) "/home/strea334/public_html/Sources/Packages.php" ["line"]=> int(928) ["function"]=> string(12) "smf_db_query" ["args"]=> array(3) { [0]=> string(0) "" [1]=> string(186) " SELECT version, themes_installed, db_changes FROM smf_log_packages WHERE package_id = 'shawnb61:SoundCloudEmbed' AND install_state != 0 ORDER BY time_installed DESC LIMIT 1" [2]=> array(2) { ["not_installed"]=> int(0) ["current_package"]=> string(24) "shawnb61:SoundCloudEmbed" } } } [10]=> array(4) { ["file"]=> string(43) "/home/strea334/public_html/Sources/Subs.php" ["line"]=> int(6042) ["function"]=> string(14) "PackageInstall" ["args"]=> array(0) { } } [11]=> array(4) { ["file"]=> string(47) "/home/strea334/public_html/Sources/Packages.php" ["line"]=> int(91) ["function"]=> string(11) "call_helper" ["args"]=> array(1) { [0]=> string(14) "PackageInstall" } } [12]=> array(4) { ["file"]=> string(44) "/home/strea334/public_html/Sources/Admin.php" ["line"]=> int(501) ["function"]=> string(8) "Packages" ["args"]=> array(0) { } } [13]=> array(4) { ["file"]=> string(36) "/home/strea334/public_html/index.php" ["line"]=> int(184) ["function"]=> string(9) "AdminMain" ["args"]=> array(0) { } } } Error loop.

hustreamload

aaah...another bug: search is not working....

The DB error shown in forum:
Table 'strea334_wp618.smf_log_floodcontrol' doesn't exist
Fájl: /home/strea334/public_html/Sources/Security.php
Sor: 1199

DELETE FROM smf_log_floodcontrol
WHERE log_time < 1690435602
AND log_type = 'search'

Log error:
a0afdff95d5bdcde424b9b0294ac5e13
 https://www.streamloadforum.com/index.php?action=search2
 /home/strea334/public_html/Sources/Security.php (Line 1199) 

Backtrace information:
Error
Type of error
Database
Error message
Adatbázis hiba: Table 'strea334_wp618.smf_log_floodcontrol' doesn't exist
File
/home/strea334/public_html/Sources/Security.php
Line
1199
URL of page causing the error
https://www.streamloadforum.com/index.php?action=search2
Backtrace information
#0: smf_db_error()
Called from /home/strea334/public_html/Sources/Subs-Db-mysql.php on line 494
#1: smf_db_query()
Called from /home/strea334/public_html/Sources/Security.php on line 1199
#2: spamProtection()
Called from /home/strea334/public_html/Sources/Search.php on line 1041
#3: PlushSearch2()
Called from /home/strea334/public_html/index.php on line 184
Browser ID: chrome (is_chrome, is_webkit)
Templates: 4: index (default), Admin (default), GenericMenu (default), Errors (default).
Sub templates: 2: init, show_backtrace.
Language files: 5: EzPortal.english (default), index+Modifications.english (default), Admin.english (default), ManageMaintenance.english (default), HIFG/.english (default).
Style sheets: 4: index.css, jquery.custom-scrollbar.css, admin.css, responsive.css.
Hooks called: 318 (show)
Files included: 41 - 1588KB. (show)
Memory used: 6963KB.
Tokens: post-admin-login, post-admin-maint, post-admin-el, post-profile-ac3.
Queries used: 15.

[Show Queries]

Kindred

And does the log_floodcontrol table exist in your database?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

hustreamload

No, it doesn't. How to create it? Or may I rename backup file, because this one exists?

hustreamload

Ok, after 7 days I gave it up, and restored the 2.0.19 version. New db problems appeared:
- the original was the mod install unavailability
- after that came the search problem
- today many members called me, that they cannot login because of a db problem

I would be glad if you explain me, how to make a second forum with the same data content on www.myaccount/pilot, and i reproduce this upgrade again, with less bug (I think I've "upgraded" the db 10 times minimum in these days, the data loss and plus problems appeared after that)

Thanks guys for your help!

Kindred

You have something very wrong with your system....

your database tables are missing columns and now it appears that you are missing entire tables.

I have run and upgraded more than a dozen systems now and I have never seen a system do what yours is doing. :o

If you are willing to PM me full access to your server (cpanel login info and forum login info) I will try to take a look this weekend.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

shawnb61

Yes, entire tables just flat out disappearing is a problem with your DB &/or your host.  Possibly a corrupted backup that you restored from.

Regarding the initial error where you cannot install mods, this old thread might help:
Quote from: -Rock Lee- on July 27, 2023, 11:03:37 AM@shawnb61 Look https://www.simplemachines.org/community/index.php?msg=4121949 some mods produce that error, I don't know why... I think it doesn't manage to analyze it well.

Based on Rock Lee's note above, the next thing I'd suggest is disabling *both* of the backup options under Package Manger | Options.

Then try installing the mod again.

A question worth asking is born in experience & driven by necessity. - Fripp

shawnb61

I wanted to followup on this, to share what I have found, in case we see this again.

Based on @-Rock Lee- 's input above, I was able to reproduce the issue.  Steps:
 - Select both backup options under Package Manager | Options
 - Put a bunch of huge files under /Sources & /Themes - I put a few GB of backups there.  (Not too much or it will blow up on memory allocation...  Just enough to slow it down...)
 - Set the MySQL wait_timeout to a low value, e.g., 60 sec

Similar stack trace & errors.

So what I think is happening is that it takes so long to do the backup, MySQL goes away.  When the process resumes, it tries to make DB updates, which fail, since the DB is gone.  Then it tries to log the error, which also fails, since the DB is gone.  Rinse & repeat.

Note these issues will repeat until /Sources & /Themes are cleaned up, or, the backup option is disabled. 

I.e., you can refresh files, uninstall mods, revert package updates, etc., all you want, and the behavior won't change, as seen above...

If we see this again, I'd like to know:
 - Which backup options were selected?
 - Does disabling backups fix the issue?
 - How big are the latest backups under /Packages/backups?
 - Are there large files in /Sources & /Themes?  What & why?
 - What is the value of MySQL's wait_timeout?
A question worth asking is born in experience & driven by necessity. - Fripp

hustreamload

shawwnb61, Kindred, thanks again for your help!

As I wrote before, I have to make a pilot for this upgrade, where all the bugs can be reproduced. Can you help me in this first step as well?

So how can I make a second forum with the same data content on the same server?

Doug Heffernan

Quote from: hustreamload on August 06, 2023, 11:53:52 PMSo how can I make a second forum with the same data content on the same server?

Do you mean to make a duplication of your main forum in a test folder/other subdomain? If that is the case, upload the forum folder to your pc and then reupload it to the folder where you want the test forum to be at, then create a new database and restore there a backup of your main forum 's database and as last but certainly not least, run the repair_settings tool to straighten all paths and urs of the test forum and you should be all set.

hustreamload

Quote from: Kindred on July 28, 2023, 10:19:56 AMYou have something very wrong with your system....

your database tables are missing columns and now it appears that you are missing entire tables.

I have run and upgraded more than a dozen systems now and I have never seen a system do what yours is doing. :o

If you are willing to PM me full access to your server (cpanel login info and forum login info) I will try to take a look this weekend.

Thanks Kindred, I sent a pm

hustreamload

Quote from: shawnb61 on August 06, 2023, 08:21:56 PMI wanted to followup on this, to share what I have found, in case we see this again.

Based on @-Rock Lee- 's input above, I was able to reproduce the issue.  Steps:
 - Select both backup options under Package Manager | Options
 - Put a bunch of huge files under /Sources & /Themes - I put a few GB of backups there.  (Not too much or it will blow up on memory allocation...  Just enough to slow it down...)
 - Set the MySQL wait_timeout to a low value, e.g., 60 sec

Similar stack trace & errors.

So what I think is happening is that it takes so long to do the backup, MySQL goes away.  When the process resumes, it tries to make DB updates, which fail, since the DB is gone.  Then it tries to log the error, which also fails, since the DB is gone.  Rinse & repeat.

Note these issues will repeat until /Sources & /Themes are cleaned up, or, the backup option is disabled. 

I.e., you can refresh files, uninstall mods, revert package updates, etc., all you want, and the behavior won't change, as seen above...

If we see this again, I'd like to know:
 - Which backup options were selected?
 - Does disabling backups fix the issue?
 - How big are the latest backups under /Packages/backups?
 - Are there large files in /Sources & /Themes?  What & why?
 - What is the value of MySQL's wait_timeout?


I made a pilot forum, where I could reproduce the main error:   
http://streamloadforum.com/pilot

In few words the situation:
- I deleted all the mods from the 2.0.19 forum's db, and deleted the hooks as well
- I deleted the Sources and Themes dir as well
- after that I upgraded on 2.1.4
- Tinyportal installation sucseeded
- any other mod failed
- find and repair any errors failed as well
- with smf_db_compare.php and your scripts the missing tables are made up

Questions:
1. Where can I Set the MySQL wait_timeout "to a low value"?

Answers/questions on your questions:
 - Which backup options were selected? Where should I select this option?
 - Does disabling backups fix the issue? Where should I select this option?
 - How big are the latest backups under /Packages/backups? cca 40 MB
 - Are there large files in /Sources & /Themes?  What & why? It was deeted before upgrade so only the normal files are in it
 - What is the value of MySQL's wait_timeout? se my question above

Thanks!

Advertisement: