RE: Reg: tomcat CPU spikes

2024-07-19 Thread Jalaj Asher
This is the warning message we get when cachingAllowed is not set to false

org.apache.catalina.webresources.Cache.getResource Unable to add the resource 
at [/WEB-INF/classes/] to the cache for web application [/x] because there 
was insufficient free space available after evicting expired cache entries - 
consider increasing the maximum size of the cache.

Regards

Jalaj P Asher

-Original Message-
From: Jalaj Asher
Sent: Tuesday, July 16, 2024 1:30 PM
To: Tomcat Users List 
Subject: RE: Reg: tomcat CPU spikes

> space". Which was very quickly filling up our disk space as well as
> increasing disk IO causing latency concerns.
1. Also interesting. Can you post one of those messages here? Was there a stack 
trace shown or just the warning?

It is just the warning. No stack trace. I will work on recreating this 
since all our environments has this disabled.

2. Interesting. How much static content do you have? This seems like a good 
use-case for a reverse-proxy to handle your staticcontent for you.
We have not collated the complete size of it. But are reasons we cannot do that.

Also I was reviewing some older heap dumps and I could see that the jars are 
getting cached in tomcat even with cachingAllowed=false.

Also this is not a consistent issue once it happens it takes sometime for the 
stack to go away as well as post tomcat reboots the problem goes away with the 
same settings and we do see that the wars are getting deployed during tomcat 
startup as well.

Regards

Jalaj P Asher


-Original Message-
From: Christopher Schultz 
Sent: Tuesday, July 16, 2024 10:05 AM
To: users@tomcat.apache.org
Subject: Re: Reg: tomcat CPU spikes

Attention! - This email has originated from an External Source outside of 
eClinicalWorks. Always use caution when opening attachments, clicking links, or 
when responding to this email. If you feel this is a phishing scam, please use 
the Phish Alert Report button in Outlook.


Jalaj,

On 7/15/24 18:18, Jalaj Asher wrote:
> We ran into 2 issues
> 1. We needed to allocate significant amount of -XMX  for heap space,
> if we allowed caching, since increasing memory by a few hundred MB as
> well was not enough.
Interesting. How much static content do you have? This seems like a good 
use-case for a reverse-proxy to handle your static content for you.

> 2. Also with the setting being  enabled, it generated logs stating
> "could not add a resource  as there wasn’t enough
> space". Which was very quickly filling up our disk space as well as
> increasing disk IO causing latency concerns.
Also interesting. Can you post one of those messages here? Was there a stack 
trace shown or just the warning?

-chris

> -Original Message-
> From: Christopher Schultz 
> Sent: Monday, July 15, 2024 4:19 PM
> To: users@tomcat.apache.org
> Subject: Re: Reg: tomcat CPU spikes
>
> Attention! - This email has originated from an External Source outside of 
> eClinicalWorks. Always use caution when opening attachments, clicking links, 
> or when responding to this email. If you feel this is a phishing scam, please 
> use the Phish Alert Report button in Outlook.
>
>
> Jalaj,
>
> On 7/15/24 15:03, Jalaj Asher wrote:
>> Yeah I was wondering the same as this has been in place since a few
>> years now atleast 4 years since cachingAllowed had some changes in
>> tomcat 8 which was resulting in it caching all static content as well
>> as jsps and jars and our though process was if we have static content
>> being cached on the client end and jsps in the work folder each time
>> on access we don’t need the cache.
> Does the cache actively hurt you?
>
>> Is there a way to cache just the jars and not every thing else in memory ?
>
> I think the short answer is "no there is not a way to do this" but I may be 
> wrong.
>
> The long answer might be "maybe, but you will have to play games with 
>  and  and maybe some other things to get it 
> working.
>
> I would save yourself some complexity and simply enable caching.
>
> -chris
>
>> -Original Message-
>> From: Christopher Schultz 
>> Sent: Friday, July 12, 2024 4:02 PM
>> To: users@tomcat.apache.org
>> Subject: Re: Reg: tomcat CPU spikes
>>
>> Attention! - This email has originated from an External Source outside of 
>> eClinicalWorks. Always use caution when opening attachments, clicking links, 
>> or when responding to this email. If you feel this is a phishing scam, 
>> please use the Phish Alert Report button in Outlook.
>>
>>
>> Jalaj,
>>
>> On 7/12/24 10:19, Jalaj Asher wrote:
>>> Thank you Chuck and John for the responses.
>>>
>>> Just a few points from the things you highlighted and wanted me to
>>> check 1. unpackwar is set to true. I checked and was informed that we need
>>>  that to be true for a specific war file.
>>> 2. cachingAllowed=false. We keep it as false across the board.
>>
>> Well... that'll do it. In order to locate resources, Tomcat needs to sift 
>> through all of those JAR files every time. Scan

Re: Win10 installation progress

2024-07-19 Thread DdC
Dear Chuck,
All good news.There were only a few bad entries in the web.xml file.Replacing 
j2eer.jar with:    servlet-api.jar    javax.mail.jar    javax.activation.jarwas 
not necessary for my code written during 1999-2005.The Java code had warnings 
due to deprecated constructs, but it wasexecuting fine.
Thanks a lot.  We need more people like you and your folke.Tomcat has been 
around for 25(?) years !!!Here a present for all of you:       
http://www.ontooo.com/AIAssessment2.pdfwhich was presented Feb 1 at a 
conference.[My next paper takes the chat-systems further apart ...]dennis de 
champeauxBTW Medical diagnosis over the Web (pushed by Google and others) is 
not realistic:       http://www.ontooo.com/Diagnosis.pdfwill be presented next 
week at a conference.
--
Home page:      rs6.risingnet.net/~ddccMarketing site:  www . OntoOO.comKindle 
books:   Side Effects: Impacts on the 21st 
Century::https://www.amazon.com/-/es/Dennis-Champeaux-ebook/dp/B09MHJ5W48   
Even if not 
true::https://www.amazon.com/-/es/Dennis-Champeaux-ebook/dp/B09Y4WR9J7   9/11:: 
They had the Sun in their 
Eyeshttps://www.amazon.com/11-They-had-their-Eyes-ebook/dp/B0CMQ2WSK9https://www.amazon.nl/dp/B0CMQ2WSK9


 

On Wednesday, July 17, 2024 at 04:25:47 PM PDT, Chuck Caldarale 
 wrote:  
 
 
> On Jul 16, 2024, at 18:45, DdC  wrote:
> 
> Link to catalina log is below


Which shows this error:

Caused by: java.lang.IllegalArgumentException: Invalid  
[com.ZAjax] in servlet mapping


> Thanks for all your advice.Progress here.The port regards hck app (for 
> medical diagnosis) with 6.1Mb source ofwhich 4.6Mb java code.Have been able 
> to compile without using j2ee.jar (with a dos .batscript tackling 19 
> directories, etc.)Used instead in CLASSPATH files in lib: 
> servlet-api.jar,javax.mail.jar,javax.activation.jar. There IS a web.xml file 
> in WEB-INF with, among the others, forcom.ZAjax: 
>          com.ZAjax      
>com.ZAjax    
>          com.ZAjax      
>com.ZAjax    


(You really need to use an e-mail client that doesn’t destroy formatting.)

Refer to section 12.2 of the servlet spec to see what the valid patterns are:
https://javaee.github.io/servlet-spec/downloads/servlet-4.0/servlet-4_0_FINAL.pdf

If this is the only servlet in the app, you may want to use just a slash or an 
empty string for the URL pattern.

  - Chuck


> Starting up tomcat 9.0.88 still hiccups when hck is encountered.The catalina 
> log is at:
> https://www.ontooo.com/catalina.log