Jump to content

MySQL database table keeps locking


Recommended Posts

Greetings,

Recently I've been in contact with our hosting provider due to some issues that have popped up for our PrestaShop site. Our hosting provider has been having to restrict our account due to excessive use of CPU resources. They sent us a snippet of whats causing the problem and it has to do with the ps_connections_page tables getting locked. I'm just wondering what's causing the tables to lock. They keep saying to enable caching but I always assumed that prestashop automatically cached.

Here is a short snippet of what they sent:

| 29783469 | [username] | localhost | [database] | Query | 1 | Locked | SELECT c.`id_guest`
| 29783596 | [username] | localhost | [database] | Query | 13 | Locked | SELECT COUNT(DISTINCT(id_connections)) nb
| 29783610 | [username] | localhost | [database] | Query | 12 | Locked | SELECT COUNT(DISTINCT(id_connections)) nb
| 29783625 | [username] | localhost | [database] | Query | 11 | preparing | DELETE FROM `ps_connections_page`
| 29783652 | [username] | localhost | [database] | Query | 9 | Locked | SELECT COUNT(DISTINCT(id_connections)) nb
| 29783469 | [username] | localhost | [database] | Query | 2 | Locked | SELECT c.`id_guest`
| 29783596 | [username] | localhost | [database] | Query | 14 | Locked | SELECT COUNT(DISTINCT(id_connections)) nb
| 29783610 | [username] | localhost | [database] | Query | 13 | Locked | SELECT COUNT(DISTINCT(id_connections)) nb
| 29783625 | [username] | localhost | [database] | Query | 12 | preparing | DELETE FROM `ps_connections_page`
| 29783652 | [username] | localhost | [database] | Query | 10 | Locked | SELECT COUNT(DISTINCT(id_connections)) nb



I disabled the statistics module thinking this was the cause of the problem. So far no problems yet. Can someone explain why its doing this?

Thanks

Link to comment
Share on other sites

  • 5 months later...
×
×
  • Create New...