我有一个可以发送任何大小响应的服务器。 当我拨打响应大小为1MB的电话时,WSO2 api manger工作正常。 (每分钟1000个请求) 当我们进行响应大小为10MB的相同调用时,WSO2 api管理器最初会减小响应的大小,最终变为0大小的响应。每分钟有1000个请求,只有前28个请求响应,其他10MB请求响应较小。 我尝试直接使用10MB响应大小命中后端服务,所有响应都是10MB。
这是我的server.js(为nodejs编写)
var http = require("http");
var url = require('url');
var server = http.createServer(function(request, response) {
var params = url.parse(request.url, true).query;
var size = parseInt(params.size);
var buffer = new Buffer(size);
buffer.fill("a");
response.write(buffer.toString());
response.end();
});
server.listen(8083);
console.log("Server is listening");
WSO2使用参数大小命中此服务器。
我的直接http电话看起来像
wget http://A.B.C.D:8083/?size=10485760
我的WSO2电话看起来像
wget --header="Authorization: Bearer Xobzt7lefiMadwt4u4Vp9q93dR8a" -qO- http://E.F.G.H:8280/loadtest/1.0/?size=10485760
Log显示堆栈跟踪错误
java.lang.IllegalStateException: I/O reactor has been shut down at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.connect(DefaultConnectingIOReactor.java:229) at org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncRequest(HttpCoreNIOSender.java:366) at org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke(HttpCoreNIOSender.java:252) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442) at org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.send(DynamicAxisOperation.java:185) at org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.executeImpl(DynamicAxisOperation.java:167) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149) at org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:460) at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:57) at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:325) at org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:329) at org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:59) at org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:95) at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71) at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:112) at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71) at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:114) at org.apache.synapse.rest.Resource.process(Resource.java:297) at org.apache.synapse.rest.API.process(API.java:308) at org.apache.synapse.rest.RESTRequestHandler.dispatchToAPI(RESTRequestHandler.java:76) at org.apache.synapse.rest.RESTRequestHandler.process(RESTRequestHandler.java:63) at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:191) at org.apache.synapse.core.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:83) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180) at org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine(RESTUtil.java:144) at org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTUtil.java:139) at org.apache.synapse.transport.nhttp.util.RESTUtil.processGetAndDeleteRequest(RESTUtil.java:146) at org.apache.synapse.transport.nhttp.DefaultHttpGetProcessor.processGetAndDelete(DefaultHttpGetProcessor.java:464) at org.wso2.carbon.transport.nhttp.api.NHttpGetProcessor.process(NHttpGetProcessor.java:296)
其后将是
[2013-11-16 17:25:12,679] INFO - LogMediator To:,MessageID:urn:uuid:aec86528-8132-4329-9262-9204a9f1317c,Direction:response,STATUS =执行默认'fault' 序列,ERROR_CODE = 504,ERROR_MESSAGE =发送超时,信封:0状态reportRuntime发送消息时发生错误意外错误