Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2006
    Location
    Atlanta, GA
    Posts
    118
    Plugin Contributions
    0

    Default How is it possible for seo_cache database tables to disappear?

    Twice now I have had seo_cache table disappear, which breaks the catalog. In neither case did I make any database or file changes between when it was working and when it stopped working. There are no other known issues with the database. Any ideas on how this could happen?

    This references an issue similar to
    http://www.zen-cart.com/showthread.p...imate-SEO-URLs
    However, in that thread this issue is more that the table gets named improperly.
    http://www.divinelighting.com -- Super Orders 3.0 -- Ultimate SEO -- Quantity Discounts -- SitemapXML -- Image Handler -- Shipworks

  2. #2
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: How is it possible for database tables to disappear?

    Quote Originally Posted by divinelighting View Post
    Twice now I have had seo_cache table disappear, which breaks the catalog. In neither case did I make any database or file changes between when it was working and when it stopped working. There are no other known issues with the database. Any ideas on how this could happen?
    A check is done for each request to the store to see if the plugin is properly installed (and does not currently include a check for the "seo_cache" table). If the plugin detects something is broken, it attempts (among other things) to remove and re-install the "seo_cache" table. The only way the re-install is triggered is if the plugin settings have not been installed or accessing the database fails (intermittent connect, read, or write issues).

    The "seo_cache" table can disappear if for some reason on your host the script stops running during this process (hosting issue), your user does not have permission to create tables (database permissions issue), or your database becomes unavailable during the uninstall / install process (hosting issue).

    As a stop gap, you can disable removal and creation of "TABLE_SEO_CACHE" in seo.install.php. Intermittent database access issues may cause you other problems down the road - and the default settings for your plugin will be used instead of your configured ones when these are encountered. But at least the "seo_cache" table should not disappear.
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

  3. #3
    Join Date
    Jun 2006
    Location
    Atlanta, GA
    Posts
    118
    Plugin Contributions
    0

    Default Re: How is it possible for database tables to disappear?

    Thanks lhungil for that wisdom. I have nightly directadmin backups where presumably there are moments of database inaccessibility. Should I be taking other safeguards during the backup process?
    http://www.divinelighting.com -- Super Orders 3.0 -- Ultimate SEO -- Quantity Discounts -- SitemapXML -- Image Handler -- Shipworks

  4. #4
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: How is it possible for database tables to disappear?

    I have never used directadmin, so not sure if there is an impact there.

    I do know there are applications one can use to perform "hot" or at least "warm" backups of MySQL databases. A few off the top of my head are (not an exhaustive list):
    • Commercial Offerings from Oracle (Enterprise MySQL).
    • Percona XtraBackup. Free with commercial support.
    • Replication partner. Set up a database slave and run the backups against the slave.
    • Filesystems supporting snapshots (such as LVM2). Flush db + snapshot + mysqlhotcopy (works on MyISAM tables - the default engine used in most Zen Cart installations).


    Additionally, if you are using a hosting company, most keep backups of the database for you. You may want to check.

    If your db user has full permission to the database, in the short term, you can get away with commenting out the lines to install / uninstall the 'seo_cache' table once the table has been created. If the problem is a temporary db loss, you might have one or two requests generate errors, but at least you would not have the whole site become broken.
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

  5. #5
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: How is it possible for database tables to disappear?

    Also see this post if you are using Zen cart 1.3 in a newer hosting environment (MySQL >= 5.1). Thanks to divinelighting for the reminder.

    This specific change does not apply to newer versions of "Ultimate SEO URLs" on Zen Cart 1.5.
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

 

 

Similar Threads

  1. v139h 1062 Duplicate entry for key 1 in table seo_cache
    By dmagic in forum General Questions
    Replies: 1
    Last Post: 8 Jul 2013, 04:54 AM
  2. How many Tables in Standard Zen Cart Database?
    By KlingstedtBrothers in forum General Questions
    Replies: 3
    Last Post: 2 Mar 2011, 11:57 PM
  3. Create Database, Tables and Drop Database or Tables
    By elwood cordery in forum General Questions
    Replies: 3
    Last Post: 17 Aug 2009, 04:03 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR