> On Jan 17, 2025, at 12:45, Michael <eftern...@gmail.com> wrote:
> 
> Thanks a lot for your comments, Chuck!
> 
> On Fri, Jan 17, 2025 at 3:51 PM Chuck Caldarale <n82...@gmail.com> wrote:
>> 
>> 
>>> On Jan 17, 2025, at 04:05, Michael <eftern...@gmail.com> wrote:
>>> 
>>> I have two applications, A and B, running in Tomcat 10.1.28 on RHEL
>>> 8.10 with Java 21 (OpenJDK Runtime Environment Red_Hat-21.0.5.0.10-1).
>> 
>> 
>> You may want to try a newer version of 10.1; there have been several changes 
>> to the Catalina and Coyote components in the nearly six months since 10.1.28 
>> was released.
> 
> We will definitely try that soon.
> I should perhaps have mentioned that the problem with the NPE in app A
> affecting requests to app B, that problem can be reproduced in
> 10.1.34.
> 
> 
>>> In various logs from nightly(?) Tomcat test runs, I've been able to
>>> find a similar problem. See this, for instance:
>>> https://nightlies.apache.org/tomcat/tomcat-10.1.x/logs/1309/TEST-org.apache.coyote.http2.TestAsyncError.NIO.txt
>> 
>> 
>> I believe that the test referred to above intentionally causes the error.
> 
> Okay, that sounds plausible.
> It surprises me, though, that it's okay to provoke a NPE from the
> application code, but again, I'm no expert in this :-)
> Also, it seems that the error is sporadic in this log and logs from other 
> tests.
> 
> 
>>> Now, the next thing that happens is even more surprising to me.
>>> Sometimes the uncaught NPE triggers an HTTP 500 response on a request
>>> to a servlet in application B! This I've been able to reproduce in my
>>> development environment, if I simply throw an NPE in application A
>>> from withing the AsyncContext as shown in the stacktrace above while I
>>> simultaneously keep requests coming in to application B.
>> 
>> 
>> This sounds suspiciously like the application is keeping references to 
>> requests or responses that have already been committed and recycled. Can you 
>> post your <Connector> configuration? In particular, what are the settings 
>> for the discardFacades and discardRequestsAndResponses attributes?
>> 
> 
> The setup has defaults for those attributes, I guess. This is the
> connector config:
> <Connector port="8080" protocol="org.apache.coyote.http11.Http11NioProtocol"
>   connectionTimeout="190000"
>   maxConnections="10000"
>   maxThreads="2000"
>   acceptCount="1000"
>   URIEncoding="UTF-8"
>   compression="1024"
>   
> compressibleMimeType="text/html,text/xml,text/plain,text/tcl,text/css,application/javascript,application/json,application/xml"
>   redirectPort="8443"
>   maxParameterCount="1000"/>


Is that the only <Connector> element? I would expect another one for the https 
port (8443).

  - Chuck


> I haven't looked at why the various attributes are set like this. The
> connectionTimeout looks much too high to me, but I wouldn't expect
> that to have anything to do with the problem.
> 
> /Michael


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

Reply via email to