james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Labib Iskander, Marcus" ...@cm4all.com>
Subject AW: james 2.1.3: deadlock in mordred code
Date Wed, 14 Apr 2004 17:04:47 GMT
Hi Noel,

> I am about to commit a patch to CVS.  Would you please check it?

did you send it to me? Can't find it!

>  And it appears to me that there is a bug in your code.

yes. I was a little fast on that on as it seems :(

> Apparently, you want to log when a connection is older than 
> ACTIVE_CONN_TIME_LIMIT and kill it when it is older than 
> ACTIVE_CONN_HARD_TIME_LIMIT.  But the second if statement is 
> (a) never hit because of the continue, and (b) is identical 
> to the first.  So as I read it, the code never releases a 
> stuck and ACTIVE connection.  There are several possible 
> fixes.  I applied one, and set the hard limit to 5* the point 
> at which we start warning.  Do you have any reason to believe 
> that there are legitimate reasons for a JDBC connection to be 
> active for several minutes, much less an hour?

In the first place I didn't add the second if clause. As long you trust the
SQL queries and JDBC drivers, what you really should be able to, I don't see
much sense in killing the connection even after a very long time. But maybe
the original programmers had some misbehaved drivers in mind?
Even when the query takes a very long time it might end successful. And as
long there is such a hope I would tend to try. Just dropping it doesn't seem
like a good cure to me, because just killing the connection only gives way
for more messages being corruptly handled, not neccessarly of course.

> FWIW, the reaper runs every 5 seconds, which means 12 log 
> entries per minute for stuck connections.

Fair enough in critical circumstances :)

Thanks for your correction! I am sorry that I submitted a erroneous patch!


To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org

View raw message