tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Crowther" <Peter.Crowt...@melandra.com>
Subject RE: Tomcat restart needed
Date Tue, 01 Aug 2006 14:43:41 GMT
> From: Luis.Amorim@alcatel.pt [mailto:Luis.Amorim@alcatel.pt] 
> In my web application, I have a thread running in the background that 
> sends emails to the user when some event occurs.
> However, yesterday it stopped sending emails.
[...]
> My question is: why did this happen, why was necessary to 
> restart tomcat to get things right?

Any of a myriad reasons, but my first guess (until shown otherwise)
would be your threading code.  Writing threaded code so that it handles
unusual conditions properly is *hard*.

For example, are you *absolutely* sure that your code has *no* race
conditions that would cause syncronisation between the email thread and
any worker threads to be lost?  Even if (say) two worker threads tried
to submit jobs to the email thread at the same time?  Did you take a
thread dump before you restarted Tomcat to analyse for possible
deadlocks?  Are you running on a multi-core or hyperthreaded processor,
where 'at the same time' takes on new meaning if you're used to a single
CPU?

		- Peter

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message