Reputation: 5087
I had a Prestashop 1.5.6 website working fine in one hosting account. After moving it to another of supposedly the same features, I started to receive warning it consumes over 25% of the server resources. I know the new account has a different mysql version, I dont know if the problem could be related to that.
The warning messages I got from the hosting provider are
CPU_TIME:606 table_rows_read:357770884 SELECTS:80 ROWS_UPDATED:0 ROWS_FETCHED:442135 BUSY_TIME:668 ONNECTED_TIME:673 BYTES_SENT:27099136 BYTES_RECEIVED:17676 WAIT_TIME:62
Top table row reads:
DB_USER: ********** -- TOTAL_CONNECTIONS: 4 -- CONNECTED_TIME: 673 -- CPU_TIME: 606 -- TABLE_ROW_READS: 357770884 -- SELECT_COMMANDS: 80 -- UPDATE_COMMANDS: -- BUSY_TIME: 668 -- BYTES_SENT: 27099136 -- BYTES_RECEIVED: 17676 -- WAIT_TIME (IO): 62
Top WAIT (IO) TIME:
DB_USER: ********** -- TOTAL_CONNECTIONS: 4 -- CONNECTED_TIME: 673 -- CPU_TIME: 606 -- TABLE_ROW_READS: 357770884 -- SELECT_COMMANDS: 80 -- UPDATE_COMMANDS: -- BUSY_TIME: 668 -- BYTES_SENT: 27099136 -- BYTES_RECEIVED: 17676 -- WAIT_TIME (IO): 62
SN 03:31 0:01 /index.php
SN 03:32 0:02 /index.php
SN 03:34 0:01 /index.php
SN 03:35 0:00 /index.php
Fri Feb 23 03:35:58 CST 2018
Running Processes:
S 03:08 0:00 dovecot/imap
SN 03:31 0:01 /index.php
SN 03:32 0:02 /index.php
SN 03:34 0:01 /index.php
SN 03:35 0:00 /index.php
Running Queries:
*************************** 1. row ***************************
USER: *********
DB: *********
STATE: Sending data
TIME: 34
COMMAND: Query
INFO: SELECT c.`name`, cl.`id_lang`, IF(cl.`id_lang` IS NULL, c.`value`, cl.`value`) AS value, c.id_shop_group, c.id_shop
FROM `ps_configuration` c
LEFT JOIN `ps_configuration_lang` cl ON (c.id_configuration = cl.id_configuration)
*************************** 2. row ***************************
USER: **********
DB: ***********
STATE: Copying to tmp table
TIME: 10
COMMAND: Query
INFO: SELECT h.id_hook, h.name as h_name, title, description, h.position, live_edit, hm.position as hm_position, m.id_module, m.name, active
FROM `ps_hook` h
INNER JOIN `ps_hook_module` hm ON (h.id_hook = hm.id_hook AND hm.id_shop = 1)
INNER JOIN `ps_module` as m ON (m.id_module = hm.id_module)
ORDER BY hm.position
*************************** 3. row ***************************
USER: **********
DB: **********
STATE: Copying to tmp table
TIME: 102
COMMAND: Query
INFO: SELECT h.id_hook, h.name as h_name, title, description, h.position, live_edit, hm.position as hm_position, m.id_module, m.name, active
FROM `ps_hook` h
INNER JOIN `ps_hook_module` hm ON (h.id_hook = hm.id_hook AND hm.id_shop = 1)
INNER JOIN `ps_module` as m ON (m.id_module = hm.id_module)
ORDER BY hm.position
*************************** 4. row ***************************
USER: **********
DB: **********
STATE: Copying to tmp table
TIME: 178
COMMAND: Query
INFO: SELECT h.id_hook, h.name as h_name, title, description, h.position, live_edit, hm.position as hm_position, m.id_module, m.name, active
FROM `ps_hook` h
INNER JOIN `ps_hook_module` hm ON (h.id_hook = hm.id_hook AND hm.id_shop = 1)
INNER JOIN `ps_module` as m ON (m.id_module = hm.id_module)
ORDER BY hm.position
Open connections
Current Site Requests:
index.php?id_category=20&controller=category&id_la
index.php?id_product=212&controller=product&id_lan
index.php?id_product=212&controller=product&id_lan
index.php?id_product=247&controller=product&id_lan
index.php?id_product=88&controller=product&id_lang
The table structures are
Upvotes: 2
Views: 68
Reputation: 1311
Did you try profiling ? There is a great tool inside Prestashop that you can activate by modifying config/defines.inc.php :
define('_PS_DEBUG_PROFILING_', true);
I also would suggest that you take a look at PHP Versions, as it seems like their would be some major change in how scripts are handled for example between 5.2 and 7.1 versions.
Upvotes: 1