我在wos2apimanager 1.7中创建了一个api,我通过jmeter发送50request / s。几次成功请求后,会反复显示以下日志。 API层设置为无限制。
[2017-02-16 09:46:03,364] INFO - RoleBasedAccessRateController You cannot access this service since you have exceeded the allocated quota.
api定义xml如下
<?xml version="1.0" encoding="UTF-8"?>
<api xmlns="http://ws.apache.org/ns/synapse"
name="admin--TestAPI2"
context="/test2"
version="v1"
version-type="url">
<resource methods="POST GET" url-mapping="/num" faultSequence="fault">
<inSequence>
<filter source="$ctx:AM_KEY_TYPE" regex="PRODUCTION">
<then>
<send>
<endpoint name="admin--TestAPI2_APIproductionEndpoint_0">
<http uri-template="http://time.jsontest.com/"/>
</endpoint>
</send>
</then>
<else>
<send>
<endpoint name="admin--TestAPI2_APIsandboxEndpoint_0">
<http uri-template="http://time.jsontest.com/"/>
</endpoint>
</send>
</else>
</filter>
</inSequence>
<outSequence>
<send/>
</outSequence>
</resource>
<resource methods="POST GET" url-mapping="/number" faultSequence="fault">
<inSequence>
<filter source="$ctx:AM_KEY_TYPE" regex="PRODUCTION">
<then>
<send>
<endpoint name="admin--TestAPI2_APIproductionEndpoint_1">
<http uri-template="http://time.jsontest.com/"/>
</endpoint>
</send>
</then>
<else>
<send>
<endpoint name="admin--TestAPI2_APIsandboxEndpoint_1">
<http uri-template="http://time.jsontest.com/"/>
</endpoint>
</send>
</else>
</filter>
</inSequence>
<outSequence>
<send/>
</outSequence>
</resource>
<handlers>
<handler class="org.wso2.carbon.apimgt.gateway.handlers.security.APIAuthenticationHandler"/>
<handler class="org.wso2.carbon.apimgt.gateway.handlers.throttling.APIThrottleHandler">
<property name="id" value="A"/>
<property name="policyKey" value="gov:/apimgt/applicationdata/tiers.xml"/>
</handler>
<handler class="org.wso2.carbon.apimgt.usage.publisher.APIMgtUsageHandler"/>
<handler class="org.wso2.carbon.apimgt.usage.publisher.APIMgtGoogleAnalyticsTrackingHandler">
<property name="configKey" value="gov:/apimgt/statistics/ga-config.xml"/>
</handler>
<handler class="org.wso2.carbon.apimgt.gateway.handlers.ext.APIManagerExtensionHandler"/>
</handlers>
</api>