You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by scott werden <sc...@scottandrita.com> on 2001/06/12 07:32:02 UTC

Blocked thread in RemoteDelivery

Outgoing mail stopped being delivered today by my James server and I took a
look at log files and code to see what was going on. What I discovered is
that it appears the one and only delivery thread (created in
RemoteDelivery.java) got blocked within RemoteDelivery.deliver(). In the
code, a message gets logged (line 109) saying: "attempting delivery of XXX",
and another at line 130 that should report the message was successfully
sent. I never saw the 2nd message in the log file (although I saw the 1st)
after James hung, nor was there a message for any exceptions. Seems like
something hung in transport.connect() or transport.sendMessage(). I
restarted James and all the backed-up messages got sent and it is again
working OK. I did up the threads but this is just a delay tactic and not a
fix.

Anybody got any ideas? Has this bug been fixed? I have release 1.2.1.

Thanks,
Scott W.


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


Re: Blocked thread in RemoteDelivery

Posted by Serge Knystautas <se...@lokitech.com>.
Sending more detail on the dev listserv...


For a future version, I'm considering creating a separate thread to send
each message, and join to that thread for a certain number of seconds, so if
the message is not sent, it is aborted.  However, this creates extra
complication in the code, an extra thread created and destroyed for each
message (or even more complication to build a thread spool), and could cause
problems for large messages sent over a slow connection.

Any thoughts on a better way to handle this?  Again, if someone can figure
out what's hanging it, that's the best of all possible worlds.

Serge Knystautas
Loki Technologies
http://www.lokitech.com/
----- Original Message -----
From: "scott werden" <sc...@scottandrita.com>
To: <ja...@jakarta.apache.org>
Sent: Tuesday, June 12, 2001 1:32 AM
Subject: Blocked thread in RemoteDelivery


>
> Outgoing mail stopped being delivered today by my James server and I took
a
> look at log files and code to see what was going on. What I discovered is
> that it appears the one and only delivery thread (created in
> RemoteDelivery.java) got blocked within RemoteDelivery.deliver(). In the
> code, a message gets logged (line 109) saying: "attempting delivery of
XXX",
> and another at line 130 that should report the message was successfully
> sent. I never saw the 2nd message in the log file (although I saw the 1st)
> after James hung, nor was there a message for any exceptions. Seems like
> something hung in transport.connect() or transport.sendMessage(). I
> restarted James and all the backed-up messages got sent and it is again
> working OK. I did up the threads but this is just a delay tactic and not a
> fix.
>
> Anybody got any ideas? Has this bug been fixed? I have release 1.2.1.
>
> Thanks,
> Scott W.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-user-help@jakarta.apache.org
>
>


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


Re: Blocked thread in RemoteDelivery

Posted by Harmeet <ha...@kodemuse.com>.
I think one workable solution could be to have SocketTimeout. If
transport.connect()
takes too long, then, InterruptedIOException, would be logged and
RemoteDelivery thread will go onto the next email, till the next
RemoteDelivery thread kicks in.

By code inspection, adding this line
props.put("mail.timeout", 10*1000+"");
will cause the underlying Socket SO_TIMOUT to be set. A configurable
property would be nicer and easy to add if this works.
I haven't tested this, but if someone could verify it would be a good
improvement to make. Otherwise I can put it on my todo list.

Harmeet

----- Original Message -----
From: "Serge Knystautas" <se...@lokitech.com>
To: <ja...@jakarta.apache.org>
Sent: Tuesday, June 12, 2001 5:37 AM
Subject: Re: Blocked thread in RemoteDelivery


> Scott,
>
> I've seen this happen on rare occasion, but have never been able to
pinpoint
> what happens to that delivery thread.  I haven't been able to catch any
> exception or been able to reproduce the problem when I want.  So for now I
> similarly start multiple delivery threads.
>
> If you can reproduce the problem so that I can see it and create a fix, I
> would be most appreciative.  Thanks.
>
> Serge Knystautas
> Loki Technologies
> http://www.lokitech.com/
> ----- Original Message -----
> From: "scott werden" <sc...@scottandrita.com>
> To: <ja...@jakarta.apache.org>
> Sent: Tuesday, June 12, 2001 1:32 AM
> Subject: Blocked thread in RemoteDelivery
>
>
> >
> > Outgoing mail stopped being delivered today by my James server and I
took
> a
> > look at log files and code to see what was going on. What I discovered
is
> > that it appears the one and only delivery thread (created in
> > RemoteDelivery.java) got blocked within RemoteDelivery.deliver(). In the
> > code, a message gets logged (line 109) saying: "attempting delivery of
> XXX",
> > and another at line 130 that should report the message was successfully
> > sent. I never saw the 2nd message in the log file (although I saw the
1st)
> > after James hung, nor was there a message for any exceptions. Seems like
> > something hung in transport.connect() or transport.sendMessage(). I
> > restarted James and all the backed-up messages got sent and it is again
> > working OK. I did up the threads but this is just a delay tactic and not
a
> > fix.
> >
> > Anybody got any ideas? Has this bug been fixed? I have release 1.2.1.
> >
> > Thanks,
> > Scott W.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: james-user-help@jakarta.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-user-help@jakarta.apache.org
>


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


Re: Blocked thread in RemoteDelivery

Posted by Serge Knystautas <se...@lokitech.com>.
Scott,

I've seen this happen on rare occasion, but have never been able to pinpoint
what happens to that delivery thread.  I haven't been able to catch any
exception or been able to reproduce the problem when I want.  So for now I
similarly start multiple delivery threads.

If you can reproduce the problem so that I can see it and create a fix, I
would be most appreciative.  Thanks.

Serge Knystautas
Loki Technologies
http://www.lokitech.com/
----- Original Message -----
From: "scott werden" <sc...@scottandrita.com>
To: <ja...@jakarta.apache.org>
Sent: Tuesday, June 12, 2001 1:32 AM
Subject: Blocked thread in RemoteDelivery


>
> Outgoing mail stopped being delivered today by my James server and I took
a
> look at log files and code to see what was going on. What I discovered is
> that it appears the one and only delivery thread (created in
> RemoteDelivery.java) got blocked within RemoteDelivery.deliver(). In the
> code, a message gets logged (line 109) saying: "attempting delivery of
XXX",
> and another at line 130 that should report the message was successfully
> sent. I never saw the 2nd message in the log file (although I saw the 1st)
> after James hung, nor was there a message for any exceptions. Seems like
> something hung in transport.connect() or transport.sendMessage(). I
> restarted James and all the backed-up messages got sent and it is again
> working OK. I did up the threads but this is just a delay tactic and not a
> fix.
>
> Anybody got any ideas? Has this bug been fixed? I have release 1.2.1.
>
> Thanks,
> Scott W.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-user-help@jakarta.apache.org
>
>


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