http://www.perlmonks.org?node_id=995399


in reply to Thread::Queue and WWW::Curl

You don't show where you create instances of WWW::Curl(::Easy). I recommend that you do so separately and only within each thread, because most likely the WWW::Curl objects are backed by corresponding C objects, and those may or may not like dancing between different threads and maybe are not even threadsafe unless precautions are taken.

Personally, I would look at ditching threads and looking at the Curl-native routines in WWW::Curl::Multi. These should be able to run within a single worker thread and at least for the fetching part, you are most likely limited by network bandwidth/latency anyway.