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 "Brian J. Sayatovic" <tr...@trinition.org> on 2003/08/16 01:45:04 UTC

POP3Fetcher leaving open connections?

I'm running James 2.1.3 on XP and recently found some slowness on my PC that
made me investigate.  I don't know if this one thign I found caused my
slowness, but I definitely don't think its good.

I found 153 open connections to my ISP's POP3 server.

I'm running POP3Fetcher to pull down my e-mail for my old address as I'm
transitioning to my new address at my domain (Which James is set up for).
Looking in my log for the pop3 fetcher, I saw lots of lines about null
messages.  Using my ISPs web mail interface, I saw roughly 200 messages in
my inbox that were from some time ago (some a couple of months old, when I
started using James).

I suspect something in one of those messages is breaking the POP3Fetcher and
leaving it in a state where its not closing the connection (and despite
popular belief, a Windows OS can stay up for a very long time!)

Anyone else experience this?  I realize POP3Fetcher is experimental, but
this may be worth fixing.

Regards,
Brian.

--
Help free our mailboxes. Include http://wecanstopspam.org in your signature.


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


RE: POP3Fetcher leaving open connections?

Posted by "Noel J. Bergman" <no...@devtech.com>.
Danny,

Done.  Please review.  :-)

	--- Noel

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


RE: POP3Fetcher leaving open connections?

Posted by Danny Angus <da...@apache.org>.
thx Noel.
Sounds like you've hit the nail on the head, I'd be *really* grreatful if
you did find time to implement the change you suggest, as I've got a big
deadline for M-o-n-d-a-y ..aaarghh.

d.

> -----Original Message-----
> From: Noel J. Bergman [mailto:noel@devtech.com]
> Sent: 16 August 2003 20:05
> To: James Users List
> Subject: RE: POP3Fetcher leaving open connections?
>
>
> Danny,
>
> You implemented a fix last October (FetchPOP.java v1.5), but that has been
> in all released versions of James v2.1.x.  Brian indicates that he is
> running v2.1.3, and there have not been any updates since then.
>
> Looking over the current code, there is a try {} around the entire
> transaction, and a try {} inside the for-loop.  However, the latter isn't
> the entire block.  The pop.retrieveMessage() call isn't protected, so any
> exception occuring during that operation would cause the process
> to exit to
> the outer try {}, which would terminate the task.
>
> It seems to me that the try {} should be expanded to include the few
> statements not already in it, and later in the code, pop.logout and
> pop.disconnect should be moved to a finally {}.
>
> Steve Brewin, since he's currently working in Fetchmail, should
> also review
> that code.  It appears at first glance to have the same problem, although
> expressed differently.  There is no protection at all for an exception in
> the message processing loop, nor anything to ensure that folder.close() is
> called.
>
> If neither one of you wants to get to it, I'll do it later.
>
> 	--- Noel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>


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


RE: POP3Fetcher leaving open connections?

Posted by "Noel J. Bergman" <no...@devtech.com>.
Steve,

Since you're working in Fetchmail to post up for v2.2 (and HEAD?) with
attributes, I'll just leave it to you.  I've only been looking at what is in
CVS.

Have fun sailing.  I've a friend who races out of Vancouver.  She's hoping
to do the Vic/Maui race at some point.

	--- Noel


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


RE: POP3Fetcher leaving open connections?

Posted by Steve Brewin <sb...@synsys.com>.
Noel,

This problem is one of a few I fixed in my originally submitted v3 reworked
version of fetchmail. In
org.apache.james.fetchmail.FolderProcessor.process() the open() call is
enclosed in a try block for which there is a finally clause that always
invokes close() on the folder.

I'm midway through testing the promised v2.2 version that derives and
improves on this, but this part has not been changed. If you are seeing a
condition in my reworked v3 version where the finally clause would not be
executed please let me know so I can fix it prior to submission (next few
days).

-- Steve

Disclaimer: This is an early a.m. answer due to jet lag. Worse, I'm supposed
to be off (sail) racing in 5 hours time!

> -----Original Message-----
> From: Noel J. Bergman [mailto:noel@devtech.com]
> Sent: 16 August 2003 20:05
> To: James Users List
> Subject: RE: POP3Fetcher leaving open connections?
>
>
> Danny,
>
> You implemented a fix last October (FetchPOP.java v1.5), but
> that has been
> in all released versions of James v2.1.x.  Brian indicates that he is
> running v2.1.3, and there have not been any updates since then.
>
> Looking over the current code, there is a try {} around the entire
> transaction, and a try {} inside the for-loop.  However, the
> latter isn't
> the entire block.  The pop.retrieveMessage() call isn't
> protected, so any
> exception occuring during that operation would cause the
> process to exit to
> the outer try {}, which would terminate the task.
>
> It seems to me that the try {} should be expanded to include the few
> statements not already in it, and later in the code, pop.logout and
> pop.disconnect should be moved to a finally {}.
>
> Steve Brewin, since he's currently working in Fetchmail,
> should also review
> that code.  It appears at first glance to have the same
> problem, although
> expressed differently.  There is no protection at all for an
> exception in
> the message processing loop, nor anything to ensure that
> folder.close() is
> called.
>
> If neither one of you wants to get to it, I'll do it later.
>
> 	--- Noel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>


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


RE: POP3Fetcher leaving open connections?

Posted by "Noel J. Bergman" <no...@devtech.com>.
Danny,

You implemented a fix last October (FetchPOP.java v1.5), but that has been
in all released versions of James v2.1.x.  Brian indicates that he is
running v2.1.3, and there have not been any updates since then.

Looking over the current code, there is a try {} around the entire
transaction, and a try {} inside the for-loop.  However, the latter isn't
the entire block.  The pop.retrieveMessage() call isn't protected, so any
exception occuring during that operation would cause the process to exit to
the outer try {}, which would terminate the task.

It seems to me that the try {} should be expanded to include the few
statements not already in it, and later in the code, pop.logout and
pop.disconnect should be moved to a finally {}.

Steve Brewin, since he's currently working in Fetchmail, should also review
that code.  It appears at first glance to have the same problem, although
expressed differently.  There is no protection at all for an exception in
the message processing loop, nor anything to ensure that folder.close() is
called.

If neither one of you wants to get to it, I'll do it later.

	--- Noel


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


RE: POP3Fetcher leaving open connections?

Posted by Danny Angus <da...@apache.org>.
There was a problem, as you describe it a "broken" message would cause the
whole process to be abandoned, not just that message, I *believe* I fixed
it, perhaps you might try using a newer version of James to confirm this, if
it is still broken get back in touch and I'll address it again.

d.

> -----Original Message-----
> From: Brian J. Sayatovic [mailto:trin@trinition.org]
> Sent: 16 August 2003 00:45
> To: server-user@james.apache.org
> Subject: POP3Fetcher leaving open connections?
>
>
> I'm running James 2.1.3 on XP and recently found some slowness on
> my PC that
> made me investigate.  I don't know if this one thign I found caused my
> slowness, but I definitely don't think its good.
>
> I found 153 open connections to my ISP's POP3 server.
>
> I'm running POP3Fetcher to pull down my e-mail for my old address as I'm
> transitioning to my new address at my domain (Which James is set up for).
> Looking in my log for the pop3 fetcher, I saw lots of lines about null
> messages.  Using my ISPs web mail interface, I saw roughly 200 messages in
> my inbox that were from some time ago (some a couple of months old, when I
> started using James).
>
> I suspect something in one of those messages is breaking the
> POP3Fetcher and
> leaving it in a state where its not closing the connection (and despite
> popular belief, a Windows OS can stay up for a very long time!)
>
> Anyone else experience this?  I realize POP3Fetcher is experimental, but
> this may be worth fixing.
>
> Regards,
> Brian.
>
> --
> Help free our mailboxes. Include http://wecanstopspam.org in your
> signature.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>


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