Skip to content

Tons of "General error: 1205" in php error log while importing via the python log importer #16924

@adrianlambertz

Description

@adrianlambertz

It seems that there is a problem with the user_token_auth while importing log via the python logimporter.
While looking at the SQL processlist I see several UPDATE queries for the matomo_user_token_auth table, they run the entire time until the timeout:

[09-Dec-2020 09:28:08 UTC] Error in Matomo (tracker): Error query: SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction In query: UPDATE 'matomo_user_token_auth' SET 'last_used' = ? WHERE 'idusertokenauth' = ? Parameters: array ( 0 => '2020-12-09 09:27:17', 1 => '207', )

Manually executing one of these queries works like a charm in some milliseconds. But not while the python script runs.

After the timeout the python script echoes this:

2020-12-09 09:28:08,641: [INFO] Error when connecting to Matomo: HTTP Error 500: Internal Server Error
2020-12-09 09:28:08,642: [INFO] Retrying request, attempt number 2

That's since the latest 4.0.4 update (I updated from v3) and I use Python 3.7 to execute the script.

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: PerformanceFor when we could improve the performance / speed of Matomo.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions