support

Problem in 'online_customers' Mysql Killed Queries Logs

Started by aiswarjya, January 28, 2016, 01:51:21 AM

Previous topic - Next topic

aiswarjya

Helo Abantecart
Suddenly I found that my site take very slow response. When i contact to my server administrator they said that the problem in the SQL query.


localhost   2015-12-05 17:07:47   mand:Query   :DELETE   site_online_customers` WHERE UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(`date_added`) > 3600
localhost   2015-12-05 17:07:47   mand:Query   :DELETE   site_online_customers` WHERE UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(`date_added`) > 3600
localhost   2015-12-05 17:07:47   mand:Query   :DELETE   site_online_customers` WHERE UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(`date_added`) > 3600
localhost   2015-12-05 17:07:47   mand:Query   :DELETE   site_online_customers` WHERE UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(`date_added`) > 3600
localhost   2015-12-05 17:07:47   mand:Query   :DELETE   site_online_customers` WHERE UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(`date_added`) > 3600
localhost   2016-01-15 13:01:41   mand:Query   :UPDATE   ducts SET viewed = viewed + 1 WHERE product_id = '2867'
localhost   2016-01-19 13:41:51   mand:Query   :DELETE   site_online_customers` WHERE UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(`date_added`) > 3600
localhost   2016-01-19 13:42:11   mand:Query   :DELETE   site_online_customers` WHERE UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(`date_added`) > 3600

eCommerce Core

Let us check this one.

Meanwhile, there was a fix for one slow query. You can see changes here or copy these files over.
https://github.com/abantecart/abantecart-src/commit/1f4ffd44ffeb0931e2228b35f230b7045ba393ba
"If you're in the luckiest one per cent of humanity, you owe it to the rest of humanity to think about the other 99 per cent."
― Warren Buffett

abolabo

please run this SQL query in your phpmyadmin
ALTER TABLE `site_online_customers`
CHANGE COLUMN `ip` `ip` VARCHAR(50) NOT NULL ,
ADD INDEX `site_online_customers_idx` (`date_added` ASC);


Then replace file
public_html/storefront/model/tool/online_now.php
by attached
and let us know about result
"No one is useless in this world who lightens the burdens of another."
― Charles Dickens

Forum Rules Code of conduct
AbanteCart.com 2010 -