This content has been marked as final.
Show 3 replies
-
1. Re: Thread Stalling on Scheduled Job
jaikiran Jul 14, 2006 5:01 AM (in response to casadelnorte)how to find out what's stalling the thread?
Have a look at:
http://wiki.jboss.org/wiki/Wiki.jsp?page=StackTrace -
2. Re: Thread Stalling on Scheduled Job
casadelnorte Jul 14, 2006 8:59 AM (in response to casadelnorte)Thanks - I'll give that a try.
-
3. Re: Thread Stalling on Scheduled Job
casadelnorte Jul 14, 2006 11:03 AM (in response to casadelnorte)We found the problem.
Our database (SQL Server) is a little flaky and likes to not answer from time to time. Just doesn't scale well.
And by default, JTDS doesn't set a query timeout.
We've added:;loginTimeout=20
to the JTDS URL, to make sure the connection pool has a chance at refreshing iteself, and added:private static final int SQL_QUERY_TIMEOUT = 2; // by query ... callableStatement.setQueryTimeout(SQL_QUERY_TIMEOUT);
to all of our DAOs for scheduled jobs.
I made these changes last night, and as expected the jobs threw several query timeout exceptions, and the jobs restarted on the next scheduled interval.
So - hopefully - this is the entire issue we're experiencing. We'll be able to confirm after a couple of days in production.
Thanks!
Larry