Results 1 to 9 of 9
  1. #1
    Join Date
    Oct 2010
    Posts
    6
    Plugin Contributions
    0

    Default "Suddenly" very slow server

    Zen Cart 1.5.4
    Server OS: Linux 2.6.32-696.16.1.el6.x86_64 (We use dedicated Server)
    Database: MySQL 5.6.38
    PHP Version: 5.5.37 (Zend: 2.5.0)

    We are having major problems with our zen cart website which happened suddenly without changed any settings or touched code etc (this has happened about 1 month ago and we are still stuck).

    Server Load is super high, website is slow, we could not use following function of admin because it times out or super slow.

    * Making a Feed File for Search Engine (we use doofinder)
    * Inserting special price from Price Manager (we could edit existing price etc, but not installing new special price).

    >> We had to increase set_time_limit() from 60 to 300. This did not work at first (did not increase time limit). We contacted server and there was some error on litespeed (boost) software. This is fixed but this is not solving the problem... Still slow.

    * Take ages to search order number sometimes 1-2 mins.


    We have contacted Server however, according to them, they have never changed any setting / upgrading and server is working fine so must be our problem.

    We don't think so cause when it started this problem following error occurred at admin log in section....

    Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/********/public_html/********/login.php on line 13

    >> We have fixed this but Server must done something!!??.... <<

    Any how, according to our server:

    Regarding the server load, mysql seems to be the highest in terms of CPU usage. The best way of reducing load would be to optimize your databases and queries. It looks like the CPU usage is hovering around 200% at the moment, but not too many processes are running:”

    >>We have run repair on MySQL but this does not seem to solve the problems.


    Further info from our server company
    mysql> show processlist;
    +---------+------------------+-----------+----------------------+---------+------+---------------------+------------------------------------------------------------------------------------------------------+
    | Id | User | Host | db | Command | Time | State | Info |
    +---------+------------------+-----------+----------------------+---------+------+---------------------+------------------------------------------------------------------------------------------------------+
    | 1152668 | *********_*****2| localhost | *********_******* | Query | 36 | Sending data | SELECT distinct o.* FROM zen_orders o left join zen_orders_products op on (op.orders_id = o.orders_ |
    | 1152685 | *********_*****2| localhost | *********_******* | Sleep | 0 | | NULL |
    | 1152713 | *********_*****2| localhost | *********_******* | Sleep | 0 | | NULL |
    | 1152714 | *********_*****2| localhost | *********_******* | Query | 0 | Writing to net | SELECT
    uri
    FROM
    zen_ceon_uri_mappings
    WHERE
    main_page = 'index'
    AND
    associated_d |
    | 1152716 | *********_*****2| localhost | *********_******* | Query | 0 | Writing to net | SELECT
    uri
    FROM
    zen_ceon_uri_mappings
    WHERE
    main_page = 'index'
    AND
    associated_d |
    | 1152717 | *********_*****2| localhost | *********_******* | Query | 0 | Writing to net | SELECT
    uri
    FROM
    zen_ceon_uri_mappings
    WHERE
    main_page = 'index'
    AND
    associated_d |
    | 1152720 | *********_*****2| localhost | *********_******* | Sleep | 0 | | NULL |
    | 1152721 | *********_*****2| localhost | *********_******* | Query | 0 | statistics | SELECT
    uri
    FROM
    zen_ceon_uri_mappings
    WHERE
    main_page = 'index'
    AND
    associated_d |
    | 1152722 | *********_*****2| localhost | *********_******* | Sleep | 0 | | NULL |
    | 1152725 | *********_*****2| localhost | *********_******* | Sleep | 2 | | NULL |
    | 1152726 | *********_*****2| localhost | *********_******* | Query | 0 | Creating sort index | select c.categories_id, cd.categories_name, c.parent_id
    from zen_categories c, zen_categor |
    | 1152727 | root | localhost | NULL | Query | 0 | init | show processlist |
    | 1152728 | *********_*****2| localhost | *********_******* | Query | 0 | Sending data | select b.banners_id, b.expires_date, b.expires_impressions,
    sum(bh.bann |
    | 1152729 | *********_*****2| localhost | *********_******* | Sleep | 0 | | NULL |
    +---------+------------------+-----------+----------------------+---------+------+---------------------+------------------------------------------------------------------------------------------------------+
    14 rows in set (0.00 sec)


    We have seen following log errors in short period of time (over 100 errors in short time. This happens now and then randomly and not too sure what is causing this...)

    [19-Feb-2019 11:53:29 Asia/Tokyo] PHP Warning: mysqli_connect(): (HY000/1040): Too many connections in ***/public_html/includes/classes/db/mysql/query_factory.php on line 62
    [19-Feb-2019 11:53:29 Asia/Tokyo] PHP Warning: mysqli_connect(): (HY000/1040): Too many connections in ***/public_html/includes/classes/db/mysql/query_factory.php on line 62
    [19-Feb-2019 11:53:29 Asia/Tokyo] PHP Warning: mysqli_connect(): (HY000/1040): Too many connections in ***/public_html/includes/classes/db/mysql/query_factory.php on line 62
    [19-Feb-2019 11:53:29 Asia/Tokyo] PHP Warning: mysqli_connect(): (HY000/1040): Too many connections in ***/public_html/includes/classes/db/mysql/query_factory.php on line 62
    [19-Feb-2019 11:53:29 Asia/Tokyo] PHP Warning: mysqli_connect(): (HY000/1040): Too many connections in ***/public_html/includes/classes/db/mysql/query_factory.php on line 62
    [19-Feb-2019 11:53:29 Asia/Tokyo] PHP Warning: mysqli_connect(): (HY000/1040): Too many connections in ***/public_html/includes/classes/db/mysql/query_factory.php on line 62
    [19-Feb-2019 11:53:29 Asia/Tokyo] PHP Warning: mysqli_connect(): (HY000/1040): Too many connections in ***/public_html/includes/classes/db/mysql/query_factory.php on line 62
    [19-Feb-2019 11:53:29 Asia/Tokyo] PHP Warning: mysqli_connect(): (HY000/1040): Too many connections in ***/public_html/includes/classes/db/mysql/query_factory.php on line 62
    [19-Feb-2019 11:53:29 Asia/Tokyo] PHP Warning: mysqli_connect(): (HY000/1040): Too many connections in ***/public_html/includes/classes/db/mysql/query_factory.php on line 62
    [19-Feb-2019 11:53:29 Asia/Tokyo] PHP Warning: mysqli_connect(): (HY000/1040): Too many connections in ***/public_html/includes/classes/db/mysql/query_factory.php on line 62

    We will be much appreciate it if someone can enlighten us and what is most likely causing this error....

    We are newbie here so if you need any further information etc., please feel free to contact us.

    and thank you very much for your time in advance.

  2. #2
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,107
    Plugin Contributions
    11

    Default Re: "Suddenly" very slow server


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

    Default Re: "Suddenly" very slow server

    This thread might help too:
    https://www.zen-cart.com/showthread....ns-quot-errors

    It is possible you are receive an overload of crap traffic from a bot/spider. That is what was causing this same issue on my server.

  4. #4
    Join Date
    Oct 2010
    Posts
    6
    Plugin Contributions
    0

    Default Re: "Suddenly" very slow server

    Hi dblote & lindasdd

    Thank you very much for your input!

    * We have checked CIDR setting but there is no problem here.

    * As we have not touched any programming so $query->MoveNext() should not be an issue!?

    * We are not getting hit by many traffics either... Just usual.

    * We have tried following and see how it works but website is still slow.

    function __destruct()
    {
    $this->close();
    }


    According to server, Server load is still high. Server said problems due to mysql connection / queries.

    But we are still puzzled... what is causing this....

    DOOHH!

    We appreciate any input with this~~

    Thanks ;)

  5. #5
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,731
    Plugin Contributions
    27

    Default Re: "Suddenly" very slow server

    If it's not a third party server attack,

    Not related to a code or page that has become corrupt for some reason (or hacked)

    Then a 'who's hogging all the bandwidth' or 'stop pinging the gateway' search is in order...

    Admin > Configuration > Display The Page Parse Time - will show you a total query count on each page for page by page bug searching.

    Admin > Configuration > Log Database Queries - may display the data in a way that also helps you find the culprit.

    I have seen php 5 - php 7 updates cause some wirey queries in the past also. They had the server running at the redline - until a tech stopped it before a mechanical failure!!

    Lastly, don't be afraid to file compare a recent local backup with your server files for any possible changes.
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    Twitch Base7 with Wholesale PRO - 88 preinstalled plugins zero errors.

  6. #6
    Join Date
    Oct 2010
    Posts
    6
    Plugin Contributions
    0

    Default Re: "Suddenly" very slow server

    Thanks twitchtoo for your input!

    Some The Page Parse Time shown as below.

    Front Page
    Parse Time: 11.308 - Number of Queries: 1512 - Query Time: 8.3577797641602
    Parse Time: 13.410 - Number of Queries: 1512 - Query Time: 8.8710466663055

    Main Categories
    Parse Time: 33.197 - Number of Queries: 4359 - Query Time: 22.805725755661
    Parse Time: 40.894 - Number of Queries: 4691 - Query Time: 30.976976216431
    Parse Time: 41.599 - Number of Queries: 4772 - Query Time: 29.355609366928

    Sub Categories
    Parse Time: 41.694 - Number of Queries: 2191 - Query Time: 33.18395515065
    Parse Time: 31.557 - Number of Queries: 4529 - Query Time: 21.810070031952

    Product Page
    Parse Time: 15.687 - Number of Queries: 885 - Query Time: 9.6921501894531
    Parse Time: 6.277 - Number of Queries: 2047 - Query Time: 4.2455488913574
    Parse Time: 7.064 - Number of Queries: 2060 - Query Time: 3.9894394787445

    View Cart
    Parse Time: 5.258 - Number of Queries: 882 - Query Time: 3.2725555000153

    My Account
    Parse Time: 7.839 - Number of Queries: 1895 - Query Time: 5.3807590817108

    Extremely slow with main categories, sub categories.. This was never the case....

    We will look into this further tomorrow.

    Thank you very much for your time everyone. Much appreciated.

  7. #7
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,731
    Plugin Contributions
    27

    Default Re: "Suddenly" very slow server

    Unless you have a lot of products or some run away script that's a bunch of queries per page...

    Admin > Configuration > Logging

    If you want to compare I've turned queries on here:
    http://germanwholesaleparts.ca/ - Currently at 300 products with more than 20 Twitch modules in admin/live site.

    and

    Just as fast here:
    https://edmontongrocer.com/ - With 26,000 products and the same number of Twitch modules as well as a number of 3rd party plugins.
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    Twitch Base7 with Wholesale PRO - 88 preinstalled plugins zero errors.

  8. #8
    Join Date
    Oct 2010
    Posts
    6
    Plugin Contributions
    0

    Default Re: "Suddenly" very slow server

    @ Twitchtoo

    Thank you so much for your comparison.

    We do have over 40,000 products but compared to your sites no comparison.

    Especially Main Categories, Sub Categories are still painful to load.

    We haven't received following error for over 24hrs but then we got them again....

    PHP Warning: mysqli_connect(): (HY000/1040): Too many connections error

    We are pulling our hair out....

  9. #9
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,731
    Plugin Contributions
    27

    Default Re: "Suddenly" very slow server

    Quote Originally Posted by turtlemountain View Post
    @ Twitchtoo

    Thank you so much for your comparison.

    We do have over 40,000 products but compared to your sites no comparison.

    Especially Main Categories, Sub Categories are still painful to load.

    We haven't received following error for over 24hrs but then we got them again....

    PHP Warning: mysqli_connect(): (HY000/1040): Too many connections error

    We are pulling our hair out....
    Happy to help!

    Any site I've seen that error on has been overrun by bots.

    Blocking the offending IP's via .htaccess seemed to stop the opportunity for too many connections.
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    Twitch Base7 with Wholesale PRO - 88 preinstalled plugins zero errors.

 

 

Similar Threads

  1. Server suddenly became slow
    By solo_400 in forum General Questions
    Replies: 19
    Last Post: 19 Jan 2013, 09:59 AM
  2. v150 Admin suddenly became very slow on every page
    By Ashely in forum General Questions
    Replies: 2
    Last Post: 23 Sep 2012, 03:45 AM
  3. 5 sites suddenly running very slow
    By Stuff4Toys in forum General Questions
    Replies: 41
    Last Post: 21 Sep 2011, 04:39 AM
  4. Replies: 2
    Last Post: 17 May 2011, 03:50 AM
  5. Suddenly my site is very slow
    By moosesoom in forum Installing on a Windows Server
    Replies: 3
    Last Post: 25 Apr 2010, 04:11 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