Increase maximum http concurrent connection

hi Profs
I have project implemented on Playframwork.
I’m trying to test maximum concurrent requests
Currently, I have 2 clients, each 500 threads (~1000 threads in total) continuously make requests to server
each request processed in ~1s. Already implemented as Async ( CompletionStage)

I also tryied config like How to increase max connection on play with akka stream

But I still got exception at client side:
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)

I think It reach the limit of concurrent connections (I tried, and it works with 2x250 threads)
How to increase concurrent connections capacity of Play/Netty? (I think I should related to Netty/internal threadpool, but don’t know how)
I need as much as possible (My server has 12Gb, Core I7)

Where are you seeing this exception? Are you sure this limit is imposed by Play server and not a proxy or even the OS? How are you starting the application (dev or prod mode)?

Best.

I got exception at client side
Start it by sbt /run

I figured it out
Need to switch to NetterServer by update build.sbt like this https://www.playframework.com/documentation/2.7.x/NettyServer
By default (Since 2.6) Play using AkkaHttpServer