Syntactic Confectionery Delight | |
PerlMonks |
Code using threads crashes intermittentlyby ashish.kvarma (Monk) |
on Sep 28, 2009 at 03:35 UTC ( [id://797815]=perlquestion: print w/replies, xml ) | Need Help?? |
ashish.kvarma has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
For last couple of days I have been stuck to an error and have no clue where I might be doing wrong. The code given below is of a crawler using threads to crawl multiple pages at a time. The code works fine for most of the time but some time it crashes with following error: Faulting application perl.exe, version 5.10.0.1003, time stamp 0x482a29fd, faulting module SSLeay.dll, version 0.0.0.0, time stamp 0x482a38ff, exception code 0xc0000005, fault offset 0x0001b323, process id 0x135c, application start time 0x01ca3ba8cbd1d852.I am using activestate perl 5.10.0.1003 (have also tried 5.10.0.1005) on Windows Vista (got same results on Windows XP). Here is a brief decription of code and the code itself.Event listener is a class which loops over the Thread::Queue contents (listen method) and based on the contents inserts data in database and does other processing. Crawler class provides methods to crawl over the web sites (using WWW::Mechanize) and adds data to Queue. Crawler first login to the website and collect various links from where data is to be extracted and then inside a infinite loop crawl over those pages. Crawler returns immediately if there is no data available to extract, if data is found then it stays there and refreshes the page every 30 sec to get data till the data is available. So far I have only found only two things
I appreciate any help to solve and enhance the script. Thanking you all in advance.
Regards, Ashish
Back to
Seekers of Perl Wisdom
|
|