We are running into a problem of the Compute Engine not being able to start, since it blocks infinitely on the task [o.s.c.q.PurgeCeActivities] Delete the Compute Engine tasks created before Sun Jul 29 11:57:17 CEST 2018
Here is our understanding what happened:
- our Sonar instance hasn’t been restarted for quite a while
- yesterday we had to restart (alignment with new LDAP configuration)
- when starting up, the Compute Engine apparently tries to purge the old tasks, and since Sonar hasn’t been restarted, there should have been accumulated quite a number of those tasks to purge.
- the database is working relentlessly to perform the query, blocking all the other activities, and in particular blocking Compute Engine to start
Here is the query that is being executed on the DB side:
delete from ce_scanner_context where task_uuid in ( … very long list of ids like @Pxxx … )
As has been said above, this query takes very long to execute, and during this time the Sonar Qube is unusable, since Compute Engine is not able to start.
Could you please provide us with any help with this issue?
The answers to the following questions will be highly appreciated:
- is there a way to reduce the number of id’s in the “in” clause? Probably, we could change a parameter, increasing the period of time of purge from half-year to longer?
- should we restart Sonar Qube regularly in order to prevent these kind of problems in the future?
- is there a cron job to start to purge regularly the DB, reducing the risk of accumulating of an unnecessary data.
Any help, or any suggestions will be highly appreciated!