When I start Tomcat (64 bit) on 64 bit Windows my application (Solr) starts giving Out of Memory Errors. I have allocated min/max heap of 5GB for both to Tomcat using Windows Environment variable CATALINA_OPTS.
However when I start tomcat on command line using startup.bat it does not give any such errors and my application is touching 5GB so it is clear that it is taking into consideration the min/max heap committed.
Now my question is: Do I need to do any additional stuff while starting tomcat as a service, I mean setting some params etc? For less Index size on Solr everything seems to be fine in Tomcat. This problem happens for large index sizes. Is it not picking up CATALINA_OPTS while running as a service?