You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "D. Barnhoorn" <d....@tfe.nl> on 2009/01/19 12:11:47 UTC
Servlet silently dropped
Hi,
We have a strange problem at one of our clients in that Tomcat seems to drop
a specific servlet while running. This happens very sporadically and is
possibly connected with a high load.
The server is a Sun sparc running Tomcat 5 in java 1.4.2_02
The application is based around one servlet that takes almost all the
requests and several small ones with various specific tasks (29 servlets in
all, all except for the main ones with a very specific mapping). One of
those servlets stops handling or maybe even getting requests that it has a
mapping for.
What is odd is that:
- it's always the same one
- tomcat serves a page for the url, but one from the main servlet
- destroy() doesn't get called, so it either escapes the gc or gets dropped
without any fuss
- creating a second mapping for the servlet returns the same page, so while
it's running the right one and once the original mapping doesn't work
anymore the extra mapping doesn't work either
- absolutely no logging of anything that might give me a clue; I did think
of out of memory, threads, sockets stuff, but you'd expect tomcat to at
least log something like that
Anyone seen something like this before? Or some pointers where I might be
able to trace this to the root?
It only happens on the live server of course - and only sporadically at
that, so having a debugger open is kind of out of the question :(
Any ideas will be welcome :)
Thanks in advance,
danny
--
View this message in context: http://www.nabble.com/Servlet-silently-dropped-tp21541015p21541015.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Servlet silently dropped
Posted by "D. Barnhoorn" <d....@tfe.nl>.
Hi Konstantin,
You are right it's one of the auxiliaries, forgot to add that. The init()
completes, the servlet will also work for an indefinite amount of time - if
we're lucky right up till the next update of the site. Otherwise we have too
restart Tomcat to get the servlet up and running again. It's a load balanced
environment (4 servers, no session sharing) so it is mostly just annoying
for the guys in the server department who have to restart the tomcat when it
occurs. So far I haven't been able to trigger something that could be used
to signal the failure (which would make it possible to trigger a scripted
response) or to get rid of it (which of course is preferable :))
danny
Konstantin Kolinko wrote:
>
> I understand that it is one of those 28 auxiliary servlets.
>
> Does its init() complete cleanly?
>
> If it does not, the container must drop the servlet instance, and the
> destroy()
> method is not called. See the chapter SRV.2.3.2.1 from the servlet spec
> 2.4.
>
--
View this message in context: http://www.nabble.com/Servlet-silently-dropped-tp21541015p21542288.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Servlet silently dropped
Posted by Konstantin Kolinko <kn...@gmail.com>.
2009/1/19 D. Barnhoorn <d....@tfe.nl>:
>
> Hi,
>
> We have a strange problem at one of our clients in that Tomcat seems to drop
> a specific servlet while running. This happens very sporadically and is
> possibly connected with a high load.
>
> The server is a Sun sparc running Tomcat 5 in java 1.4.2_02
>
> The application is based around one servlet that takes almost all the
> requests and several small ones with various specific tasks (29 servlets in
> all, all except for the main ones with a very specific mapping). One of
> those servlets stops handling or maybe even getting requests that it has a
> mapping for.
>
> What is odd is that:
> - it's always the same one
> - tomcat serves a page for the url, but one from the main servlet
> - destroy() doesn't get called, so it either escapes the gc or gets dropped
> without any fuss
> - creating a second mapping for the servlet returns the same page, so while
> it's running the right one and once the original mapping doesn't work
> anymore the extra mapping doesn't work either
> - absolutely no logging of anything that might give me a clue; I did think
> of out of memory, threads, sockets stuff, but you'd expect tomcat to at
> least log something like that
>
> Anyone seen something like this before? Or some pointers where I might be
> able to trace this to the root?
>
> It only happens on the live server of course - and only sporadically at
> that, so having a debugger open is kind of out of the question :(
>
> Any ideas will be welcome :)
>
> Thanks in advance,
>
> danny
I understand that it is one of those 28 auxiliary servlets.
Does its init() complete cleanly?
If it does not, the container must drop the servlet instance, and the destroy()
method is not called. See the chapter SRV.2.3.2.1 from the servlet spec 2.4.
Best regards,
Konstantin Kolinko
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Servlet silently dropped
Posted by Martin Gainty <mg...@hotmail.com>.
We could diagnose this situation better if you could display/attach the most recent log from $TOMCAT_HOME/log
Martin
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission.
> From: Chuck.Caldarale@unisys.com
> To: users@tomcat.apache.org
> Date: Tue, 20 Jan 2009 08:17:27 -0600
> Subject: RE: Servlet silently dropped
>
> > From: D. Barnhoorn [mailto:d.barnhoorn@tfe.nl]
> > Subject: RE: Servlet silently dropped
> >
> > Main servlet grabs /**
>
> I don't think "/**" is a valid mapping, if I'm interpreting the servlet spec properly. You should be using just "/" for your default (main) servlet.
>
> > A hanging servlet would mean timeouts for the client I think?
>
> Yes, a timeout; there wouldn't be a 500, since it's the request processing thread's responsibility to generate the response. The 500 is sent by Tomcat typically only if the thread hits an uncaught exception.
>
> - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
_________________________________________________________________
Windows Liveā¢: Keep your life in sync.
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t1_allup_explore_012009
RE: Servlet silently dropped
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: D. Barnhoorn [mailto:d.barnhoorn@tfe.nl]
> Subject: RE: Servlet silently dropped
>
> Main servlet grabs /**
I don't think "/**" is a valid mapping, if I'm interpreting the servlet spec properly. You should be using just "/" for your default (main) servlet.
> A hanging servlet would mean timeouts for the client I think?
Yes, a timeout; there wouldn't be a 500, since it's the request processing thread's responsibility to generate the response. The 500 is sent by Tomcat typically only if the thread hits an uncaught exception.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Servlet silently dropped
Posted by "D. Barnhoorn" <d....@tfe.nl>.
Chuck,
>> One of those servlets stops handling or maybe even
>> getting requests that it has a mapping for.
>What does a thread dump show in this situation?
I will see if I can get access - the machine is more or less a black box for
me I'm afraid, and on an internal network that I cannot access directly.
Maybe I can setup something on a box inside the net that they can use. I
will see what's possible, thanks for the suggestion
>> What is odd is that:
>> - it's always the same one
>Which narrows your focus considerably.
True
>> - tomcat serves a page for the url, but one from the main servlet
>So it appears the mapping is altered? The only dynamic mapping I'm aware
of in Tomcat is for JSPs; >are you using them anywhere?
The mapping for this one is very static, one very specific url. As are most
of the others. Main servlet grabs /** and passes to a binary servlet for
binaries. The only direct jsp's are for the 404 and 500 errors, all others
get forwarded from one of the servlets.
>> - destroy() doesn't get called, so it either escapes the gc
>> or gets dropped without any fuss
>The destroy() API won't be called unless the entire webapp is stopped,
which doesn't appear to be >happening.
True, clutching at straws there I think ;)
>> - creating a second mapping for the servlet returns the same
>> page
>How do you do that? The only way I'm aware of is to update web.xml, which
will reload the entire >webapp.
I added a secondary mapping before starting, which will of course mean the
same servlet gets called and not prove a lot. I will try to get some
monitoring window to the server so I can grab some more info on the state of
the servlet and the vm at the time it occurs.
>Tomcat can't log anything when a thread hangs inside a servlet. Again, get
a thread dump (or >several).
A hanging servlet would mean timeouts for the client I think? Or error 500?
danny
--
View this message in context: http://www.nabble.com/Servlet-silently-dropped-tp21541015p21560958.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Servlet silently dropped
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: D. Barnhoorn [mailto:d.barnhoorn@tfe.nl]
> Subject: Servlet silently dropped
>
> One of those servlets stops handling or maybe even
> getting requests that it has a mapping for.
What does a thread dump show in this situation?
> What is odd is that:
> - it's always the same one
Which narrows your focus considerably.
> - tomcat serves a page for the url, but one from the main servlet
So it appears the mapping is altered? The only dynamic mapping I'm aware of in Tomcat is for JSPs; are you using them anywhere?
> - destroy() doesn't get called, so it either escapes the gc
> or gets dropped without any fuss
The destroy() API won't be called unless the entire webapp is stopped, which doesn't appear to be happening.
> - creating a second mapping for the servlet returns the same
> page
How do you do that? The only way I'm aware of is to update web.xml, which will reload the entire webapp.
> I did think of out of memory, threads, sockets stuff, but
> you'd expect tomcat to at least log something like that
Tomcat can't log anything when a thread hangs inside a servlet. Again, get a thread dump (or several).
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org