Win a copy of Machine Learning with R: Expert techniques for predictive modeling this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Tomcat 8444 port stops working after a request

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have a REST API web application hosted on Tomcat 8.0 server. This tomcat is accessed by 8444 port from the Load balancer URL.When we add the ADFS authentication for these REST API calls, the API calls are working for one request. After one successful request, the URL stops responding and when we check the local URL the 8444 port url also stops responding , the tomcat doesnot get any requests /logs at this time. The 8080 port is stable always. But as we are using this secure port the entire web application is not responding.
If we remove ADFS the API calls are working fine.
We would like to understand the scenarios when this 8444 port/tomcat stops responding and any logging that allows us to know whats stopping the 8444 port.


Thanks,
Chandrika
 
Saloon Keeper
Posts: 21139
134
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch, Chandrika!

Usually when fronting Tomcat with a proxy or load balancer, the front-end talks to Tomcat via either ports 8080/8443 or, if it's using the AJP proxy protocol, via port 8009. So if you are using port 8444, I'm assuming that you have overridden the default port setup. If you could show me the portion of your server.xml that defines that port, it would be helpful.

Tomcat operates as a pipeline. When requests come in on a request port, Tomcat simply queues them up and passes them on to the next stage in the pipeline, where a dispatcher finds a free service thread in its thread pool and hands off the request to that thread. It only "stops responding" on a port when requests are not serviced fast enough and the request queue fills up. The default queue size allows for at least several dozen pending requests, so in normal operation, this is not a problem. The only time you should see a port stop responding is if you have lots of concurrent requests but the web applications cannot process them faster than they come in. That will happen if the web applications are very inefficient or poorly-written (for example, they wait on some long-running external process).

So while an occasional "bounce" of requests can be addressed by enlarging the connection request queue in Tomcat, frequent rejections require that the applications be optimized, and/or that additional servers be added to the cluster. And, of course that you check the load balancer to make sure that it is truly dealing requests out to the backends in a balanced manner and not simply dumping most of them on a single (or few) backend(s).

Check the Tomcat logs. They may offer useful messages.
 
Ruth Stout was famous for gardening naked. Just like this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!