-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Ayub,
On 5/27/20 09:26, Ayub Khan wrote: > previously I was using HTTP/1.1 connector, recently I changed to > NIO2 to see the performance. I read that NIO2 is non blocking so > trying to check how this works. Both NIO and NIO2 are non-blocking. They use different strategies for certain things. Anything but the "BIO" connector will be non-blocking for most operations. The default is NIO. > which connector protocol do you recommend and best configuration > for the connector ? This depends on your environment, usage profile, etc. Note that non-blocking IO means more CPU usage: there is a trade-off. > Which stable version of tomcat would you recommend ? Always the latest, of course. Tomcat 8.0 is unsupported, replaced by Tomcat 8.5. Tomcat 9.0 is stable and probably the best version if you are looking to upgrade. Both Tomcat 8.5 and 9.0 are continuing to get regular updates. But definitely move away from 8.0. > Are there any ubuntu specific configs for tomcat ? No. There is nothing particular special about Ubuntu. Linux is one of the most well-performing platforms for the JVM. I wouldn't recommend switching platforms. Why are you using nginx? You already have load-balancing happening in the ALB. Inserting another layer of proxying is probably just adding another buffer to the mix. I'd remove nginx if it's not providing any specific, measurable benefit. > We are using OkHttp client library to call rest api and stack trace > shows failure at the api call. The api being called is running on > the same tomcat instance (different context) usring url localhost. > This does not happen when number of requests is less. Your Tomcat server is calling this REST API? Or your server is serving those API requests? If your service is calling itself, then you have to make sure you have double-capacity: every incoming request will cause a loopback request to your own service. Other than the timeouts, are you able to handle the load with your existing infrastructure? Sometimes, the solution is simply to throw most hardware at the problem. - -chris > On Wed, May 27, 2020 at 11:48 AM Mark Thomas <ma...@apache.org> > wrote: > >> On 26/05/2020 23:28, Ayub Khan wrote: >>> Hi, >>> >>> During high load I am seeing below error on tomcat logs >>> >>> java.util.concurrent.ExecutionException: java.net >> .SocketTimeoutException: >>> timeout >> >> And the rest of that stack trace? It is hard to provide advice >> without context. We need to know what is timing out when trying >> to do what. >> >>> We have 4 C5.18x large vms running tomcat 8 behind AWS >>> application load balancer. We are seeing socket timeouts during >>> peak hours. What should be the configuration of tomcat if we >>> get 60,000 to 70,000 requests per >> minute >>> on an average ? >>> >>> Tomcat 8.0.32 on Ubuntu 16.04.5 LTS >> >> Tomcat 8.0.x is no longer supported. >> >>> Below is the java version: >>> >>> java version "1.8.0_181" Java(TM) SE Runtime Environment (build >>> 1.8.0_181-b13) Java HotSpot(TM) 64-Bit Server VM (build >>> 25.181-b13, mixed mode) >>> >>> >>> Below is the server.xml connector configuration: >>> >>> <Connector port="8080" >>> protocol="org.apache.coyote.http11.Http11Nio2Protocol" >> >> Why NIO2? >> >> Mark >> >> >>> connectionTimeout="20000" >>> >>> URIEncoding="UTF-8" redirectPort="8443" /> >>> >>> We have 4 C5.18x large vms and each vm has nginx and tomcat >>> instance running. All the 4 vms are connected to AWS >>> application load balancer. >>> >>> I tried to add maxConnections=50000 but this does not seem to >>> have any affect and still saw the timeouts >>> >>> Thanks and Regards Ayub >>> >> >> >> --------------------------------------------------------------------- >> >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> > -----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl7Oe3QACgkQHPApP6U8 pFgNAA//bXoa3Qj+pdop9CizhO1KAja/HSx5Jl1rcFTTQRvDQ79QyWOX/X/21W8A /ub98MZVBe2K5G5y/SkHYcCkgtNvtI1dPikmgI8DO0PW2kJsEdjVz9KWg9zvC4ae zBtW0xQ5tD3h8AHboQ9jz4FgWuq18RI+pMgdmfJgRbfaalQ4ZbKwVjnqCseqf6do IyXbu430qUDHc/uaWKIpMgZbl4Gz/2+fznEHQvgxgQt+nl4GvPZP5JErVC5b5Z0+ bhGGWatHi2kHSehRpo70A0/8/xC3TabQ4uwkxJiQaluWeZg8RoUhBT18Oo4Fx9/p CAqsF/8u1zEWA2CERfo2QBTuahX76Gc9e224+MqSyWCIhVF3WiuliNApursXa0ZK HVi+JgWRHjyCbE1TQ7JoLcpudy0OIQbxY8rslmfcOafdUx6sdssMZ1egGM/GPV4N Fce75ZLHlTCbtjQVzPGp64SiU84mwLtN7OPVwNVDl7hdHPsx/eXTSHNTEoG5pSPP rxMnuCcHwKf9OH7ZAchzs6ob7n1npJsJwt77KRyO6iIt3LY9zdIsV5jqSC8hhMB5 xUQ9ejwd4OgFtUZwnnaxiBMHuPfVb9TaAoJx8tnQZ/8beC+ESjYqfvGh5GuKWOXn WdNpaxoSikQduNOHt1xazOvVHNZQq/tBvuDsJtL+2sl3UBlLgz4= =UqCU -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org