On Thu, 2005-03-17 at 11:16 +0000, Colin MacDonald wrote: > Trog wrote: > > > > Well obviously it doesn't. I suspect you are either parsing the port > > number incorrectly, or your system is blocking connections to high port > > numbers. > > No, actually it does. The piece of code that issues the STREAM command > and receives the port number has successfully scanned many thousands of > files by now. It works fine. > > If you'd taken the time to read through the original post before > assuming auto-superiority mode you'd see that the problem happens only > occasionally, happens simultaneously on every thread that clamd is > running, and only happens after a database reload. What is it about > that, fairly narrow, set of circumstances that suggests that the client > code is faulty?
Experience. I've seen this before with third-party software. You need to do some diagnostic work in your program. Start by logging the port string that clamd returns, and the actual PORT number that your program is trying to connect to. Also add a timeout on waiting for the repsonse, to make sure they are arriving ok. > > In the trace above clamd was running at the configured maximum thread > count (50 in this instance); it could be that the problem only occurs > when all threads have been activated. I haven't checked the code to see > if threads are created on demand or all at once. It creates threads on demand. It's probably the other way around. Your reaching the maximum thread count because they are all waiting for a response after issuing the PORT reply to your program. -trog
signature.asc
Description: This is a digitally signed message part
_______________________________________________ http://lurker.clamav.net/list/clamav-devel.html