Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This fixes the open bug #37 on Facebook::Graph bugs list #58

Merged
merged 1 commit into from
Oct 22, 2015
Merged

This fixes the open bug #37 on Facebook::Graph bugs list #58

merged 1 commit into from
Oct 22, 2015

Conversation

jussikinnula
Copy link
Contributor

Fix socket leak: Replace AnyEvent::HTTP::LWP::UserAgent with LWP::UserAgent

The reason to replace AnyEvent and AnyEvent::HTTP::LWP::UserAgent based
requests with LWP::UserAgent, is because of stability. It seems that at least
on certain Linux systems AnyEvent::HTTP::LWP::UserAgent starts to leak
sockets. The socket leak will lead, that all the responses will start to fail.

The failure error message is "Could not fetch access token: No such device
or address at /app/local/lib/perl5/Facebook/Graph/AccessToken/Response.pm
line 24." - which doesn't tell that much, but is related that the request did
never leave, because opening a socket failed.

It would be nice to fix AnyEvent::HTTP::LWP::UserAgent in general for the
actual socket leak problem, but as the Facebook::Graph module is a dependency
for quite many business applications - it's imperative to use a stable HTTP
client. And as the Facebook::Graph module does not actually do anything
asynchronously, it's not required to use an async HTTP client - at least for
now.

…rAgent

The reason to replace AnyEvent and AnyEvent::HTTP::LWP::UserAgent based
requests with LWP::UserAgent, is because of stability. It seems that at least
on certain Linux systems AnyEvent::HTTP::LWP::UserAgent starts to leak
sockets. The socket leak will lead, that all the responses will start to fail.

The failure error message is "Could not fetch access token: No such device
or address at /app/local/lib/perl5/Facebook/Graph/AccessToken/Response.pm
line 24." - which doesn't tell that much, but is related that the request did
never leave, because opening a socket failed.

It would be nice to fix AnyEvent::HTTP::LWP::UserAgent in general for the
actual socket leak problem, but as the Facebook::Graph module is a dependency
for quite many business applications - it's imperative to use a stable HTTP
client. And as the Facebook::Graph module does not actually do anything
asynchronously, it's not required to use an async HTTP client - at least for
now.
rizen added a commit that referenced this pull request Oct 22, 2015
This fixes the open bug #37 on Facebook::Graph bugs list
@rizen rizen merged commit e0d664f into rizen:master Oct 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants