Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2008
    Posts
    627
    Plugin Contributions
    0

    Default crashed database, missing products on storefront and admin

    Hi

    zen cart 1.5.4, php 5.6.15

    This cart crashed again yesterday which is the second time in the past couple of months. I have repaired the tables that crashed, zen_whos_online and zen_sessions. Repairing these tables brought the cart back online but there are no products in the admin categories and no products on the storefront. The storefront categories shows "There are no products to list in this category". There are no new error logs being generated.

    I tried repairing the tables; zen_products, zen_categories, zen_products_to_categories but that did not help. zen_products have the products_id. zen_categories have the categories_id. zen_products_to_categories have both products_id and categories_id. I thought I'd come and ask if anyone has suggestions.

    Since it's the zen_whos_online and zen_sessions tables that crashed could it be possible that too much traffic (IE: spiders/bots) that causes this?

    Thanks for any input.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,350
    Blog Entries
    7
    Plugin Contributions
    271

    Default Re: crashed database, missing products on storefront and admin

    You have 2 issues:

    a) why those 2 tables are crashing regularly
    b) the data that's suddenly missing


    First ... why are the tables crashing? Tables usually only "crash" when the server's own database engine is wonky ... perhaps the server is over-busy and is somehow not closing files properly when doing otherwise normal operations. Or maybe the hosting company's doing something to MySQL to have it restart MySQL intermittently, which could cause tables to crash if they're open when MySQL is reset.

    If your server is becoming increasingly unreliable, you could change those 2 tables to use InnoDB instead of MyISAM as the database-type.

    But beware: if the hosting company hasn't learned how to properly configure InnoDB (and has left its settings as the defaults, which is what I see most "shared hosting" hosts do) then the tables using InnoDB will perform especially poorly. So, beware of that. There are a million articles online on how to tune a database for best performance, so your hosting company can find and use those if they need to learn (there's nothing *you* can do, unless you possess the "root" password, and in that case then it's you who will be doing the learning).

    That said, there are some performance improvements built-in to v1.5.5 that help prevent some possible problems with the sessions table.

    But, the tables shouldn't be crashing. And since they are, and regularly, that makes me suspicious of your server generally.


    b) data missing -- given that you're saying that you can login to your Admin fine, but you don't see any products or categories, the first thing to look at is whether the configure.php file has a DB_PREFIX setting that matches the tables in which you say your data is present. (ie: if your tables in which you say your data *does* exist all start with "zen_" then your 2 configure.php files need to have a DB_PREFIX of 'zen_' to match. If the DB_PREFIX is blank (ie: '', which is also the normal default on new installs) then ZC will be looking in the "products" table instead of "zen_products".

    Do you have trusted regular backups of your database?

    Additionally, have you done a repair on all the other tables too?

    If the data is present in all the tables (let us know about other tables, like "customers", etc too), but is not showing in your Admin or your Store, then you'll need to do some advanced things like write some test code to have PHP try reading records from the database and report back what it gets ... to test multiple tables, various segments of the database, to narrow down the cause of the problem. Definitely not a fun exercise, and will require some patience to determine what's gotten broken in the process of whatever accidents your server is encountering to corrupt your data.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Jun 2008
    Posts
    627
    Plugin Contributions
    0

    Default Re: crashed database, missing products on storefront and admin

    Thank you for taking the time for your input. Since I posted, the host restored the site and the site owner has decided to move to a new host. Over the years godaddy has been mentioned as a host who's servers are not friendly with zen cart. Does this still apply?

  4. #4
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,762
    Plugin Contributions
    9

    Default Re: crashed database, missing products on storefront and admin

    Over the years godaddy has been mentioned as a host who's servers are not friendly with zen cart. Does this still apply?
    They have been a bit more compliant to ZenCart in recent history but they are still a mass marketed host.
    They load their servers with too many accounts which causes issues - but they are cheap and are great at upselling their clients to more costly services when issues arise
    Zen-Venom Get Bitten

  5. #5
    Join Date
    Jun 2008
    Posts
    627
    Plugin Contributions
    0

    Default Re: crashed database, missing products on storefront and admin

    DrByte, I appreciate your detailed response. You mentioned

    " Tables usually only "crash" when the server's own database engine is wonky "


    My question; Is there any way in which something about a store front/admin could cause a database to crash and tables need repairing?

  6. #6
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,427
    Plugin Contributions
    11

    Default Re: crashed database, missing products on storefront and admin

    Quote Originally Posted by buildingblocks View Post
    My question; Is there any way in which something about a store front/admin could cause a database to crash and tables need repairing?
    given the fact that we do not regularly see databases and tables "crashing" in these forums, i'm going to go with no.

    i have seen issues related to the sessions table, but the resolution to that problem tends to be on the server configuration side as opposed to anything ZC is doing. and it certainly does not explain the missing data you have experienced.

    best,
    mxWorks now has premium plugins
    are you using square? have you shown any appreciation with cake on venmo or on paypal?
    called the savior by the chief bottle washer...

  7. #7
    Join Date
    Jun 2008
    Posts
    627
    Plugin Contributions
    0

    Default Re: crashed database, missing products on storefront and admin

    thanks carlwhat :)

 

 

Similar Threads

  1. Replies: 1
    Last Post: 29 May 2012, 04:27 PM
  2. Replies: 11
    Last Post: 19 Sep 2009, 06:56 PM
  3. Admin log in (and storefront) in constant loop
    By ablgoose in forum Installing on a Linux/Unix Server
    Replies: 17
    Last Post: 6 Sep 2008, 12:26 AM
  4. Clicking an order leaves admin and goes to Storefront
    By Tapper in forum Managing Customers and Orders
    Replies: 1
    Last Post: 9 Jan 2008, 04:04 PM
  5. have managed to botch the page title in both admin and storefront
    By schwimwastaken in forum General Questions
    Replies: 1
    Last Post: 4 Jul 2007, 04:08 AM

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