in reply to A non-blocking socket operation could not be completed ?

As line 276 of HTTP::Methods on CPAN is a comment, you're probably down-level, so upgrading LWP might fix you up.

The error message usually mean that the systems call has return EAGAIN, and needs to be retried. And that fits with the code nearby on CPAN:

## 276 # consume all incoming bytes while(1) { my $bytes_read = $self->sysread($_, 1024, length); if(defined $bytes_read) { $new_bytes += $bytes_read; last if $bytes_read < 1024; } elsif($!{EINTR} || $!{EAGAIN} || $!{EWOULDBLOCK}) +{ redo READ; } ...

Doesn't explain why it would suddenly start failing now ... but worth a look.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^2: A non-blocking socket operation could not be completed ?
by ikegami (Patriarch) on May 16, 2016 at 23:23 UTC
    Nit: It's EWOULDBLOCK, not EAGAIN.
    >perl -MErrno=EAGAIN,EWOULDBLOCK -E"say $!=$_ for EAGAIN,EWOULDBLOCK" Resource temporarily unavailable A non-blocking socket operation could not be completed immediately.

    I don't know why the socket would have been made non-blocking (assuming the message isn't misleading).

Re^2: A non-blocking socket operation could not be completed ?
by slugger415 (Monk) on May 17, 2016 at 14:28 UTC

    Interesting - I updated Net::HTTP:Methods and LWP::UserAgent. I couldn't see any difference in the files, but the script seems to be working consistently now.

    Fingers x'd - thank you!