Skip to content

Deadlocks on updating bot_db.botCount #54

@rob006

Description

@rob006

On every processing I have multiple errors like:

[11-Feb-2017 18:11:16 UTC] Error in Piwik (tracker): Error query: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction In query: UPDATE `piwik_bot_db`  			               SET botCount = botCount + 1 			                 , botLastVisit = ? 			             WHERE botId = ? Parameters: array (   0 => '2017-02-11 18:11:16',   1 => '252', )

Any chance to some optimization in this matter? Right now when one bot visit my site 2k times, I have 2k update queries, but it actually could be only one query which increase botCount by sum of visits and botLastVisit by date of last visit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions