Азат,

On 11/16/25 5:40 PM, Азат Усманов wrote:
issue with js file loading time and Connection timeout
Hello everyone! A colleague of mine at $work discovered a strange issue with 
his local tomcat  in regards to loading times of js files and neither of us has 
any idea why its happening the way it is. So he was developing some ajax /js 
code to notify the users of our system in case the user got/ any new 
notifications. And noticed  long 20s loading time for  his ajax script. When I  
see it for myself I have(checkout his branch from git repo) no issues with load 
times(on  my computer the script is loading in 23 ms) His susspected that the 
issue might be with connectionTimeout setting, because once he changed it from 
20000 to 1000 the file was servered after 1s of wait time.He also noticed once 
he added maxKeepAliveRequests attribute with the setting of 1 .the  delay 
dissapeared. completely, regardless of the connectionTimeout setting value.
here is the strange part. my connector does have the same ConnectionTimeout 
setting value of 20000ms, NO maxKeepAliveRequests attribute
specified on the connector and the loading time has  no delay. Any Idea why? 
Below is my local connector
<Connector URIEncoding="UTF-8" connectionTimeout="20000" maxPostSize="-1" port="8081" 
protocol="HTTP/1.1" redirectPort="8443" useBodyEncodingForURI="true"/>

Both our machines have the own copy of tomcat 9.0.64 version which connect to 
the  same oracle 21 c db. Java is 1.8.202 on both machines. He is using Mac I 
am on Windows 11

below is js file itself, althouth he tested the issue with much more simple 
alert type js , the issue remained the same.

Surely, the issue is not with the js file itself, because its content doesn't matter until the download completes, which takes 20 seconds.

Can you confirm that in the affected environment, there is only ONE request for the .js file? Or is there a request for the file (which fails after 20s) followed by a successful request?

Is there any possibility that your colleague could upgrade to the latest 9.0.112?

Also:

Which connector is being used?
Is HTTPS being used?
Is h2 being used?

-chris


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to