tobilg/facebook-events-by-location

Error?

Closed this issue · 10 comments

{"error":{"name":"RequestError","message":"Error: read ECONNRESET","cause":{"code":"ECONNRESET","errno":"ECONNRESET","syscall":"read"},"error":{"code":"ECONNRESET","errno":"ECONNRESET","syscall":"read"},"options":{"uri":"https://graph.facebook.com/v2.5/?ids=127441017326962,150894624980689,194434307263554,180330992061245,389455701110636,1735548000045026,131742643881716,955638347847172,295737303787313,158145237539244,503611312991966,498934683458774,105812999462134,1728606427375534,375564855890791,1578606252429484,514986965366307,287295481368298,320483054816447,512648798895818,185383161511805,263252603757290,1606986779557850,363336153679909,284441741691,230765903606560,286328198124484,144802245616095,542226402594618,328383323863257,951866271553258,200566626701283,173851676302538,109181268358,1107600152605974,359852354058262,315320511889887,476420995745096,165481346992444,817137978384391,123752874332606,399135630131323,383016895171944,521386754626712,142481265822821,247358048775274,659832007439199,1050866878328898,191353874233477,129919440445879&fields=id,name,cover.fields(id,source),picture.type(large),location,events.fields(id,name,cover.fields(id,source),picture.type(large),description,start_time,attending_count,declined_count,maybe_count,noreply_count).since(1473787811)&access_token=THEACCESSTOKEN","method":"GET","simple":true,"resolveWithFullResponse":false}}}

Do you know what kind of error is this?
To reproduce it simply hit the IP that you host your service, about 3-4 times repeatedly with refresh button.

Does this happen all the time, or just sometimes? I guess Facebook is resetting the connection, probably because it took too long to send the response. Never occured for me though. Where do you run the service?

Ι run it on Digital Ocean droplet

We have tried with different access tokens but still we get the same error.

The droplet has these specs

1GB/1CPU
30GB SSD

I just tested the URL with one of my App Access Tokens, and it runs just fine. The same as your query above...

Also when I hit refresh >10 times, still working nicely.

The error goes out sometimes.
Try again by refreshing 3-4 times only.
Just had the error though

http://imgur.com/a/q3JpH

I don't see this error myself, even after refreshing a lot of times, nor has this ever been reported before. I'm quite sure that this is not a problem with the application itself.

So you think its an issue of our server? Any hint of what we should check out?

One idea would be to play around with the agent options/pool settings, see: https://www.npmjs.com/package/request#requestdefaultsoptions

When i get the error page, in the console it prints

GET /events?lat=40.9869273&lng=29.0282574&distance=5000&sort=time&access_token=AccessToken 500 544.789 ms - 1429

Do you know what is the limit for using graph api with your node app???
Because in my developers facebook panel i cant see how many graph api requests i have.

Not sure what you mean... As written in the README rate limiting is a factor. This has nothing to do with the facebook-events-by-location app itself.