Thread: Crashing Tables

Results 1 to 8 of 8
  1. #1
    Join Date
    Jun 2007
    Posts
    474
    Plugin Contributions
    2

    Default Crashing Tables

    On all of my sites (and one more often than the others), I get crashed sites due to specific database tables seizing up at least once a week.

    75% of the time it is the table sessions
    25% of the time it is the table whos_online

    It is becoming enough of an issue that I can no longer overlook it.

    Is this the type of thing that can be traced back to a source, or are there too many things acting on those tables to figure out the cause?

  2. #2
    Join Date
    Jun 2007
    Posts
    474
    Plugin Contributions
    2

    Default Re: Crashing Tables

    In this thread, https://www.zen-cart.com/showthread....keeps-crashing data_digger suggested converting the table to InnoDB.

    Any reason I shouldn't do that?

  3. #3
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Crashing Tables

    Didn't clearly identify what was meant by the tables "crashing out". Are there error logs generated in the logs folder?

    There was an issue identified in ZC 1.5.4 related to the handling of sessions (corrected in ZC 1.5.5 and at the following post for 1.5.4): https://www.zen-cart.com/showthread....12#post1273512

    Not sure if the above relates or not or if the patch has been applied.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #4
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Crashing Tables

    Quote Originally Posted by lindasdd View Post
    In this thread, https://www.zen-cart.com/showthread....keeps-crashing data_digger suggested converting the table to InnoDB.

    Any reason I shouldn't do that?
    Backup the database before doing it. If that doesn't seem to fix it, then could either change it back or restore the database...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #5
    Join Date
    Jun 2007
    Posts
    474
    Plugin Contributions
    2

    Default Re: Crashing Tables

    I have dug into this a little more on the server level with my hosting company. There does seem to be a RAM overload occurring (not totally definitive since it is difficult to replicate the issue) since I also am getting MySQL limit messages prior to the tables corrupting.

    Something I find interesting is the site is having this issue more often since I upgraded from 1.5.5e to 1.5.5f. It is possible that is related to a screwed up upgrade, except it was a fairly minor upgrade.

    I am wondering if the changes made to includes/classes/db/mysql/query_factory.php , the "Use this form of the Execute method to ensure that any SELECT result is pulled from the database, bypassing the cache." are causing the MYSQL queries to become significantly more intensive.

  6. #6
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Crashing Tables

    Quote Originally Posted by lindasdd View Post
    I have dug into this a little more on the server level with my hosting company. There does seem to be a RAM overload occurring (not totally definitive since it is difficult to replicate the issue) since I also am getting MySQL limit messages prior to the tables corrupting.

    Something I find interesting is the site is having this issue more often since I upgraded from 1.5.5e to 1.5.5f. It is possible that is related to a screwed up upgrade, except it was a fairly minor upgrade.

    I am wondering if the changes made to includes/classes/db/mysql/query_factory.php , the "Use this form of the Execute method to ensure that any SELECT result is pulled from the database, bypassing the cache." are causing the MYSQL queries to become significantly more intensive.
    That would depend on the installed software that perhaps uses that function/feature. The mere existence of the function does not necessarily cause an effect like described. Yes, the more code that needs to be loaded, the slower things can get, but talking parts of a second and shouldn't really be of concern. Further the "results" of that function can be obtained in the base code by use of additional parameters when calling the Execute method. Adding it improves code readability and reduces the likelihood of incorrect coding by accidentally forgetting a parameter, or using the wrong one.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #7
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,687
    Plugin Contributions
    9

    Default Re: Crashing Tables

    i would like to add a few items for thought:

    • if there was a problem with query_factory.php, i think we would be seeing MANY more complaints about it. In my troubleshooting, whenever i get that deep, i have mis-diagnosed the problem.
    • i see little harm in deleting all records from the aforementioned tables and see if it helps. have you looked to see how many records are in each table?
    • i see little harm in converting the tables to innoDB.
    • backing up the DB is a good idea, however restoring the whole DB for these 2 tables would be a bad idea. one could recontruct the 2 tables (if needed) by grabbing the sql statements from the github repo (or other repo).
    • you say you have many stores. how much traffic does each store get?
    • my inclination is that you either have a config wrong, or you have inadequate hosting. if the sites do not get that many orders, than you might have multiple spiders dragging you down. how hard would it be to move a site to another host? are all your sites on the same server at the same host? could you move one site to another server at that host and see if it helps?


    best.
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  8. #8
    Join Date
    Jun 2007
    Posts
    474
    Plugin Contributions
    2

    Default Re: Crashing Tables

    My mention of query_factory.php wasn't to say the changes in query_factory.php were bad. Rather there may be certain add-on module queries that ran longer as a result.

    That said, for now at least (a couple days), the issue and any other related issues such as MAX_USER_Connections debug logs have gone away. More digging led to the following changes:
    1) deactivate comments on a lightly used blog - the comment page was being slammed by spiders and taking up more CPU usage than the main site
    2) tighten up or deactivate queries in an add-on module that is resource heavy
    3) upgrade hosting plan a couple levels higher

 

 

Similar Threads

  1. Check out crashing
    By outeredge2 in forum General Questions
    Replies: 3
    Last Post: 14 Apr 2017, 12:51 PM
  2. v151 Tables keep on crashing
    By pietpetoors in forum General Questions
    Replies: 4
    Last Post: 5 May 2014, 01:48 PM
  3. checkout crashing
    By aw3s0me in forum General Questions
    Replies: 13
    Last Post: 19 Dec 2007, 05:06 AM
  4. Crashing payment modules?
    By Rotkale in forum Built-in Shipping and Payment Modules
    Replies: 5
    Last Post: 22 Jan 2007, 08:55 AM
  5. Server Crashing
    By itollij in forum General Questions
    Replies: 7
    Last Post: 17 Nov 2006, 02:46 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