Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2011
    Posts
    22
    Plugin Contributions
    0

    Default Store regularly crashes until I optimize database

    Fairly regularly, when I log on in the morning, I find that the customer side of the store has crashed (500 Server Error). When I optimize the database from the admin side (or via phpMyAdmin) it is fixed. Any idea why this would happen? I can't sit around waiting for the store to crash all the time and I don't know how to set a cron job to optimize nightly (nor should it even be necessary, to be honest).

  2. #2
    Join Date
    Jun 2003
    Posts
    33,720
    Plugin Contributions
    0

    Default Re: Store regularly crashes until I optimize database

    We need more information -

    What version of Zen Cart?
    What Addons do you have installed?
    What errors are you seeing?
    Who is the host?
    What version of php?
    What version of MySQL?
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  3. #3
    Join Date
    Jan 2011
    Posts
    22
    Plugin Contributions
    0

    Default Re: Store regularly crashes until I optimize database

    Quote Originally Posted by Kim View Post
    We need more information -

    What version of Zen Cart?

    1.3.9.h

    What Addons do you have installed?
    Edit Orders (latest version, as of a month ago)
    Backup Zen Cart Version 1.0.7 (never used since it won't work w/ admin-wide SSL)
    Database Backup Manager MySQL
    Enhanced Who's Online
    Easy Populate
    Query Cache 1.7

    What errors are you seeing?
    500 Server Error (store side)
    none (admin side)

    Who is the host?
    domaindiscover.com

    What version of php?
    5.2.4-2ubuntu5.17 (Zend: 2.2.0)

    What version of MySQL?
    MySQL 5.0.51a-3ubuntu5.8-log
    (I switched all tables except products_description to InnoDB from MyISAM in order to prevent max user connection lockups, but that hasn't been a problem before)

  4. #4
    Join Date
    Jan 2011
    Posts
    22
    Plugin Contributions
    0

    Default Re: Store regularly crashes until I optimize database

    Any help?

  5. #5
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Store regularly crashes until I optimize database

    Has your apache error log recorded the reason for the server errors?
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  6. #6
    Join Date
    Nov 2004
    Location
    Norfolk, United Kingdom
    Posts
    3,036
    Plugin Contributions
    2

    Default Re: Store regularly crashes until I optimize database

    I switched all tables except products_description to InnoDB from MyISAM in order to prevent max user connection lockups, but that hasn't been a problem before
    Exceeding max user connections for MySQL should not be a problem unless:

    1. You have a very poor host. Check with them what the max user connections allowance is.
    2. You have an exceptionally busy website. This seems unlikely if it is happening overnight.
    3. You have reset the default setting in the configuration.php files to allow persistent MySQL connections.

    correct setting:
    Code:
    define('USE_PCONNECT', 'false');
    Vger

  7. #7
    Join Date
    Jan 2011
    Posts
    22
    Plugin Contributions
    0

    Default Re: Store regularly crashes until I optimize database

    Quote Originally Posted by Vger View Post
    Exceeding max user connections for MySQL should not be a problem unless:

    1. You have a very poor host. Check with them what the max user connections allowance is.
    2. You have an exceptionally busy website. This seems unlikely if it is happening overnight.
    3. You have reset the default setting in the configuration.php files to allow persistent MySQL connections.

    correct setting:
    Code:
    define('USE_PCONNECT', 'false');
    Vger
    1. My host has the max user connection set to 10 and they won't budge unless I buy dedicated server, claiming 10 is more than enough. They are actually pretty good, but aren't interested in debugging my store scripts, naturally.
    2. Nothing too bad, (10-15 at a time, including spiders).
    3. the configure setting you described hasn't changed and is at the default you posted.

    The logs don't indicate anything unusual.

  8. #8
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Store regularly crashes until I optimize database

    Quote Originally Posted by Cheepnis View Post
    I find that the customer side of the store has crashed (500 Server Error).
    Quote Originally Posted by kuroi View Post
    Has your apache error log recorded the reason for the server errors?
    As kuroi indicated, your server holds the key to the actual cause of the "500" error.
    https://www.zen-cart.com/tutorials/index.php?article=63
    .

    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.

 

 

Similar Threads

  1. v155 optimize database
    By mespe in forum General Questions
    Replies: 1
    Last Post: 21 Jul 2016, 10:35 PM
  2. Admin Optimize Database issue
    By wiccan0974 in forum General Questions
    Replies: 3
    Last Post: 1 Nov 2011, 12:01 AM
  3. Optimize Database ....any risk?
    By split63 in forum General Questions
    Replies: 3
    Last Post: 8 Sep 2010, 03:38 AM
  4. weird error in Optimize Database
    By saman in forum General Questions
    Replies: 9
    Last Post: 6 Oct 2009, 02:21 AM
  5. [Done v1.3.9] Optimize Database error
    By JunWeiStore in forum Bug Reports
    Replies: 1
    Last Post: 7 Jul 2009, 03:06 AM

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