WSO2 API Manager API负载测试失败

时间:2017-03-12 16:28:20

标签: wso2 wso2is wso2-am wso2carbon

我们正在使用WSO2 API Manager 1.10.0和WSO2 Identity Server 5.2.0。我们在API Manager中创建了一个基于内联脚本的API,并将其与Tier Availability一起发布为无限制。我们可以调用API并使用响应。 作为实验的一部分,我们打算查看可以满足多少并发请求。使用Jmeter,1000并发请求成功进行了inovked,但是在测试2000请求时,我们遇到了以下错误: -

> [2017-03-12 15:58:30,117]  WARN - EndpointContext Endpoint :
> AnonymousEndpoint will be marked SUSPENDED as it failed [2017-03-12
> 15:58:30,118]  WARN - EndpointContext Suspending endpoint :
> AnonymousEndpoint - last suspend duration was : 30000ms and current
> suspend duration is : 30000ms - Next retry after : Sun Mar 12 15:59:00
> UTC 2017 [2017-03-12 15:58:30,118]  INFO - LogMediator STATUS =
> Executing default 'fault' sequence, ERROR_CODE = 0, ERROR_MESSAGE =
> Unexpected error during sending message out [2017-03-12 15:59:12,858]
> ERROR - Axis2Sender Unexpected error during sending message out
> java.lang.IllegalStateException: I/O reactor has been shut down
>         at org.apache.http.util.Asserts.check(Asserts.java:34)
>         at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.connect(DefaultConnectingIOReactor.java:225)
>         at org.apache.synapse.transport.passthru.connections.TargetConnections.getConnection(TargetConnections.java:98)
>         at org.apache.synapse.transport.passthru.DeliveryAgent.submit(DeliveryAgent.java:156)
>         at org.apache.synapse.transport.passthru.PassThroughHttpSender.invoke(PassThroughHttpSender.java:258)
>         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:542)
>         at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:79)
>         at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:510)
>         at org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:372)
>         at org.apache.synapse.endpoints.HTTPEndpoint.send(HTTPEndpoint.java:85)
>         at org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:111)
>         at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:81)
>         at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:48)
>         at org.apache.synapse.config.xml.AnonymousListMediator.mediate(AnonymousListMediator.java:30)
>         at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:203)
>         at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:81)
>         at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:48)
>         at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:155)
>         at org.apache.synapse.rest.Resource.process(Resource.java:297)
>         at org.apache.synapse.rest.API.process(API.java:378)
>         at org.apache.synapse.rest.RESTRequestHandler.dispatchToAPI(RESTRequestHandler.java:97)
>         at org.apache.synapse.rest.RESTRequestHandler.process(RESTRequestHandler.java:65)
>         at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:295)
>         at org.apache.synapse.core.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:83)
>         at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
>         at org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:317)
>         at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:149)
>         at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at java.lang.Thread.run(Thread.java:724) [2017-03-12 15:59:12,859]  WARN - EndpointContext Endpoint : AnonymousEndpoint
> will be marked SUSPENDED as it failed [2017-03-12 15:59:12,859]  WARN
> - EndpointContext Suspending endpoint : AnonymousEndpoint - last suspend duration was : 30000ms and current suspend duration is :
> 30000ms - Next retry after : Sun Mar 12 15:59:42 UTC 2017 [2017-03-12
> 15:59:12,859]  INFO - LogMediator STATUS = Executing default 'fault'
> sequence, ERROR_CODE = 0, ERROR_MESSAGE = Unexpected error during
> sending message out [2017-03-12 15:59:34,318]  INFO - LogMediator
> STATUS = Executing default 'fault' sequence, ERROR_CODE = 101504,
> ERROR_MESSAGE = Send timeout [2017-03-12 15:59:34,318] ERROR -
> PassThroughHttpSSLSender Failed to submit the response
> java.lang.NullPointerException
>         at org.apache.synapse.transport.passthru.util.SourceResponseFactory.create(SourceResponseFactory.java:64)
>         at org.apache.synapse.transport.passthru.PassThroughHttpSender.submitResponse(PassThroughHttpSender.java:462)
>         at org.apache.synapse.transport.passthru.PassThroughHttpSender.invoke(PassThroughHttpSender.java:267)
>         at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
>         at org.apache.synapse.core.axis2.Axis2Sender.sendBack(Axis2Sender.java:212)
>         at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:493)
>         at org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:108)
>         at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:81)
>         at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:48)
>         at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:155)
>         at org.apache.synapse.mediators.MediatorFaultHandler.onFault(MediatorFaultHandler.java:86)
>         at org.apache.synapse.FaultHandler.handleFault(FaultHandler.java:54)
>         at org.apache.synapse.core.axis2.TimeoutHandler.processCallbacks(TimeoutHandler.java:188)
>         at org.apache.synapse.core.axis2.TimeoutHandler.run(TimeoutHandler.java:88)
>         at java.util.TimerThread.mainLoop(Timer.java:555)
>         at java.util.TimerThread.run(Timer.java:505) [2017-03-12 15:59:34,319] ERROR - Axis2Sender
> WSO2_AM_API_DEFAULT_VERSION:true,<?xml version='1.0'
> encoding='utf-8'?><soapenv:Envelope
> xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><am:fault
> xmlns:am="http://wso2.org/apimanager"><am:code>101504</am:code><am:type>Status report</am:type><am:message>Runtime
> Error</am:message><am:description>Send
> timeout</am:description></am:fault></soapenv:Body></soapenv:Envelope>
> Unexpected error sending message back org.apache.axis2.AxisFault:
> Failed to submit the response
>         at org.apache.synapse.transport.passthru.PassThroughHttpSender.handleException(PassThroughHttpSender.java:610)
>         at org.apache.synapse.transport.passthru.PassThroughHttpSender.invoke(PassThroughHttpSender.java:269)
>         at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
>         at org.apache.synapse.core.axis2.Axis2Sender.sendBack(Axis2Sender.java:212)
>         at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:493)
>         at org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:108)
>         at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:81)
>         at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:48)
>         at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:155)
>         at org.apache.synapse.mediators.MediatorFaultHandler.onFault(MediatorFaultHandler.java:86)
>         at org.apache.synapse.FaultHandler.handleFault(FaultHandler.java:54)
>         at org.apache.synapse.core.axis2.TimeoutHandler.processCallbacks(TimeoutHandler.java:188)
>         at org.apache.synapse.core.axis2.TimeoutHandler.run(TimeoutHandler.java:88)
>         at java.util.TimerThread.mainLoop(Timer.java:555)
>         at java.util.TimerThread.run(Timer.java:505)

我们如何增加并发请求数以及导致此错误的原因是什么?我们是否必须修改API Manager配置以容纳大约5000个请求?

1 个答案:

答案 0 :(得分:1)

您可以尝试调整性能以优化WSO2 API Manager。 请参阅API Manager docuementation中的Performance Tuning guide