We have Tomcat servers running on 2 different machines. There is a hardware load balancer which decides request should go to which tomcat server. Lets call these tomcat server AppSrv1 and AppSrv2.
At times we need to do some content uploading stuff (using a web app) on one of these production servers (both use the same database). But while we are doing this content uploading stuff the load on these servers increase a lot (since onine users are alos using it) and we start getting OutOfmemory errors.
Tomcat on both these machines is running as a service.
TO solve this problem what we have been suggested now is that in AppSrv2, we should run the same tomcat server on another port (say 8086) as well. Is it possible to run the same tomcat service on 2 ports? The idea is that when the content team tries to load the content they'll bypass the loadbalancer and directly send a request to port 8086. So the 2 default ports (8080 on both machines will be free to take care of client requests).
What I want to know is that, even when we have tomcat services running on 2 ports (in same machine), since they'll be using the same JVM will the above help. I feel only one heap is created for both the instances of tomcat on AppSrv2 but I told that since it'll be a seperate process two heaps will be created. The content team will use one port which will have one heap, while the online users will use another (8080) port which will use a seperate heap. Please give your comments on the above.
If I do this, and suppose there is OutOfMemoryException in one app (say the content app) which is running on port 8086, but the one on 8080 is working fine. Now to make the app on 8086 I'll need to restart the tomcat server, will that mean that tomcat on 8080 will also be restarted (since there is only one instance). Is there a way to restart just the instance running on one port?