SonarQube Eclipse Plugin Synchronize issues

805 views Asked by At

SQ version: 4.5.4 SQ Eclipse plugin: 3.4

We have been using SQ Eclipse plugin to check for new code violation for about a month and everything was going smooth. Since, yesterday we have been facing an issue while analysing the code.

It is giving 'Synchornize issues' has encounted a problem. Error dusing issue query. I also looked at the eclipse log to find the reason behind this. In the eclipse log, I see that it is having read time out issue while accesing the URL.

http://ipaddress:9000/api/issues/search?resolved=false&pageSize=-1&componentRoots=PROJECT:PROJECTATTRIBUTE&pageIndex=1

When I hit the above URL on a browser it takes around 5 minutes to get the response. I checked the sonar log to find the root reason behind this and noticed that it is taking around 5 mins while executing a query. Below is the sonar log, we can see it took 324913ms to execute a query.

2015.08.06 23:38:18 INFO http-bio-...-9000-exec-2 web[http] 329399ms GET /api/issues/search?resolved=false&pageSize=-1&componentRoots=PROJECT:PROJECTATTRIBUTE&pageIndex=1

2015.08.06 23:39:12 INFO http-bio-...-9000-exec-3 web[sql] 324913ms Executed SQL: select * from (select i.id from issues i inner join ( select s.project_id from snapshots s, ( select project_components.id as id, snapshot_components.id as sid, root_snapshot_components.project_id as root_project_id, root_snapshot_components.id as root_snapshot_id, snapshot_components.path as path from projects project_components inner join snapshots snapshot_components on snapshot_components.project_id = project_components.id and snapshot_components.islast = 1 inner join snapshots root_snapshot_components on root_snapshot_components.project_id = snapshot_components.root_project_id and root_snapshot_components.islast = 1 inner join ( SELECT p.id as root_project_id FROM group_roles gr INNER JOIN projects p on p.id = gr.resource_id AND p.scope = 'PRJ' AND p.qualifier = 'TRK' WHERE gr.role=? and gr.group_id is null ) authorized_projects on authorized_projects.root_project_id = root_snapshot_components.project_id WHERE ( project_components.kee=?) and project_components.enabled = 1 ) authorized_input_components WHERE s.root_project_id = authorized_input_components.root_project_id and s.islast = 1 and ( (s.root_snapshot_id = authorized_input_components.root_snapshot_id and s.path LIKE authorized_input_components.path || authorized_input_components.sid || '.%' ) or (s.id = authorized_input_components.sid) ) ) authorizedComponents on authorizedComponents.project_id=i.component_id WHERE i.resolution is null ) where rownum <= ? - parameters are: , , <10000>

But when I execute the same query on DB or through java program it takes less than 5 seconds.

If anyone knows how to resolved this issue please help everyone out whos facing similar issue.

0

There are 0 answers