Rest server (Play Framework) gets “Read Timed out” exception during load test

我是研究僧i 提交于 2019-12-12 18:19:54

问题


We are running a heavy load test (jmeter: 350 threads, 35M total requests) on a rest server using Play Framework and run into the following error after ~2 hour. We remove other components so that request simply take requests and do nothing. Anyone has any idea or simply Play Framework cannot handle heavy load like this?

2014/07/05 11:59:38 WARN  - com.company.test.RestTest2: Run TestSQL throw error java.lang.Exception: com.sun.jersey.api.client.ClientHandlerException: java.net.SocketTimeoutException: Read timed out
        at com.company.dispatcher.RexsterRESTTaskDispatcher.dispatchTask(RexsterRESTTaskDispatcher.java:76)
        at com.company.test.RestTest2.runTest(RestTest2.java:375)
        at org.apache.jmeter.protocol.java.sampler.JavaSampler.sample(JavaSampler.java:191)
        at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:429)
        at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:257)
        at java.lang.Thread.run(Thread.java:744)

Part of the application.conf : ....

db.pool.timeout=100000

play {
  akka {
    akka.loggers = ["akka.event.Logging$DefaultLogger", "akka.event.slf4j.Slf4jLogger"]
    loglevel = WARNING
    actor {
      default-dispatcher = {
        fork-join-executor {
          parallelism-factor = 64
          parallelism-max = 1000
        }
      }
    }
  }
}

回答1:


There a many things to check:

  • Are you running Test from same machine ? if yes it's a problem

  • Is your machine TCP stack tuned ?

  • What is your JVM configuration regarding Xmx as long as your machine memory, CPU ...

  • What does your test look like ? could you show a screenshot with all elements unfolded ?

I think Play/AKKA can handle this load without problem so I would look into configuration issues.



来源:https://stackoverflow.com/questions/24588084/rest-server-play-framework-gets-read-timed-out-exception-during-load-test

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!