Still getting Odata Service Connector Throttle Error - Already tried Set-SPBusinessDataCatalogThrottleConfig

sharepoint.stackexchange https://sharepoint.stackexchange.com/questions/206433

  •  13-12-2020
  •  | 
  •  

Question

I've already tried powershell to reset the throttle value as well as disabled it completely: This disables a throttling rule. Set-SPBusinessDataCatalogThrottleConfig -Identity $dbRule -Enforced:$false

But still get error when I try to query a record in External List using REST API:

OData Service Connector has throttled the response. The response from OData Service contains more than '3000000' bytes. The maximum amount of data that can be read through OData Service Connector is '3000000'. The limit can be changed via the 'Set-SPBusinessDataCatalogThrottleConfig' cmdlet.

In the BDCM file for the concerned method, the default was set to 100, there are about 1300 records to query. So I first changed the value to 250, and I could query the first 250 records out of the 1300 using REST API to External list. Then I changed the this default value to 1500 as below, and I started getting this error.

<DefaultValues>
<DefaultValue      MethodInstanceName="ReadAllProjects"Type="System.Int32">1500</DefaultValue>
</DefaultValues>
Était-ce utile?

La solution

Looks like you cannot use Scope Database, and ThrottleType Items. You need to use Scope OData, and ThrottleType Size.

Scope : OData ThrottleType : Size Enforced : False Default : 150000000 Max : 150000000

Please see below:

$odataRule = Get-SPBusinessDataCatalogThrottleConfig -Scope OData -ThrottleType Size -ServiceApplicationProxy $bdcProxy

Set-SPBusinessDataCatalogThrottleConfig -Identity $odataRule -Maximum 150000000 -Default 150000000 

$odataRule = Get-SPBusinessDataCatalogThrottleConfig -Scope OData -ThrottleType Size -ServiceApplicationProxy $bdcProxy
$odataRule

Autres conseils

Did you try increasing the limit? using this cmdlet

Set-SPBusinessDataCatalogThrottleConfig -Identity $dbRule -Maximum 1000000 -Default 3000

This Maximum value and Default can be modified accordingly

It is also noteworthy to mention below

"Remember that if you run one of these commands and immediately type $dbRule, you won’t see the changes reflected; you should re-fetch the rule using Get-SPBusinessDataCatalogThrottleConfig again. Your changes are immediately committed by Set-SPBusinessDataCatalogThrottleConfig, but it may take a few minutes for them to be reflected in external lists and other runtime scenarios."

Reference: BCS Throttle Management

If you are querying the external list through REST api, first ensure your external list has been created without any error and able to see all 1300 rows in it. If there is any error on it, then REST API against external list won't work. And also please do check, any of your SQL Proc or View doesn't use the TOP keyword in sql statement. Another look around is, ensure there is "Filter Parameter" configuration that restrict to use "TOP" operator and "Default Value" as shown in the image. Its taken from the SPD, as you are using the oData, check it in VSS designer or XML enter image description here

Licencié sous: CC-BY-SA avec attribution
Non affilié à sharepoint.stackexchange
scroll top