On 06/05/2024 11:05, Hamdan Khan wrote:
Hello everyone,
We're having a problem with Tomcat on Windows servers. It only happens when:
Tomcat is running as a service (automatically started by Windows).
The Windows server automatically restarts for updates.
After the restart, Tomcat starts creating new session IDs for
every request,
That suggests that the client isn't returning the session ID to Tomcat
for the subsequent request. I'd be asking why that is the case.
Is there a reverse proxy in the mix?
Are you using sessions at all or are they completely disabled? If yes,
which session manager are you using?
even though our jsp tells it not to.
<%@ page session="false" %>
That is just a single page and any page can potentially trigger session
creation.
We can fix this by deleting temp and work files from Tomcat and restarting
the service ourselves. However, this is a manual process, and we'd like to
find a more permanent solution.
It would be interesting to know if you need to clear both of these or
whether clearing just one is sufficient to resolve the issue. That might
narrow down potential root causes.
Can anyone help us understand why this might be happening?
I can't think of any way Tomcat would do this. This feels more like an
application issue at this point.
Or what logs to
configure and monitor.
My preference would always be to attach an IDE and use remote debugging
but that probably isn't an option in production.
You could try attaching a profiler and recording object allocations.
That should show you where/how sessions are being created.
The minimally invasive option would probably be to add an
HttpSessionListener to your application that logs the current stack
trace every time a session is created.
Version of Tomcat is Tomcat-9.0.83
To emphasize we are not able to reproduce this in our local computer it
only happens to the longrunning production servers.
If you manually reboot the production servers (without clearing out work
or temp) can you trigger the issue?
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org