Re: tomcat 8.5 config for ecommerce site, seeing request timeouts

2020-06-04 Thread Ayub Khan
Chris, It is fatal and keeps throwing the error. I have to restart tomcat as the apis stop responding.APIs return 502. On Fri, Jun 5, 2020 at 12:37 AM Christopher Schultz < ch...@christopherschultz.net> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Ayub, > > On 6/4/20

Re: tomcat 8.5 config for ecommerce site, seeing request timeouts

2020-06-04 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Ayub, On 6/4/20 12:52, Ayub Khan wrote: > Sure I will use DNS and try to change the service calls. > > Also once in a while we see the below error and tomcat stops > serving requests. Could you please let me know the cause of this > issue ? > >

Re: tomcat 8.5 config for ecommerce site, seeing request timeouts

2020-06-04 Thread Ayub Khan
Chris Sure I will use DNS and try to change the service calls. Also once in a while we see the below error and tomcat stops serving requests. Could you please let me know the cause of this issue ? org.apache.tomcat.util.net.NioEndpoint$Acceptor run SEVERE: Socket accept failed

Re: tomcat 8.5 config for ecommerce site, seeing request timeouts

2020-06-04 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Ayub, On 6/4/20 11:05, Ayub Khan wrote: > Christopher Schultz wrote: >> There's no particular reason why a request to node1:/app1 needs >> to have its loopback request call node1:/app2, is there? Can >> node1:/app1 call node2:/app2? > > > Yes we

Re: tomcat 8.5 config for ecommerce site, seeing request timeouts

2020-06-04 Thread Ayub Khan
Mark, There's no particular reason why a request to node1:/app1 needs to have its loopback request call node1:/app2, is there? Can node1:/app1 call node2:/app2? Yes we can do that but then we would have to use the DNS urls and wont this cause network latency compared to a localhost call ?

Re: tomcat 8.5 config for ecommerce site, seeing request timeouts

2020-06-04 Thread Ayub Khan
Mark, There's no particular reason why a request to node1:/app1 needs to have its loopback request call node1:/app2, is there? Can node1:/app1 call node2:/app2? Yes we can do that but then we would have to use the DNS urls and wont this cause network latency compared to a localhost call ?

Re: tomcat 8.5 config for ecommerce site, seeing request timeouts

2020-06-01 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Ayub, On 6/1/20 11:12, Ayub Khan wrote: > Chris, > > As you described I have added two new connectors in server.xml and > using nginx to redirect requests to different connector ports. > Also configured nginx to route traffic of each app on a

Re: tomcat 8.5 config for ecommerce site, seeing request timeouts

2020-06-01 Thread Ayub Khan
Chris, As you described I have added two new connectors in server.xml and using nginx to redirect requests to different connector ports. Also configured nginx to route traffic of each app on a different connector port of tomcat In config of each app I am using port specific for the app which is

Re: tomcat 8.5 config for ecommerce site, seeing request timeouts

2020-06-01 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Ayub, On 5/31/20 09:20, Ayub Khan wrote: > On single tomcat instance how to map each app to different port > number? You'd have to use multiple elements, which means separate everything and not just the . It's more work on the Tomcat side with

Re: tomcat 8.5 config for ecommerce site, seeing request timeouts

2020-05-31 Thread Ayub Khan
Chris, On single tomcat instance how to map each app to different port number? On Sun, 31 May 2020, 15:44 Christopher Schultz, < ch...@christopherschultz.net> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Ayub, > > On 5/29/20 20:23, Ayub Khan wrote: > > Chris, > > > > You might

Re: tomcat 8.5 config for ecommerce site, seeing request timeouts

2020-05-31 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Ayub, On 5/29/20 20:23, Ayub Khan wrote: > Chris, > > You might want (2) and (3) to have their own, independent > connector and thread pool, just to be safe. You don't want a > connection in (1) to stall because a loopback connection can't be >

Re: tomcat 8.5 config for ecommerce site, seeing request timeouts

2020-05-29 Thread Ayub Khan
Chris, You might want (2) and (3) to have their own, independent connector and thread pool, just to be safe. You don't want a connection in (1) to stall because a loopback connection can't be made to (2)/(3). Meanwhile, it's sitting there making no progress but also consuming a connection+thread.

Re: tomcat 8.5 config for ecommerce site, seeing request timeouts

2020-05-29 Thread Ayub Khan
Chris, You might want (2) and (3) to have their own, independent connector and thread pool, just to be safe. You don't want a connection in (1) to stall because a loopback connection can't be made to (2)/(3). Meanwhile, it's sitting there making no progress but also consuming a connection+thread.

Re: tomcat 8.5 config for ecommerce site, seeing request timeouts

2020-05-29 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Ayub, On 5/28/20 17:25, Ayub Khan wrote: > Nginx is being used for image caching and converting https to http > requests before hitting tomcat. So you encrypt between the ALB and your app server nodes? That's fine, though nginx probably won't

Re: tomcat 8.5 config for ecommerce site, seeing request timeouts

2020-05-28 Thread Ayub Khan
Chris, Nginx is being used for image caching and converting https to http requests before hitting tomcat. The behavior I am noticing is application first throws Borken pipe client abort exception at random apis calls followed by socket timeout and then database connection leak errors. This

Re: tomcat 8.5 config for ecommerce site, seeing request timeouts

2020-05-28 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Ayub, On 5/27/20 19:43, Ayub Khan wrote: > If we have 18 core CPU and 100GB RAM. What value can I set for > maxConnections ? Your CPU and RAM really have nothing to do with it. It's more about your usage profile. For example, if you are serving

Re: tomcat 8.5 config for ecommerce site, seeing request timeouts

2020-05-27 Thread Ayub Khan
Chris, Thank you for the input. We will upgrade tomcat and also text on the linux vm. I read the documentation of tomcat that maxConnections parameter refers to the number of connections it can serve. If we have 18 core CPU and 100GB RAM.What value can I set for maxConnections ? Want to make

Re: tomcat 8.5 config for ecommerce site, seeing request timeouts

2020-05-27 Thread Christopher Schultz
-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.

Re: tomcat 8.5 config for ecommerce site, seeing request timeouts

2020-05-27 Thread Ayub Khan
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. which connector protocol do you recommend and best configuration for the connector ? Which stable version of tomcat would you

Re: tomcat 8.5 config for ecommerce site, seeing request timeouts

2020-05-27 Thread Mark Thomas
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

tomcat 8.5 config for ecommerce site, seeing request timeouts

2020-05-26 Thread Ayub Khan
Hi, During high load I am seeing below error on tomcat logs java.util.concurrent.ExecutionException: java.net.SocketTimeoutException: timeout 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