0

I have deployed a simple Servlet web application on Wildfly 8.2.1 on RHEL 6.9. This application just takes post request and respond with 200 OK.

Now when the client(java client using apache-common-http client) is posting data on the web application. The web application is accepting the request but many of the requests are failing also with ERROR "Caused by java.net.ConnectException: Connection timed out (Connection timed out)" at the client side.

Here my assumption is, Wildfly has some default value for max Http connection which can be opened at any point in time. if further requests are coming which require opening a new connection, web server is rejecting them all.

could anyone here please help me with below question:

  • How can we check live open HTTP connections in RHEL 6.9. I mean command in RHEL to check how many connection open on port 8080?

  • How can we tweak the default value of the HTTP connection in wildfly?

  • Does HTTP connection and max thread count linked with each other. If So, Please let me know how they should be updated in wildfly configuration(standalone.xml).

  • How many requests can be kept in the queue by Wildfly? what will be happening to the request coming to wildfly server if the queue is full.

NOTE: It is a kind of load testing for the webserver where traffic is high, not sure about exact value but it's high.

Rohit
  • 406
  • 1
  • 5
  • 21
  • You have shown no code and asked at least 4 questions. We need many more details to assist. – stdunbar Jun 02 '20 at 14:37
  • I got you point. but all my questions are related to widlfly and one is related to rhel. So, i don't feel like coping code for that. BTW for you information, there is nothing much in code for web app. i have created one simple servlet java file where dopost is accepting the post request and just responding back with 200 OK nothing else. – Rohit Jun 02 '20 at 17:57
  • Your description is unclear. Do you have a single client or are you trying to do this at scale? – Will Tatam Jun 02 '20 at 19:07
  • Here client is Jmeter testing tool. which i am running 100 calls per second. means 100 requests are hitting to web server in 1 second. – Rohit Jun 02 '20 at 19:19

1 Answers1

0

You're getting into some system administration topics but I'll answer what I can. First and foremost - Wildfly 8.2.1 is part of the very first release of Wildfly and I'd strongly encourage upgrading to a newer version.

To check the number of connections in a Unix-like environment you'll want to use the netstat command line. In your case, something like:

netstat -na | grep 8080 | grep EST

This will show you all the connections that are ESTABLISHED to port 8080. That would give you an snapshot of the number of connections. Pipe that to wc to get a count.

Next, finding documentation on Wildfly 8.2.1 is a bit challenging now but Wildfly 8 uses Undertow for the socket IO. That in turn uses XNIO. I found a thread that goes into some detail about configuring the I/O subsystem. Note that Wildfly 8.2.1 uses Undertow 1.1.8 which isn't documented anywhere I could find.

For your last two questions I believe they're related to the second one - the XNIO configuration includes configuration like:

<subsystem xmlns="urn:jboss:domain:io:1.0">
    <worker name="default" io-threads="5" task-max-threads="50"/>
    <buffer-pool name="default" buffer-size="16384" buffers-per-slice="128"/>
</subsystem>

but you'll need to dig deeper into the docs for details.

In Wildfly 19.1.0.Final the configuration looks similar to the code above other than the version is now 3.0.

stdunbar
  • 16,263
  • 11
  • 31
  • 53