tcp sessions

Post Reply
zatar
Posts: 14
Joined: Mon Mar 17, 2003 4:05 am

tcp sessions

Post by zatar »

alex,

i'm running 3.62 of newspro and i've noticed a problem. newspro keeps tcp sessions active when no tasks are running. this is causing me grief w/ newsfeeds. when i start up newspro it trys to download some articles from the spamkiller server. these messages no longer exist on that server so it errors out. if i check taskmanager i see no tasks running. if i run netstat from the dos prompt, i see three tcp sessions to the ntp port on spamkiller in the established state. if i try to get new headers on the spamkiller server, it tells me too many connections. the os is win xp pro.

why isn't newspro tearing down the tcp sessions after all the tasks complete?
blackdog56
Posts: 106
Joined: Thu Feb 27, 2003 7:33 pm

Post by blackdog56 »

Some don't prefer that. Settings-->General-->Keep Alive (faster)
alex
Posts: 4547
Joined: Thu Feb 27, 2003 5:57 pm

Post by alex »

To clear errors so it won't download failed messages again just press the question sign on the toolbar (tasks menu->clear errors), there is also option in properties->tasks not to save failed tasks ('save task list' 'with failed' - if you like uncheck the right check box).

It is perfectly normal if you see TIME_WAIT or other states in netstat even after you've closed the program.

The system manages connections. It tries to close them gracefully. Servers may be not nice - not close connection gracefully, then such connections will expire by themselves, it is just a socket data structure on the client side that doesn't influence anything. There is a function to clear the data structure but it doesn't make sense, it may even create a problem, if to clean the data structure instead of graceful close - the server will be unaware about that and think that the connection is still open and you may run into the 'too many connections' error.
zatar
Posts: 14
Joined: Mon Mar 17, 2003 4:05 am

Post by zatar »

alex,

i'm quite familiar with the different tcp states. as i stated, it isn't a time_wait, it's an established session. this means neither end has started the tear down process. why is newspro keeping the session alive when there are no active task? it is causing me a problem with newsfeeds at the moment. newspro is not using the established sessions, it is attempting to open new session which the newsfeeds server are not allowing.

will the settings->general->keep alive change the behavior?
alex
Posts: 4547
Joined: Thu Feb 27, 2003 5:57 pm

Post by alex »

yes, you can uncheck keep-alive, then newspro won't keep open connections for future reuse.

keep-alive doesn't violate number of tasks per server or per server subset, unless you are running multiple instances (then just uncheck keep-alive). for large number of small articles it is significantly faster since estabilishing a connection may take some time.
Post Reply