1

Using Spring and Wildfly, I have noticed that my rest services can only handle one request at a time. I have tried a few different configurations to attempt to allow multiple requests run asynchronously from the same client machine. I am assuming that I missed a configuration in the Wildfly io subsystem, but my Google searching is not proving fruitful.

At first I thought it was a browser issue as I was using Chrome, IE, and Firefox. I then created a multithreaded java client to send multiple requests and still experienced the issue. I have created a multithreaded Perl script to send multiple requests, again same issue... the rest service will only process one request at a time and the rest are queued.

From my testing, it would appear the softwares are sending the requests as appropriate. I have used WireShark and see all the requests leaving the software and attempting to hit the servers.

I have tried eliminating factors such as load balancers and Apache from the mix further emphasizing the point that it must be Wildfly. In my local testing, I point directly at Wildfly and see the same behavior.

Without introducing any kind of additional frameworks for Rest or XML processing, I would like to call the same service simultaneously across X number of requests.

For reference, the entirety of the network architecture is client -> (SSL) BigIP LB -> (SSL) Apache -> (AJP/SSL) Wildfly

I have updated the Wildfly io subsystem to increase the number of worker threads and increased the task-max-threads:

{
    "outcome" => "success",
    "result" => {
        "buffer-pool" => {"default" => {
            "buffer-size" => undefined,
            "buffers-per-slice" => undefined,
            "direct-buffers" => undefined
        }},
        "worker" => {"default" => {
            "io-threads" => 50,
            "stack-size" => 0L,
            "task-keepalive" => 60,
            "task-max-threads" => 300
        }}
    }
}

Can anyone suggest if the issue is a Wildfly configuration issue, or is this a Java servlets issue, perhaps even a Spring issue?

Thank you.

javafreak
  • 301
  • 1
  • 3
  • 9
  • Do you need to do REST asynchronously? https://spring.io/guides/gs/async-method/ – K.Nicholas Jun 06 '17 at 16:54
  • I need the calls to be synchronous since I need the responses right away. I am trying to run multiple uploads of data at once and acting on the responses in one scenario, another scenario just trying to grab multiple sets of data at once for presentation – javafreak Jun 06 '17 at 16:59
  • A simple Spring/Widlfy/Spring MVC seems to be handling multiple requests simultaneously for me. – K.Nicholas Jun 06 '17 at 20:56
  • Have you tried making multiple requests straight to WildFly? It would be best to test without Apache and the rest of the stuff in front. – James R. Perkins Jun 07 '17 at 15:32

1 Answers1

0

This was an issue with my logging, I see the transactions processing simultaneously. After further analysis, all is working as designed.

javafreak
  • 301
  • 1
  • 3
  • 9