[Spambayes] Re: Cannot connect to socket with sb_bnserver.py
Toby Dickenson
tdickenson at geminidataloggers.com
Mon Apr 19 03:28:52 EDT 2004
On Friday 16 April 2004 22:00, papaDoc wrote:
> I read a little on python socket and usually on connect to a host on a
> given port not to a file ?
unix domain sockets have a name stored in the filesystem, and are used for
inter-process communication on one machine. (the name of the socket is stored
on the filesystem, but the data doesnt actually go to disk). try `man unix`
On Friday 16 April 2004 22:46, Skip Montanaro wrote:
> >> What happens if you run sb_bnserver.py standalone like:
> >>
> >> sb_bnserver -a 2 /tmp/test-socket
> >>
> >> ? Does it exit quickly with a traceback or sit there quietly for
> >> two seconds before exiting?
>
> Remi> it sit there for 16sec and exit without any traceback (This is
> Remi> running on a 486 at +/- 72% or CPU load)
16 seconds? that sounds wrong. the '-a 2' bit of the command line tells it to
terminate after 2 seconds of inactivity. Did it really take 14 seconds to
import and initialise spambayes? On this machine it takes 2.7 seconds,
implying initialisation takes 0.7 seconds.
How long does it take to run:
echo test|scripts/sb_filter.py
On this machine that 0.7 seconds, which is consistent with my timings above.
If you can debug where your 14 seconds are being spent, Im sure you will find
a strong clue to your problem.
Are you on linux? if so, the following command will create a log file of all
syscalls. Im sure that will contain the answer. Email me (off-list) or make
it available for download.
echo test| strace -tt -f -o trace.txt python contrib/sb_bnfilter.py
> Hmmm... I'm completely out of ideas. Maybe Toby Tickenson (Toby, are you
> out there?) has some ideas.
Im here. Ive only been quiet because Skips answers have been so good, and in
the right timezone.
--
Toby Dickenson
More information about the Spambayes
mailing list