com.microsoft.sqlserver.jdbc.SQLServerException: The incoming request has too many parameters

elasticsearch
mssql

(Dominique Jean-Prost) #1

Hello,

I have lots and lots of this kind of exception in web.log. I don’t know what to do with it. I use the version 6.7.4 (build 38452)
I guess it has something to do with elasticsearch recovery, but I don’t know what to do with this.
Can someone help me please ?
Thank you

    2018.10.16 13:31:54 ERROR web[][o.s.s.e.RecoveryIndexer] Elasticsearch recovery - fail to recover documents
    java.lang.IllegalStateException: Fail to select authorizations
    	at org.sonar.server.permission.index.PermissionIndexerDao.doSelectByProjects(PermissionIndexerDao.java:192)
    	at org.sonar.server.permission.index.PermissionIndexerDao.lambda$selectByUuids$0(PermissionIndexerDao.java:178)
    	at org.sonar.db.DatabaseUtils.executeLargeInputs(DatabaseUtils.java:133)
    	at org.sonar.db.DatabaseUtils.executeLargeInputs(DatabaseUtils.java:118)
    	at org.sonar.db.DatabaseUtils.executeLargeInputs(DatabaseUtils.java:107)
    	at org.sonar.server.permission.index.PermissionIndexerDao.selectByUuids(PermissionIndexerDao.java:178)
    	at org.sonar.server.permission.index.PermissionIndexer.index(PermissionIndexer.java:169)
    	at org.sonar.server.es.RecoveryIndexer.doIndex(RecoveryIndexer.java:150)
    	at org.sonar.server.es.RecoveryIndexer.lambda$recover$2(RecoveryIndexer.java:120)
    	at java.util.Map.forEach(Map.java:630)
    	at org.sonar.server.es.RecoveryIndexer.recover(RecoveryIndexer.java:120)
    	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    	at java.lang.Thread.run(Thread.java:748)
    Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The incoming request has too many parameters. The server supports a maximum of 2100 parameters. Reduce the number of parameters and resend the request.
    	at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:258)
    	at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1535)
    	at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:467)
    	at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:409)
    	at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7151)
    	at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:2478)
    	at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:219)
    	at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:199)
    	at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(SQLServerPreparedStatement.java:331)
    	at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
    	at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
    	at org.sonar.server.permission.index.PermissionIndexerDao.doSelectByProjects(PermissionIndexerDao.java:185)
    	... 17 common frames omitted

(Dominique Jean-Prost) #3

Can someone tell me if I should report my problem in the “need help” group ?


(G Ann Campbell) #4

Hi,

Sorry for the delay in responding. This is a good place to make this report. Hopefully we’ll have an answer for you soon.

 
Ann


(Dominique Jean-Prost) #5

Thank you @ganncamp.
If more info is needed to help diagnosing the problem, don’t hesitate to ask.
Actually, I guess the stacktrace is enough to understand where the problem is.


(G Ann Campbell) #7

Hi,

To give you a meager update, we’ve found this in code, but not identified an easy workaround. Hopefully I’ll have either a workaround or a ticket for you next week.

 
Ann


(G Ann Campbell) #8

Hi,

We’ve created a ticket for this. No verdict yet on whether we’ll tackle it for the LTS, but if you ‘Watch’ it you’ll get updates.

SONAR-11407 - Permission index recovery fails if there is too many projects to recover

 
Ann


(Dominique Jean-Prost) #9

Well, the workaround solution given in the jira issue is enough for me at the moment. Followed it and the stacktraces have left my log file.
Thank you for helping.