RE: Tomcat memory

2016-02-21 Thread Gokul . Baskaran
Thanks again, to make things clear. When I meant default, what is the default 
min and max that is given to an application if there nothing defined in the JVM 
?

In my case, the Tomcat is running on windows and I don't have setenv.bat or 
sentenv.sh or even catalina.bat and catalina.conf does not have the OPT config 
for min and max. HTH

Thank you

-Gokul


-Original Message-
From: Olaf Kock [mailto:tom...@olafkock.de] 
Sent: Sunday, February 21, 2016 3:04 PM
To: Tomcat Users List 
Subject: Re: Tomcat memory

grep mx bin/* found only settings in setenv.sh in my installation - this lets 
me state that there are no defaults: setenv.sh is not contained in the 
distribution but will be read in case it's found in the file system.
Thus there's no tomcat default that I'm aware of. Anybody who distributes 
tomcat with a setenv.sh might have a sensible default for their embedded 
application, but the raw distribution AFAIK has none.

Safe assumption should be: Whatever the JVM thinks is appropriate is the 
default.

Create a setenv.sh or setenv.bat and set CATALINA_OPTS to the desired value, 
e.g. "-Xms 2048m -Xmx2048m" (but there will probably be more settings, e.g. for 
tuning the garbage collector...

(apologies in case this goes out after the problem has long been solved:
I'm in a hotel that blocks SMTP and have to find a way to send mail from
here)

Olaf

Am 21.02.2016 um 18:23 schrieb Gokul.Baskaran:
> Question was for Java 7
>
> It is a Tomcat / Application question as well, as memory default can be 
> configured in the application config. 
>
> I totally agree that the best practice is to set the Xms and -Xmx. As am 
> going to change the config, I would curious to know if the tomcat ui or the 
> catalina does not have a Xms and -Xmx, would it default to 400MB? I read this 
> in another forum. 
>
> -Gokul
>
>
> -Original Message-
> From: Olaf Kock [mailto:tom...@olafkock.de]
> Sent: Sunday, February 21, 2016 3:14 AM
> To: Tomcat Users List 
> Subject: Re: Tomcat memory
>
> This is rather a Java than a tomcat question:
>
> The JVM allocates memory based on whatever default your current JVM 
> version decides (you don't mention what version of Java you're on)
>
> From a text on
> http://docs.oracle.com/javase/7/docs/technotes/guides/vm/gc-ergonomics
> .html
> that's linked from my Java's manpage:
>
> *initial heap size*
>
> Larger of 1/64th of the machine's physical memory on the machine
> or some reasonable minimum. Before J2SE 5.0, the default initial
> heap size was a reasonable minimum, which varies by platform.
> You can override this default using the |-Xms| command-line option.
>
> *maximum heap size*
>
> Smaller of 1/4th of the physical memory or 1GB. Before J2SE 5.0,
> the default maximum heap size was 64MB. You can override this
> default using the |-Xmx| command-line option.
>
> *Note:* The boundaries and fractions given for the heap size are
> correct for J2SE 5.0. They are likely to be different in subsequent
> releases as computers get more powerful.
>
> Note that this is from JavaSE7 and even mentions 5 - with more power there 
> comes more initial and maximum memory defaults.
>
> I'm not aware of the actual development of the default memory - mostly 
> because I consider it good practice to know what an application uses 
> and provide it explicitly, rather than relying on defaults. (and 
> frankly, on the applications that I see, the default typically is not 
> even enough - let alone a good basis for tuning)
>
> While we're at it: For production systems I consider it good practice to set 
> -Xms and -Xmx to the same value. Reason: If you don't have enough memory 
> available, you want to know this when the process starts, not days later when 
> it tries to allocate "the rest" - typically sunday night at 3am.
>
> Olaf
>
> Am 21.02.2016 um 03:39 schrieb Gokul.Baskaran:
>> Hi,
>>
>> I am currently running tomcat 7 in Windows 2012.
>>
>> The current JVM Heap memory parameters are set to empty, does the JVM Heap 
>> memory utilize the entire memory of the OS or does it default to a specific 
>> memory number?
>>
>> Thank you
>> -Gokul
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat memory

2016-02-21 Thread Christopher Schultz
Gokul,

On 2/21/16 12:23 PM, Gokul.Baskaran wrote:
> Question was for Java 7

Answer was for Java 7

> It is a Tomcat / Application question as well, as memory default can
> be configured in the application config.

Not true: JVM memory is shared amongst all the "applications" you deploy
on it. This question has nothing to do with Tomcat specifically. That
doesn't mean it's inappropriate to post it here. Olaf was just pointing
out that his wasn't a Tomcat-specific answer.

> I totally agree that the best practice is to set the Xms and -Xmx. As
> am going to change the config, I would curious to know if the tomcat
> ui or the catalina does not have a Xms and -Xmx, would it default to
> 400MB? I read this in another forum.

Tomcat does not set any defaults. Any heap sizes you get are either
being automatically set based upon your JVM's defaults, or you have
specified them yourself.

-chris

> -Original Message- From: Olaf Kock
> [mailto:tom...@olafkock.de] Sent: Sunday, February 21, 2016 3:14 AM 
> To: Tomcat Users List  Subject: Re: Tomcat
> memory
> 
> This is rather a Java than a tomcat question:
> 
> The JVM allocates memory based on whatever default your current JVM
> version decides (you don't mention what version of Java you're on)
> 
>> From a text on
> http://docs.oracle.com/javase/7/docs/technotes/guides/vm/gc-ergonomics.html
>
> 
that's linked from my Java's manpage:
> 
> *initial heap size*
> 
> Larger of 1/64th of the machine's physical memory on the machine or
> some reasonable minimum. Before J2SE 5.0, the default initial heap
> size was a reasonable minimum, which varies by platform. You can
> override this default using the |-Xms| command-line option.
> 
> *maximum heap size*
> 
> Smaller of 1/4th of the physical memory or 1GB. Before J2SE 5.0, the
> default maximum heap size was 64MB. You can override this default
> using the |-Xmx| command-line option.
> 
> *Note:* The boundaries and fractions given for the heap size are 
> correct for J2SE 5.0. They are likely to be different in subsequent 
> releases as computers get more powerful.
> 
> Note that this is from JavaSE7 and even mentions 5 - with more power
> there comes more initial and maximum memory defaults.
> 
> I'm not aware of the actual development of the default memory -
> mostly because I consider it good practice to know what an
> application uses and provide it explicitly, rather than relying on
> defaults. (and frankly, on the applications that I see, the default
> typically is not even enough - let alone a good basis for tuning)
> 
> While we're at it: For production systems I consider it good practice
> to set -Xms and -Xmx to the same value. Reason: If you don't have
> enough memory available, you want to know this when the process
> starts, not days later when it tries to allocate "the rest" -
> typically sunday night at 3am.
> 
> Olaf
> 
> Am 21.02.2016 um 03:39 schrieb Gokul.Baskaran:
>> Hi,
>> 
>> I am currently running tomcat 7 in Windows 2012.
>> 
>> The current JVM Heap memory parameters are set to empty, does the
>> JVM Heap memory utilize the entire memory of the OS or does it
>> default to a specific memory number?
>> 
>> Thank you -Gokul
>> 
>> 
> 
> 
> -
>
> 
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Enabling SSLv2 on Tomcat 7 !

2016-02-21 Thread Christopher Schultz
Utkarsh,

On 2/21/16 11:02 AM, Utkarsh Dave wrote:
> Thanks Chris for the response.
> Yes, I meant SSLv2Hello. I understand the vulnerabilities in SSL. Though
> some of the client need that flexibility in older versions, so was digging
> the reason it was working in prior version of Tomcat.
> Can you help me in identifying any change in Tomcat due to which SSLv2Hello
> handshake started failing in newer versions of tomcat

Tomcat needs no other configuration than to specify SSLv2Hello as one of
the protocols to support.

-chris

> On Fri, Feb 19, 2016 at 8:56 PM, Christopher Schultz <
> ch...@christopherschultz.net> wrote:
> 
> Utkarsh,
> 
> On 2/19/16 7:05 AM, Utkarsh Dave wrote:
 I upgraded my tomcat from 7.0.53 ( that was having SSL protocols
 enable) to 7.0.67 (that has by default SSL protocols disable).

 To re enable support for SSLv3 and SSLv2, i modified the server.xml
 inside $TOMCAT_HOME/conf to replace sslProtocol="TLS" with
 sslEnabledProtocols="SSLv2,SSLv3,TLSv1"

 I can test the SSLv3 requests successfully now , but SSLv2 requests
 still fails. They were processing through success before the
 upgrade of Tomcat.

 I am using the JDK1.6 and Redhat platform and openssl version
 0.9.8h.

 Please let me know if i can enable SSLv2 on the newer Tomcat.
> 
> I think you mean "SSLv2Hello", not "SSLv2".
> 
> But please, just let SSL die.
> 
> -chris
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>
> 

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat memory

2016-02-21 Thread Olaf Kock
grep mx bin/* found only settings in setenv.sh in my installation - this
lets me state that there are no defaults: setenv.sh is not contained in
the distribution but will be read in case it's found in the file system.
Thus there's no tomcat default that I'm aware of. Anybody who
distributes tomcat with a setenv.sh might have a sensible default for
their embedded application, but the raw distribution AFAIK has none.

Safe assumption should be: Whatever the JVM thinks is appropriate is the
default.

Create a setenv.sh or setenv.bat and set CATALINA_OPTS to the desired
value, e.g. "-Xms 2048m -Xmx2048m" (but there will probably be more
settings, e.g. for tuning the garbage collector...

(apologies in case this goes out after the problem has long been solved:
I'm in a hotel that blocks SMTP and have to find a way to send mail from
here)

Olaf

Am 21.02.2016 um 18:23 schrieb Gokul.Baskaran:
> Question was for Java 7
>
> It is a Tomcat / Application question as well, as memory default can be 
> configured in the application config. 
>
> I totally agree that the best practice is to set the Xms and -Xmx. As am 
> going to change the config, I would curious to know if the tomcat ui or the 
> catalina does not have a Xms and -Xmx, would it default to 400MB? I read this 
> in another forum. 
>
> -Gokul
>
>
> -Original Message-
> From: Olaf Kock [mailto:tom...@olafkock.de] 
> Sent: Sunday, February 21, 2016 3:14 AM
> To: Tomcat Users List 
> Subject: Re: Tomcat memory
>
> This is rather a Java than a tomcat question:
>
> The JVM allocates memory based on whatever default your current JVM version 
> decides (you don't mention what version of Java you're on)
>
> From a text on
> http://docs.oracle.com/javase/7/docs/technotes/guides/vm/gc-ergonomics.html
> that's linked from my Java's manpage:
>
> *initial heap size*
>
> Larger of 1/64th of the machine's physical memory on the machine
> or some reasonable minimum. Before J2SE 5.0, the default initial
> heap size was a reasonable minimum, which varies by platform.
> You can override this default using the |-Xms| command-line option.
>
> *maximum heap size*
>
> Smaller of 1/4th of the physical memory or 1GB. Before J2SE 5.0,
> the default maximum heap size was 64MB. You can override this
> default using the |-Xmx| command-line option.
>
> *Note:* The boundaries and fractions given for the heap size are
> correct for J2SE 5.0. They are likely to be different in subsequent
> releases as computers get more powerful.
>
> Note that this is from JavaSE7 and even mentions 5 - with more power there 
> comes more initial and maximum memory defaults.
>
> I'm not aware of the actual development of the default memory - mostly 
> because I consider it good practice to know what an application uses and 
> provide it explicitly, rather than relying on defaults. (and frankly, on the 
> applications that I see, the default typically is not even enough - let alone 
> a good basis for tuning)
>
> While we're at it: For production systems I consider it good practice to set 
> -Xms and -Xmx to the same value. Reason: If you don't have enough memory 
> available, you want to know this when the process starts, not days later when 
> it tries to allocate "the rest" - typically sunday night at 3am.
>
> Olaf
>
> Am 21.02.2016 um 03:39 schrieb Gokul.Baskaran:
>> Hi,
>>
>> I am currently running tomcat 7 in Windows 2012.
>>
>> The current JVM Heap memory parameters are set to empty, does the JVM Heap 
>> memory utilize the entire memory of the OS or does it default to a specific 
>> memory number?
>>
>> Thank you
>> -Gokul
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Tomcat gracefully shutdown when run with Apache Spark

2016-02-21 Thread Eranga Samararathna
Tomcat version: 7.0.47

I have a web application which uses Apache Spark. My web application act as
a Apache spark driver program.

When remote standalone spark cluster is not available then Spark context is
shutting down with log org.apache.spark.util.Utils - Shutdown hook called

Sooner this happens Tomcat also starting to shut down gracefully. The only
log I can see in tomcat is [exec] Result: 50

What would be the reason for Tomcat to shutting down when spark calling
it's shut down hook ?

Thanks

Eranga


RE: Tomcat memory

2016-02-21 Thread Gokul . Baskaran
Question was for Java 7

It is a Tomcat / Application question as well, as memory default can be 
configured in the application config. 

I totally agree that the best practice is to set the Xms and -Xmx. As am going 
to change the config, I would curious to know if the tomcat ui or the catalina 
does not have a Xms and -Xmx, would it default to 400MB? I read this in another 
forum. 

-Gokul


-Original Message-
From: Olaf Kock [mailto:tom...@olafkock.de] 
Sent: Sunday, February 21, 2016 3:14 AM
To: Tomcat Users List 
Subject: Re: Tomcat memory

This is rather a Java than a tomcat question:

The JVM allocates memory based on whatever default your current JVM version 
decides (you don't mention what version of Java you're on)

>From a text on
http://docs.oracle.com/javase/7/docs/technotes/guides/vm/gc-ergonomics.html
that's linked from my Java's manpage:

*initial heap size*

Larger of 1/64th of the machine's physical memory on the machine
or some reasonable minimum. Before J2SE 5.0, the default initial
heap size was a reasonable minimum, which varies by platform.
You can override this default using the |-Xms| command-line option.

*maximum heap size*

Smaller of 1/4th of the physical memory or 1GB. Before J2SE 5.0,
the default maximum heap size was 64MB. You can override this
default using the |-Xmx| command-line option.

*Note:* The boundaries and fractions given for the heap size are
correct for J2SE 5.0. They are likely to be different in subsequent
releases as computers get more powerful.

Note that this is from JavaSE7 and even mentions 5 - with more power there 
comes more initial and maximum memory defaults.

I'm not aware of the actual development of the default memory - mostly because 
I consider it good practice to know what an application uses and provide it 
explicitly, rather than relying on defaults. (and frankly, on the applications 
that I see, the default typically is not even enough - let alone a good basis 
for tuning)

While we're at it: For production systems I consider it good practice to set 
-Xms and -Xmx to the same value. Reason: If you don't have enough memory 
available, you want to know this when the process starts, not days later when 
it tries to allocate "the rest" - typically sunday night at 3am.

Olaf

Am 21.02.2016 um 03:39 schrieb Gokul.Baskaran:
> Hi,
>
> I am currently running tomcat 7 in Windows 2012.
>
> The current JVM Heap memory parameters are set to empty, does the JVM Heap 
> memory utilize the entire memory of the OS or does it default to a specific 
> memory number?
>
> Thank you
> -Gokul
>
>


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: context doesnt pick up

2016-02-21 Thread Mark Thomas
On 20/02/2016 22:40, Me Self wrote:
> Hi All
> 
> When I put the context in server.xml it works fine, but if I put the same
> context tag in a xml file under /conf/Catalina/localhost/test.xml then
> tomcat doesn't pick it up. I would rather want to use the latter.

You need to set deployOnStartup="true" for that to work.

Mark


> 
> The test.xml is
> 
> 
> 
> Its a set up where the tomcat user has no write access to /webapps only
> read. The war has been exploded to /webapps/test. Auto deployment is
> disabled. In server.xml I have autoDeploy="false" deployOnStartup="false",
> unpackWARS="false". The tomcat user only has read access to
> /conf/Catalina/localhost/test.xml. Its tomcat 8 on linux.
> 
> What Am I missing?
> 


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: context doesnt pick up

2016-02-21 Thread George Sexton



On 2/20/2016 4:28 PM, Me Self wrote:

I already tried an empty Context tag and no Context tag, makes no
difference. Catalina.out has not error. I tried setting logging level FINE
to see if there were anything related to how it scans
conf/Catalina/localhost/ but nothing.


Have you carefully checked your permissions on the context xml, and the 
actual directory where the application is deployed? I mean really carefully?





On Sun, Feb 21, 2016 at 12:11 AM, Caldarale, Charles R <
chuck.caldar...@unisys.com> wrote:


From: Me Self [mailto:wmso...@gmail.com]
Subject: context doesnt pick up
When I put the context in server.xml it works fine, but if I put the same
context tag in a xml file under /conf/Catalina/localhost/test.xml then
tomcat doesn't pick it up. I would rather want to use the latter.
The test.xml is


What Am I missing?

Reading the doc, which for the docBase attribute states:
"The value of this field must not be set unless the Context element is
defined in server.xml or the docBase is not located under the Host's
appBase."

http://tomcat.apache.org/tomcat-8.0-doc/config/context.html

I suspect that if you examined the logs you would find an error message
related to deployment of the test webapp.

If all you have in the  element is the docBase and your webapp is
located in the 's appBase directory, you don't need a 
element at all.

  - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail and
its attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




--
George Sexton
*MH Software, Inc.*
Voice: 303 438 9585
http://www.connectdaily.com


Re: Enabling SSLv2 on Tomcat 7 !

2016-02-21 Thread Utkarsh Dave
Thanks Chris for the response.
Yes, I meant SSLv2Hello. I understand the vulnerabilities in SSL. Though
some of the client need that flexibility in older versions, so was digging
the reason it was working in prior version of Tomcat.
Can you help me in identifying any change in Tomcat due to which SSLv2Hello
handshake started failing in newer versions of tomcat

On Fri, Feb 19, 2016 at 8:56 PM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Utkarsh,
>
> On 2/19/16 7:05 AM, Utkarsh Dave wrote:
> > I upgraded my tomcat from 7.0.53 ( that was having SSL protocols
> > enable) to 7.0.67 (that has by default SSL protocols disable).
> >
> > To re enable support for SSLv3 and SSLv2, i modified the server.xml
> > inside $TOMCAT_HOME/conf to replace sslProtocol="TLS" with
> > sslEnabledProtocols="SSLv2,SSLv3,TLSv1"
> >
> > I can test the SSLv3 requests successfully now , but SSLv2 requests
> > still fails. They were processing through success before the
> > upgrade of Tomcat.
> >
> > I am using the JDK1.6 and Redhat platform and openssl version
> > 0.9.8h.
> >
> > Please let me know if i can enable SSLv2 on the newer Tomcat.
>
> I think you mean "SSLv2Hello", not "SSLv2".
>
> But please, just let SSL die.
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iEYEARECAAYFAlbHNB8ACgkQ9CaO5/Lv0PDdGQCeILtFaOKuhexXOYDSK7MqNski
> 3mIAoLWsujDgusq2eoGDNwrL2B3cQyoY
> =NlGV
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Sessions number issue

2016-02-21 Thread tomcat

On 20.02.2016 18:44, George Sexton wrote:



On 2/20/2016 10:09 AM, Qadeer Khan wrote:

And I have no idea what questions I have to answer here! other than application 
sessions
are being created by users and session field is remaining as zero.


Seriously, you should try responding to Mark's question here:

http://marc.info/?l=tomcat-user=145530442623563=2

In general, I went through the archives and read all of the threads.

First, you're not reporting a version of tomcat.

Second, you haven't verified the code is creating sessions by inspecting it.

Third, as asked, you haven't verified that users are even connecting to the 
server you're
looking at.

You are not going to get a satisfactory outcome. You should really read this 
web page:

http://www.catb.org/esr/faqs/smart-questions.html

and re-submit your question from the beginning, supplying all of the necessary 
details.

In your particular case, you should document at minimum:

On server A running Apache Tomcat x.x.x, a request to URL ... creates an 
incrementing
session.

On sever B running Apache Tomcat x.x.x, a request to URL does not create an 
incrementing
session does not create a new session. I have verified by inspection of the 
access logs
that the request is going to the expected web application instance.

If you can do this, you'll probably get more help.



Plus, the OP seems to be disregarding previous hints he's been given, such as 
Christopher's earlier post about mismatched installed code versions.


Qadeer Khan, this is a high-quality support list.  And on this list we do try to help 
people with their Tomcat problems. But one condition is that they also try to help 
themselves, and do not just expect answers to be spoon-fed to them.






On clicking on the session number which is a '0' displays following  error 
message:

An error occurred at line: 109 in the jsp file: /WEB-INF/jsp/sessionsList.jsp
DeltaSession cannot be resolved to a type
106:Session currentSession = (Session) iter.next();
107:String currentSessionId = 
JspHelper.escapeXml(currentSession.getId());
108:String type;
109:if (currentSession instanceof DeltaSession) {
110:if (((DeltaSession) currentSession).isPrimarySession()) {
111:type = "Primary";
112:} else {


An error occurred at line: 110 in the jsp file: /WEB-INF/jsp/sessionsList.jsp
DeltaSession cannot be resolved to a type
107:String currentSessionId = 
JspHelper.escapeXml(currentSession.getId());
108:String type;
109:if (currentSession instanceof DeltaSession) {
110:if (((DeltaSession) currentSession).isPrimarySession()) {
111:type = "Primary";
112:} else {
113:type = "Backup";

And my questions was why this could be happening and how could this be fixed


Thanks

- Original Message -
From: "Christopher Schultz" 
To: "Tomcat Users List" 
Sent: Saturday, February 20, 2016 11:03:22 AM
Subject: Re: Sessions number issue

Qadeer,

On 2/19/16 9:50 PM, Qadeer Khan wrote:

Thanks so much for the help. I thought it were the open forum for any
one needing support for Tomcat related questions.

It is, but you aren't answering any of our followup questions. It's
making it literally impossible to help you.

-chris


- Original Message -
From: "André Warnier (tomcat)" 
To: users@tomcat.apache.org
Sent: Friday, February 19, 2016 3:08:48 PM
Subject: Re: Sessions number issue

On 19.02.2016 17:40, David kerber wrote:

On 2/19/2016 11:20 AM, Qadeer Khan wrote:

Anyone, please throw some insight on the following issue

You need to do the research and answer the questions that Mark asked in your 
other
thread.

Since you're using jboss, this may well be a jboss problem, rather than tomcat.

What I do not really understand here, is that the (partial) information 
provided so far
seems to at least indicate that this is a JBOSS site and a RedHat customer; 
that RedHat
does the development and support of JBOSS and has several JBOSS support forums 
available;
and that the OP works for RedHat, as a Senior Consultant no less.
So why does the OP not contact his own support resources first ?

I mean, it is not that we don't /want/ to help (Tomcat 6-7 being used by JBOSS 
and all
that), but would the above not be a logical first step ?

[snip]


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: 

Re: context doesnt pick up

2016-02-21 Thread tomcat

On 20.02.2016 23:40, Me Self wrote:

Hi All

When I put the context in server.xml it works fine, but if I put the same
context tag in a xml file under /conf/Catalina/localhost/test.xml then
tomcat doesn't pick it up. I would rather want to use the latter.

The test.xml is



Its a set up where the tomcat user has no write access to /webapps only
read. The war has been exploded to /webapps/test. Auto deployment is
disabled. In server.xml I have autoDeploy="false" deployOnStartup="false",
unpackWARS="false". The tomcat user only has read access to
/conf/Catalina/localhost/test.xml. Its tomcat 8 on linux.

What Am I missing?


Maybe also : if it is really like above, then your test.xml is invalid XML.
The  tag is not closed.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat memory

2016-02-21 Thread Olaf Kock
This is rather a Java than a tomcat question:

The JVM allocates memory based on whatever default your current JVM
version decides (you don't mention what version of Java you're on)

>From a text on
http://docs.oracle.com/javase/7/docs/technotes/guides/vm/gc-ergonomics.html
that's linked from my Java's manpage:

*initial heap size*

Larger of 1/64th of the machine's physical memory on the machine
or some reasonable minimum. Before J2SE 5.0, the default initial
heap size was a reasonable minimum, which varies by platform.
You can override this default using the |-Xms| command-line option.

*maximum heap size*

Smaller of 1/4th of the physical memory or 1GB. Before J2SE 5.0,
the default maximum heap size was 64MB. You can override this
default using the |-Xmx| command-line option.

*Note:* The boundaries and fractions given for the heap size are
correct for J2SE 5.0. They are likely to be different in subsequent
releases as computers get more powerful.

Note that this is from JavaSE7 and even mentions 5 - with more power
there comes more initial and maximum memory defaults.

I'm not aware of the actual development of the default memory - mostly
because I consider it good practice to know what an application uses and
provide it explicitly, rather than relying on defaults. (and frankly, on
the applications that I see, the default typically is not even enough -
let alone a good basis for tuning)

While we're at it: For production systems I consider it good practice to
set -Xms and -Xmx to the same value. Reason: If you don't have enough
memory available, you want to know this when the process starts, not
days later when it tries to allocate "the rest" - typically sunday night
at 3am.

Olaf

Am 21.02.2016 um 03:39 schrieb Gokul.Baskaran:
> Hi,
>
> I am currently running tomcat 7 in Windows 2012.
>
> The current JVM Heap memory parameters are set to empty, does the JVM Heap 
> memory utilize the entire memory of the OS or does it default to a specific 
> memory number?
>
> Thank you
> -Gokul
>
>