Why IM_SCAN and GetMessageCount() timeout casuing batch to abort?


We have setup a job/task to monitor inboxes using IMAP actions. Although it works majority of the time, we seems to end up every day with several aborted batches with error shown below,

**08:16:42.8 (0) t:30B8 p:2F40588 call “dcjmail.CDCjmail->dcjmail.CDCjmail->im_scan”**
08:16:42.8 (0) t:30B8 p:2F40588 Starting Thread: Expunge
08:16:42.133 (125) t:30B8 p:2F40588 Starting Thread: GetMessageCount
**08:21:42.138 (300000) t:30B8 p:2F40588 Warning: GetMessageCount did not complete within the expected time: 300000**
08:21:42.138 (0) t:2B7C p:2F40588 GetMessageCount exception: ‘Thread was being aborted.’ Details: System.Threading.ThreadAbortException: Thread was being aborted.
at System.Threading.WaitHandle.WaitOneNative(SafeHandle waitableSafeHandle, UInt32 millisecondsTimeout, Boolean hasThreadAffinity, Boolean exitContext)
at System.Threading.WaitHandle.InternalWaitOne(SafeHandle waitableSafeHandle, Int64 millisecondsTimeout, Boolean hasThreadAffinity, Boolean exitContext)
at System.Threading.WaitHandle.WaitOne(Int32 millisecondsTimeout, Boolean exitContext)
at System.Threading.WaitHandle.WaitOne()
at Org.Mentalis.Security.Ssl.Shared.xba100f256fefda02.xb5c628697e3b7e11(IAsyncResult x13391fccd2d5d483)
at Org.Mentalis.Security.Ssl.SecureSocket.EndSend(IAsyncResult asyncResult)
at Org.Mentalis.Security.Ssl.SecureSocket.Send(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at Jscape.Email.SecureImapOutputStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at Jscape.Email.SecureImapOutputStream.Write(String line)
at Jscape.Email.Imap.IssueCommand(String command)
at Jscape.Email.Imap.GetMessageCount()
at dcjmail.CDCjmail.ThreadProc_GetMessageCount()
08:21:42.153 (15) t:30B8 p:2F40588 Error GetMessageCount failed

Any idea how we can resolve this issue? Why does the GetMessageCount() Failure abort the batch?



Leave a Reply