Author Topic: Problem in 'online_customers' Mysql Killed Queries Logs  (Read 6015 times)

Offline aiswarjya

  • Newbie
  • *
  • Posts: 39
  • Karma: +6/-0
    • View Profile
Problem in 'online_customers' Mysql Killed Queries Logs
« on: January 28, 2016, 01:51:21 AM »
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

Offline eCommerce Core

  • Administrator
  • Hero Member
  • *****
  • Posts: 1602
  • Karma: +93/-1
    • View Profile
Re: Problem in 'online_customers' Mysql Killed Queries Logs
« Reply #1 on: January 28, 2016, 07:08:12 AM »
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

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2068
  • Karma: +327/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: Problem in 'online_customers' Mysql Killed Queries Logs
« Reply #2 on: January 28, 2016, 12:23:38 PM »
please run this SQL query in your phpmyadmin
Code: [Select]
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

 

Powered by SMFPacks Social Login Mod