Re: Help improving IO::Socket script response
- From: xhoster@xxxxxxxxx
- Date: 27 Nov 2006 23:28:20 GMT
Marc Bissonnette <dragnet\_@_/internalysis.com> wrote:
Hi all;
I'm not sure where/what I've gone wrong here; The purpose of the code
below is to get the server type (Apache/IIS/etc) from a list of URLs.
In the SQL query (whose results are used in the IO::Socket call), the
data from 'cname' will be a string, like "Foo Internet", the data from
'mainurl' will be a url like "www.foo.com"
The problem lies in massive time-outs (I don't know what the longest
is/can be: I've killed the process after ten minutes, however);
If you had time-outs, you wouldn't have to kill the process, it would
kill itself (or the connection). It seems to me the problem is that you
*don't* have timeouts, rather you have long periods of blocking. But
where is the blocking taking place, upon connecting the socket or upon
reading from it?
The only
sanity-saving option so far is to run it in batches of ten URLs, but I've
got a list of ~400 to go through.
If the long blocking is in the reads, see IO::Select.
Or just use LWP::Parallel and let it handle all of that stuff.
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
.
- References:
- Help improving IO::Socket script response
- From: Marc Bissonnette
- Help improving IO::Socket script response
- Prev by Date: Re: Simple regex question
- Next by Date: Re: Help improving IO::Socket script response
- Previous by thread: Help improving IO::Socket script response
- Next by thread: Re: Help improving IO::Socket script response
- Index(es):
Relevant Pages
|
|