Please help us to make AbanteCart Ideal Open Source Ecommerce Solution for everyone.

Support AbanteCart eCommerce

Author Topic: Backup fails on step 2, succeeds step 1 and step 3. ???  (Read 6726 times)

Offline Geoffrey

  • Full Member
  • ***
  • Posts: 153
  • Karma: +28/-3
    • View Profile
Backup fails on step 2, succeeds step 1 and step 3. ???
« on: June 17, 2017, 01:22:51 AM »
Backup failure message:

Task Failed

Step 1: success
Task_id: 10 : step_id: 20. 122 tables dumped.

Step 2 - failed. (Connection error occurred. (
Notice: Undefined index: exception_msg in C:\xampp\htdocs\mywebsite\static_pages\index.php on line 71
 
There has been a critical error processing your request
Please check AbanteCart and webserver error logs for more details. You can check error log in the control panel if it is functional. Otherwise, refer to error log located on your web server

Step 3: success
Task_id: 10 : step_id: 22. ( backup content files )


Abantecart error from log (repeated):

2017-06-17 6:10:36 - warning: AbanteCart core v.1.2.10 Error while sending QUERY packet. PID=8024 in <b>C:\xampp\htdocs\inspired-designco\core\database\amysqli.php</b> on line <b>74</b>
2017-06-17 6:10:36 - database error: AbanteCart core v.1.2.10 SQL Error: MySQL server has gone away
Error No: 2006
SQL: UPDATE idco_task_steps
SET status = '5'
WHERE step_id = 21 in <b>C:\xampp\htdocs\inspired-designco\core\database\amysqli.php</b> on line <b>109</b>

Apache errors from log (repeated):

[Fri Jun 16 21:10:36.309581 2017] [:error] [pid 8024:tid 1944] [client 127.0.0.1:56508] PHP Notice:  Undefined index: exception_msg in C:\\xampp\\htdocs\\mywebsite\\static_pages\\index.php on line 71, referer: http://mywebsite.com/index.php?rt=tool/backup&s=17id_admin&token=lots ofnumbersandletterstoken

mysql errors from log - no errors from backup timespan. 


Soo, this is all Basque to me.  Can anyone suggest steps to resolve? 

Thanks!

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2048
  • Karma: +319/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: Backup fails on step 2, succeeds step 1 and step 3. ???
« Reply #1 on: June 19, 2017, 03:31:30 AM »
hello.
Looks like you database is too big.
I think you should to backup manually  via phpMyAdmin.
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

Offline Geoffrey

  • Full Member
  • ***
  • Posts: 153
  • Karma: +28/-3
    • View Profile
Re: Backup fails on step 2, succeeds step 1 and step 3. ???
« Reply #2 on: June 19, 2017, 01:46:28 PM »
Hi, thanks for the reply.

This is interesting because my site is xampp-only, new, and small.

There are no customers and no order history. 

It only has 8 extensions installed, and a total of 18 products. 

According to phpmyadmin, the database has 122 tables with a total size of 1.9MB. 

The total size of my /root/resources folder is 25MB. 

If I'm not mistaken, it seems unlikely that "database too big" is the cause of the problem. 

I'll do some research on how to backup manually,
but I would be grateful if you folks could investigate further and suggest other possible solutions. 

I would much prefer to use the system backup capabilities that are built into AC. 

Thanks.

Offline Geoffrey

  • Full Member
  • ***
  • Posts: 153
  • Karma: +28/-3
    • View Profile
Re: Backup fails on step 2, succeeds step 1 and step 3. ???
« Reply #3 on: June 20, 2017, 11:10:27 AM »
Hi, can anyone help with this?

Is backup a functioning utility, or is everyone using manual backup, or ??

Thanks.

Offline Geoffrey

  • Full Member
  • ***
  • Posts: 153
  • Karma: +28/-3
    • View Profile
Re: Backup fails on step 2, succeeds step 1 and step 3. ???
« Reply #4 on: June 22, 2017, 09:40:20 AM »
When a question receives no answer, does it mean that the question was too dumb to acknowledge, or that the question was so challenging that no one knows the answer? 

I need to know this so that in the future, I will know how to interpret silence. 

Thanks!

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2048
  • Karma: +319/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: Backup fails on step 2, succeeds step 1 and step 3. ???
« Reply #5 on: June 23, 2017, 03:37:31 AM »
hi
SQL Error: MySQL server has gone away
Error No: 2006
Usually this error means that you have low database connection timeout.
Try to play with wait_timeout value in the file public_html/core/database/amysqli.php. (see line 58)

Also you can read this answers
https://stackoverflow.com/questions/14726789/how-can-i-change-the-default-mysql-connection-timeout-when-connecting-through-py

“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

Offline Geoffrey

  • Full Member
  • ***
  • Posts: 153
  • Karma: +28/-3
    • View Profile
Re: Backup fails on step 2, succeeds step 1 and step 3. ???
« Reply #6 on: June 23, 2017, 09:10:50 PM »
Thanks. 

I bumped wait_timeout to 180, then 360.  No change.

After reading more stackoverflow, I added similar connect_timeout and interactive_timeout values to amysqli.php, so i ended up looking like this:

      $connection->query("SET session connect_timeout=720;");
      $connection->query("SET session wait_timeout=720;");
      $connection->query("SET session interactive_timeout=720;");

Stackoverflow also led me to make more changes to php.ini.

I already had these settings:
max_execution_time=18000
max_input_time - 1200
memory_limit - 512M

I made these changes:
Uncomment two lines and increase values:
realpath_cache_size = 128k
realpath_cache_ttl = 1800
(I have no idea why these were commented out, but they never interfered with prior dev or backup of other CMS sites.)

Also:
default_socket_timeout=300
mysql.connect_timeout=300 -- on line 1199
mysql.connect_timeout=300 -- on line 2062
I don't know why there are two instances of the latter element.

I rebooted the virtual server and ran a backup.  It successfully finished all 3 steps in approx 3 minutes. 

Comments;
1 - The large time values, mem_limits and cache-sizes above are all recent changes I implemented after reading about how to make Abantecart run seamlessly.  Prior to my recent AC adventure, I never paid any attention to any of these values other than execution_time and memory_limit, and those two values were set much lower than what is recommended for AC.  So, if you have prior experience with other CMS apps, and are new to AC, you should anticipate making some changes like those described above. 

2 - The backup finished very quickly.  This suggests that the new amysqli timeouts or the uncommented caches or the slightly expanded php.ini timeouts were the solution.  I plan to reduce some of the values above back towards more conventional values. 

Thanks. 

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5807
  • Karma: +274/-2
    • View Profile
Re: Backup fails on step 2, succeeds step 1 and step 3. ???
« Reply #7 on: June 26, 2017, 01:40:03 AM »
Thank you, Geoffrey for solution posted. This will help others

Offline Geoffrey

  • Full Member
  • ***
  • Posts: 153
  • Karma: +28/-3
    • View Profile
Re: Backup fails on step 2, succeeds step 1 and step 3. ???
« Reply #8 on: June 26, 2017, 04:28:20 PM »
Thank you Basara and abolabo. 

I hope so...


 

Powered by SMFPacks Social Login Mod