You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2008/09/16 02:41:09 UTC

[Bug 5974] New: spamc: separate connect timeout from read timeout

https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5974

           Summary: spamc: separate connect timeout from read timeout
           Product: Spamassassin
           Version: 3.2.5
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: spamc/spamd
        AssignedTo: dev@spamassassin.apache.org
        ReportedBy: mrgus@disco-zombie.net


Created an attachment (id=4366)
 --> (https://issues.apache.org/SpamAssassin/attachment.cgi?id=4366)
Patch that adds separate connect timeout to spamc

Some might find it useful to have different timeouts when connecting vs reading
from the socket in situations where failover is being used. In my case, if one
host is down, sometimes spamc will stall for quite a while trying to open the
connection in the first place, and would want the timeout to be short so I
don't have a bunch of processes waiting for a dead host to open a connection.
On the other hand, I don't want the timeout when a socket was opened to be so
short, since this means the host is up, but probably just busy and is much more
likely to return a proper response. And since it's busy, and we're using
multiple hosts with failover and randomization, all other hosts are probably
busy as well.

Of course, many won't care, so if the connect-specific timeout isn't specified,
the read timeout or default timeout should be used.

I've attached a patch for the spamc that comes with 3.2.5 that should add this
functionality, though I make no guarantees of quality (it's pretty simple,
tho). :)


-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 5974] spamc: separate connect timeout from read timeout

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5974


Justin Mason <jm...@jmason.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




--- Comment #3 from Justin Mason <jm...@jmason.org>  2009-06-30 14:20:16 PST ---
thanks, applied just in time for 3.3.0 alpha...

: 252...; svn commit -m "bug 5974: add -n / --connect-timeout switch to spamc,
allowing separate connection timeout from communication timeout. thanks to
<mrgus /at/ disco-zombie.net>" spamc
Sending        spamc/libspamc.c
Sending        spamc/libspamc.h
Sending        spamc/spamc.c
Sending        spamc/utils.c
Sending        spamc/utils.h
Transmitting file data .....
Committed revision 789960 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=789960 ).

: 256...; svn commit -m "bug 5974: add POD docs for new switch" spamc/spamc.pod

Sending        spamc/spamc.pod
Transmitting file data .
Committed revision 789962 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=789962 ).

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 5974] spamc: separate connect timeout from read timeout

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5974


Justin Mason <jm...@jmason.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|Undefined                   |3.3.0




--- Comment #1 from Justin Mason <jm...@jmason.org>  2008-09-16 01:33:39 PST ---
looks good to me. thanks!


-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 5974] spamc: separate connect timeout from read timeout

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5974


Nico Prenzel <ni...@pn-systeme.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nico.prenzel@pn-systeme.de




--- Comment #2 from Nico Prenzel <ni...@pn-systeme.de>  2008-09-17 06:06:55 PST ---

please keep in mind, that this new option won't work for win32 spamc.
I've just tried this. Sadly, there isn't a simple solution for a connection
timout on win32 platform.


-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.