I'm getting a -1 value for CPU usage when connecting visual VM to my tomcat server.
I have enabled JMX in my tomcat server. I use VisualVM to inspect the tomcat server. When I look at java.lang->OperatingSystem I'm seeing a -1 value for a few CPU value readings. This just suddenly happened. I cant think what changes might have been made, I don't recall any apart from maybe a Windows Update [image: jmx.png] The java version is Eclipse Temurin JDK version 17.0.11 build 17 Can anyone explain this or advise on how to debug further? There was a report here about this issue. I tried going to JDK 18 but this did not help. https://bugs.openjdk.org/browse/JDK-8265104
Maximum header size in Tomcat 9
Hi I'm using Tomcat 9.0.46 and I want to know what is the maximum possible value for maxHttpHeaderSize I have Tomcat setup using kerberos authentication and for some users the Authorisation header is too large (too many AD groups). I have seen various articles when googling but I want something from official documentation to state what the possible values for this field are. Is it true that setting a value of "-1" causes a limitless maximum header size value?
Re: Maximum header size in Tomcat 9
I'm sorry I'm not sure what you mean by Integer.MAX_VALUE? Looking at https://tomcat.apache.org/tomcat-9.0-doc/config/http.html all I see is this:- "maxHttpHeaderSize The maximum size of the request and response HTTP header, specified in bytes. If not specified, this attribute is set to 8192 (8 KB)." This does not explain possible values. Can you give me an actual number for the maximum? Also I saw in this article: https://community.jaspersoft.com/wiki/how-pass-big-number-values-apache-tomcat-url-string " A value of less than 0 means no limit." On Wed, May 25, 2022 at 10:19 AM Mark Thomas wrote: > On 25/05/2022 09:51, Aditya Kumar wrote: > > Hi > > > > I'm using Tomcat 9.0.46 and I want to know what is the maximum possible > > value for maxHttpHeaderSize > > Integer.MAX_VALUE > > > I have Tomcat setup using kerberos authentication and for some users the > > Authorisation header is too large (too many AD groups). > > > > I have seen various articles when googling but I want something from > > official documentation to state what the possible values for this field > > are. Is it true that setting a value of "-1" causes a limitless maximum > > header size value? > > Where did you read that? I don't see that in the documentation. > > Mark > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: Maximum header size in Tomcat 9
Thanks! Sorry I misread that article. So I suppose it's the same for maxHttpRequestHeaderSize and maxHttpResponseHeaderSize? On Wed, May 25, 2022 at 10:45 AM Mark Thomas wrote: > On 25/05/2022 10:33, Aditya Kumar wrote: > > I'm sorry I'm not sure what you mean by Integer.MAX_VALUE? > > https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html#MAX_VALUE > > > Looking at https://tomcat.apache.org/tomcat-9.0-doc/config/http.html > all I > > see is this:- > > "maxHttpHeaderSize > > > > The maximum size of the request and response HTTP header, specified in > > bytes. If not specified, this attribute is set to 8192 (8 KB)." > > This does not explain possible values. Can you give me an actual number > for > > the maximum? > > See above. > > The theoretical maximum is so far above any sensible value there is not > much point documenting it. > > > Also I saw in this article: > > > https://community.jaspersoft.com/wiki/how-pass-big-number-values-apache-tomcat-url-string > > > > " A value of less than 0 means no limit." > > That text is copied directly from the Tomcat documentation and is part > of the description for maxParameterCount, not maxHttpHeaderSize. What > makes you think it might apply to maxHttpHeaderSize? > > Mark > > > > > > > > On Wed, May 25, 2022 at 10:19 AM Mark Thomas wrote: > > > >> On 25/05/2022 09:51, Aditya Kumar wrote: > >>> Hi > >>> > >>> I'm using Tomcat 9.0.46 and I want to know what is the maximum possible > >>> value for maxHttpHeaderSize > >> > >> Integer.MAX_VALUE > >> > >>> I have Tomcat setup using kerberos authentication and for some users > the > >>> Authorisation header is too large (too many AD groups). > >>> > >>> I have seen various articles when googling but I want something from > >>> official documentation to state what the possible values for this field > >>> are. Is it true that setting a value of "-1" causes a limitless maximum > >>> header size value? > >> > >> Where did you read that? I don't see that in the documentation. > >> > >> Mark > >> > >> - > >> 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 > >
Apache Tomcat wire logging does not show POST data payload
I edited my log4j2.xml to include these lines: Now in my defined serverlog I see the http wire traffic I am after. However there is one problem. For POST requests from my Tomcat server I can only see request/response HTTP headers. I cannot see the POST data payload. Is there a way to get this logged too?
How do I see the POST payload sent from Tomcat
I have a Java application running under Tomcat 9. One component of this application is OpenID authentication, in which my application is a relying party. It sends a POST request to https://login.microsoftonline.com, but in one scenario I'm getting an error back from Microsoft. I need to see exactly what was sent in the POST request including the POST payload data. Is there a way of doing this? I tried the requestdumper filter but I don't see anything useful.
Why does Tomcat open connections on localhost?
Tomcat 9.0.30 on Windows Server 2012 / Java 1.8 I've noticed on a freshly installed version of tomcat 9, upon startup there are several connections to and from localhost on different ports For example on my tomcat server there are 4 connections to and from localhost (output from netstat) TCP0.0.0.0:8080 0.0.0.0:0 LISTENING 3972 TCP127.0.0.1:55618127.0.0.1:55619ESTABLISHED 3972 TCP127.0.0.1:55619127.0.0.1:55618ESTABLISHED 3972 TCP127.0.0.1:55620127.0.0.1:55621ESTABLISHED 3972 TCP127.0.0.1:55621127.0.0.1:55620ESTABLISHED 3972 TCP[::]:8080 [::]:0 LISTENING 3972 These can grow to a large number (several thousand) on a busy system. What are these connections used for? What caused them? What thread are they attributed to?
Re: Why does Tomcat open connections on localhost?
Hi Mark, Sorry I'm not familiar with what a Selector is? However on one system I've noticed 28000 such connections. Are these caused by client connections? I'm not saying the connection originates from a client, but does the type of socket get create because of client connections? On Tue, Mar 31, 2020 at 1:20 PM Mark Thomas wrote: > On 31/03/2020 11:20, Aditya Kumar wrote: > > Tomcat 9.0.30 on Windows Server 2012 / Java 1.8 > > > > I've noticed on a freshly installed version of tomcat 9, upon startup > there > > are several connections to and from localhost on different ports > > > > For example on my tomcat server there are 4 connections to and from > > localhost (output from netstat) > > > > TCP0.0.0.0:8080 0.0.0.0:0 LISTENING > 3972 > > TCP127.0.0.1:55618127.0.0.1:55619ESTABLISHED > 3972 > > TCP127.0.0.1:55619127.0.0.1:55618ESTABLISHED > 3972 > > TCP127.0.0.1:55620127.0.0.1:55621ESTABLISHED > 3972 > > TCP127.0.0.1:55621127.0.0.1:55620ESTABLISHED > 3972 > > TCP[::]:8080 [::]:0 LISTENING > 3972 > > > > These can grow to a large number (several thousand) on a busy system. > What > > are these connections used for? What caused them? What thread are they > > attributed to? > > The Java NIO implementation on Windows uses TCP for intra-process > signalling. It opens a pair of self-connected sockets for every Selector. > > Mark > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >