You are here:  » product sql keep on crashing/ disappearing in DB

Active Forum Topics

product sql keep on crashing/ disappearing in DB

Submitted by safari45 on Tue, 2021-10-26 06:30 in

Hello David, Hope everthing is well. After every cronjob my website is left empty with no products. After database inspection 'product table' is no where to be found in the database. It has crashed and disappeared in the database. Is there a solution to this problem.

Submitted by support on Tue, 2021-10-26 07:32


Please could you check that cron is not accidentally set-up to run either twice at the same time; or more likely overlapping. For example, although in most cases cron.php is only scheduled to run once a day (e.g. 4AM), some people use a higher frequency where prices change more often than daily.

If for example, cron.php is scheduled to run every hour, but it actually takes 1.5 hours to run, then it would overlap and that could leave the products table dropped because of how the zero down-time import process works (products are imported into temporary table whilst site is unaffected, then at the end of the process the old products table is dropped and the temporary table becomes the new main products tables).

That might be all it is; if that's not the case let me know and I'll check it out further with you...


Submitted by safari45 on Tue, 2021-10-26 10:19

All my cronjobs are set to run once a week. This might not be the case if I only update my products once a week. I believe some recent modifications might have been the cause but I don't know where to look for the issue. If you have any ideas, that will be greatly appreciated.

Submitted by safari45 on Tue, 2021-10-26 10:25

The process of importing into a temporary product table does happen but it seems the old get dropped but a new table is not created. both temporary and old products table disappear without a new table being created.

Submitted by support on Tue, 2021-10-26 10:29

Hello Safari,

Please could you check the end of scripts/cron.php where you should see this code which performs the drop / rename...

  $sql = "DROP TABLE `".$config_databaseTablePrefix."products`";
  $sql = "RENAME TABLE `".$config_databaseTablePrefix."products_import` TO `".$config_databaseTablePrefix."products`";