[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
TCP sockets timeout...
how can I check whether a tcp socket I'm serving on (under Berkely sockets)
is still alive, i.e. did the client
on the other end is dead, or just didn't request any service for some time.
One way of doing it I figure
would be to use the 'keepalive' socket option and test for error, is there
any other way of doing it??
( would the 'keepalive' option send it's test data to the destination tcp
module or to the dest process, i.e.
would it let me know whether the dest tcp module is still alive (not good)
or whether the actual port
(process) my socket is connected to is still alive??)
And in other news...what is a "sane" number of processes to run under a
standard P-II machine (one processor, say 350-450Mhz, 64Megs...) each
process taking about 100K for text and about 10-15K for data. (All processes
being identical, as they're simply childs of the original server, forking to
serve
many concurrent clients).
And last but not least, is it a good practice to let 5000 concurrent clients
access a database (built around
about 100 files on local disk) at the same time (each for a read of about
100bytes), or should it be
done otherwise for optimal results (such as reading necessary data into ram
and share it among the
proccesses)