Skip Menu |
 

This queue is for tickets about the LWP-Protocol-https CPAN distribution.

Report information
The Basics
Id: 80444
Status: resolved
Priority: 0/
Queue: LWP-Protocol-https

People
Owner: Nobody in particular
Requestors: pavel.strashkin [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: LWP over HTTPS eats up to 100% of CPU on either slow connection or server
Date: Sat, 27 Oct 2012 21:13:35 -0700
To: bug-LWP-Protocol-https [...] rt.cpan.org
From: Pavel Strashkin <pavel.strashkin [...] gmail.com>
Download (untitled) / with headers
text/plain 825b
Hello there, The reason why it happens (subject) is because it calls read/sysread millions of times without waiting for read event. It fails with EAGAIN. I was looking at the code and here is what i saw: == lib / LWP / Protocol / https.pm == our @ISA = qw(Net::HTTPS LWP::Protocol::http::SocketMethods); == lib / LWP / Protocol / https.pm == The parents order. Because Net::HTTPS goes first, it handles the sysread call. That means sysread/can_read/select/sysread sequence from SocketMethods never happens. Looks it easy to fix, but it is not. You can't just change the order. In this case sysread would not reach IO::Socket::SSL. What i could do and it actually worked for me is copy/paste sysread/can_read from SocketMethods and call IO::Socket::SSL::sysread at the end. I guess there should be better way. Thank you!


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.