Script should take list of urls from MySQL database and download them in multiple threads.
Very important - no memory leaks and no 100% CPU usage! Also no hanging up – script should end by itself because it will called by cron.
So I think cURL can NOT be used, only sockets. Real multithreading or just non-blocking sockets – it's your choice – I don't care while script works.
Also I think Perl will be the best language for this task but if you can make good working script using PHP or Python it's also OK.
Maximum time – 3 days.
Technical details - [login to view URL]
Please read it before bidding.