lshmouse opened a new issue, #3653: URL: https://github.com/apache/incubator-devlake/issues/3653
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/incubator-devlake/issues?q=is%3Aissue) and found no similar issues. ### What happened [Bug][Gitlab] gitlab collectApiJobs task failed for mysql locks error: The total number of locks exceeds the lock table size ``` time="2022-11-03 06:20:00" level=debug msg=" [pipeline service] [pipeline #25] [task #49] [gitlab] [collectApiJobs] fetchAsync >>> done for projects/4/jobs map[page:[69965] per_page:[100] sort:[asc] with_stats:[true]] <nil>" time="2022-11-03 06:20:00" level=debug msg=" [pipeline service] [pipeline #25] [task #49] [gitlab] schedulerJob <<< 147642 ended" time="2022-11-03 06:20:00" level=error msg=" [pipeline service] [pipeline #25] [task #49] [gitlab] [collectApiJobs] end api collection error caused by: combined messages: { error inserting raw rows into _raw_gitlab_api_job ===================== error inserting raw rows into _raw_gitlab_api_job ===================== error inserting raw rows into _raw_gitlab_api_job ===================== error inserting raw rows into _raw_gitlab_api_job ===================== error inserting raw rows into _raw_gitlab_api_job ===================== error inserting raw rows into _raw_gitlab_api_job ===================== error inserting raw rows into _raw_gitlab_api_job ===================== error inserting raw rows into _raw_gitlab_api_job ===================== error inserting raw rows into _raw_gitlab_api_job ===================== error inserting raw rows into _raw_gitlab_api_job }" time="2022-11-03 06:20:01" level=info msg=" [db] ^[[31;1m/app/runner/run_task.go:83 ^[[35;1mError 1206: The total number of locks exceeds the lock table size ^[[0m^[[33m[139.481ms] ^[[34;1m[rows:0]^[[0m UPDATE `_devlake_tasks` SET `failed_sub_task`='collectApiJobs',`finished_at`='2022-11-03 06:20:01.01',`message`='subtask collectApiJobs ended unexpectedly caused by: Error waiting for async Collector execution caused by: error inserting raw rows into _raw_gitlab_api_job,error inserting raw rows into _raw_gitlab_api_job,error inserting raw rows into _raw_gitlab_api_job,error inserting raw rows into _raw_gitlab_api_job,error inserting raw rows into _raw_gitlab_api_job,error inserting raw rows into _raw_gitlab_api_job,error inserting raw rows into _raw_gitlab_api_job,error inserting raw rows into _raw_gitlab_api_job,error inserting raw rows into _raw_gitlab_api_job,error inserting raw rows into _raw_gitlab_api_job',`spent_seconds`=105601,`status`='TASK_FAILED',`updated_at`='2022-11-03 06:20:01.012' WHERE `id` = 49" time="2022-11-03 06:20:01" level=error msg=" [pipeline service] [pipeline #25] [task #49] failed to finalize task status into db (task failed) caused by: subtask collectApiJobs ended unexpectedly Wraps: (2) Error waiting for async Collector execution Wraps: (3) | combined messages: | { | error inserting raw rows into _raw_gitlab_api_job | ===================== | error inserting raw rows into _raw_gitlab_api_job | ===================== | error inserting raw rows into _raw_gitlab_api_job | ===================== | error inserting raw rows into _raw_gitlab_api_job | ===================== | error inserting raw rows into _raw_gitlab_api_job | ===================== | error inserting raw rows into _raw_gitlab_api_job | ===================== | error inserting raw rows into _raw_gitlab_api_job | ===================== | error inserting raw rows into _raw_gitlab_api_job | ===================== | error inserting raw rows into _raw_gitlab_api_job | ===================== | error inserting raw rows into _raw_gitlab_api_job | } Error types: (1) *hintdetail.withDetail (2) *hintdetail.withDetail (3) *errors.errorString" time="2022-11-03 06:20:01" level=error msg=" [task service] task failed caused by: Error running task 49. Wraps: (2) subtask collectApiJobs ended unexpectedly Wraps: (3) Error waiting for async Collector execution Wraps: (4) | combined messages: | { | error inserting raw rows into _raw_gitlab_api_job | ===================== | error inserting raw rows into _raw_gitlab_api_job | ===================== | error inserting raw rows into _raw_gitlab_api_job | ===================== ``` ### What do you expect to happen The gitlab collectApiJobs task can be executed in success. ### How to reproduce Add a gitlab project sync with CI/CD enabled and the project has 20K+ pipelines and jobs ### Anything else _No response_ ### Version v0.14.2 ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
