RE: Tomcat Virtual Threads Performance

2025-01-21 Thread joan.balaguero
Hi, Virtual threads only shine on I/O bound tasks, in terms of throughput (not latency). They were created for that, don't expect any improvement on CPU bound tasks. Regards, Joan. -Original Message- From: Owner Sent: Tuesday, January 21, 2025 11:32 AM To: Tomcat Users List Subject

RE: Tomcat 10.1.34 log messages

2024-12-19 Thread joan.balaguero
Perfect Mark, thanks. -Original Message- From: Mark Thomas Sent: Thursday, December 19, 2024 5:12 PM To: users@tomcat.apache.org Subject: Re: Tomcat 10.1.34 log messages Hi Joan, Thanks for the extra information. I can see several legitimate ways the NPE might happen. I've added a nul

RE: Tomcat 10.1.34 log messages

2024-12-15 Thread joan.balaguero
Hi Mark, No, I'm not using TLS but yes, I'm using async servlet with non-blocking io (read and write listeners). Thanks, Joan. -Original Message- From: Mark Thomas Sent: Sunday, December 15, 2024 3:15 PM To: users@tomcat.apache.org Subject: Re: Tomcat 10.1.34 log messages On 13/12/20

RE: Tomcat 10.1.34 log messages

2024-12-13 Thread joan.balaguero
Hi Mark, Which version did you migrate from? 10.1.30 How often do you see these messages? Hardly ever, maybe a dozen of times ... we have millions of daily requests Do they correlate with any particular (failed?) request. No I don't have more information, just these traces. The first trace (Nu

Tomcat 10.1.34 log messages

2024-12-11 Thread joan.balaguero
Hello, After migrating to Tomcat 10.1.34, I see these messages on the tomcat log. It's not affecting our application at all, I paste them below just for your information. Dec 10, 2024 2:39:02 PM org.apache.tomcat.util.net.NioEndpoint$SocketProcessor doRun SEVERE: Error running socket proce

RE: Write listener question

2024-05-30 Thread joan.balaguero
Trying to simplify the code was a mistake ... private static final int WRITE_BUFFER_SIZE = 8 * 1024; <-- with 32K fails on this client private final AsyncContext ac; private final ServletResponse sr; private ServletOutputStream os; private boolean firstTime = true; private byte[] response

RE: Write listener question

2024-05-30 Thread joan.balaguero
Hi Chuck, isFirst is initialized to 'true' when the class is instantiated, so that piece of code is just executed the first time the execution enters the ' onWritePossible' method. Later, within the same 'if', 'isFirst' is set to false, (not shown in the code, sorry) Perhaps this one client has a

Write listener question

2024-05-30 Thread joan.balaguero
Hello, Sorry for the previous mail ... I have a NIO connector with an asynchronous servlet with its write listener (working in both tomcat 8.5 and tomcat 10.1.20). @Override public void onWritePossible() throws IOException { if (this.isFirst) { this.os = this.asyncContext.getResponse().

RE: Write listener question

2024-05-30 Thread joan.balaguero
Sorry, this issue happens with both Tomcat 8.5.x and 10.1.x. -Original Message- From: joan.balagu...@ventusproxy.com Sent: Thursday, May 30, 2024 11:57 AM To: 'Tomcat Users List' Subject: Write listener question Hello, I have a NIO connector with an asynchronous servlet with its write

Write listener question

2024-05-30 Thread joan.balaguero
Hello, I have a NIO connector with an asynchronous servlet with its write listener. @Override public void onWritePossible() throws IOException { if (this.isFirst) { this.os = this.asyncContext.getResponse().getOutputStream(); this.startIdx = 0; this.endIdx = WRITE_BUFFER_SIZE; }

RE: Getting wrong value calling request.getScheme()

2024-01-24 Thread joan.balaguero
Yes ... Thanks. -Original Message- From: Mark Thomas Sent: Wednesday, January 24, 2024 5:39 PM To: users@tomcat.apache.org Subject: Re: Getting wrong value calling request.getScheme() On 24/01/2024 15:48, joan.balagu...@ventusproxy.com wrote: > Any help would be really appreciated.

Getting wrong value calling request.getScheme()

2024-01-24 Thread joan.balaguero
Hello, Tomcat 10.1.18 with jakarta servlet 6, embedded in our app using jdk17. I have the following class: public Url(jakarta.servlet.http.HttpServletRequest request){ System.out.println("this.scheme = '" + request.getScheme() + "'"); System.out.println("this.protocol = '" + request.g