Bad gateway

64 views
Skip to first unread message

Guillaume Couture

unread,
Jun 14, 2014, 1:42:22 PM6/14/14
to dand...@spaziodati.eu

Hello!


I have question for you. 


I use PHP to get the data from your API :


json_decode(file_get_contents(sprintf(self::DANDELION_API_URL, urlencode($news['link']), $dandelionConfig['appID'], $dandelionConfig['appKey'])))->text;


I received this error sometimes


failed to open stream: HTTP request failed! HTTP/1.1 502 Bad Gateway\


Even if the website to scrap is reachable.


Can you help me with this?


Guillaume

Stefano Parmesan

unread,
Jun 14, 2014, 2:03:07 PM6/14/14
to dand...@spaziodati.eu
Hello Guillaume,

This looks weird... I tried dataTXT-NEX with that very same webpage, and sometimes it worked (see link below), sometimes I got the exact same error.


It could be due to some network issues, either on our side, or on Yahoo's, but in the last minutes I always got successful requests, are you still getting errors?

Thanks

-- 
Dott. Stefano Parmesan
Backend Web Developer and Data Lover ~ SpazioDati s.r.l.
Via del Brennero, 52 – 38122 Trento – Italy

Guillaume Couture

unread,
Jun 14, 2014, 2:13:47 PM6/14/14
to dand...@spaziodati.eu
Now that is fine

I use to scrap yahoo finance website a lot so I suspect it is your API having a problem.

Do you have problem with "batch" calls (a lot of calls in few seconds) I may try to sleep 1 second between each calls..

Have you logs?

Stefano Parmesan

unread,
Jun 14, 2014, 2:33:10 PM6/14/14
to dand...@spaziodati.eu
We do have logs, but not on requests performed through the "url" parameter (actually I'm not 100% sure on this, but fairly sure, let say... I'll check it later).

If you're submitting many batch requests, it could be that Yahoo is throttling our server, seeing multiple requests coming from the same IP address.

Your idea of "sleeping" between requests may do the trick, please let us know.

Best

Guillaume Couture

unread,
Jun 14, 2014, 2:43:13 PM6/14/14
to dand...@spaziodati.eu
Thank you for your fast answers

Same results with a sleep 1 sec

Now this is the URL returning and error

Well, I was making the same job using alchemy API and everything was working great .. I've been using it for at least one year using the same code.

Any idea?

Stefano Parmesan

unread,
Jun 14, 2014, 3:17:33 PM6/14/14
to dand...@spaziodati.eu
I made some tests and checked the logs, I'm even more convinced that Yahoo is refusing connections from our server, which is definitely something we have to fix.

We already know how to tackle this, but I fear you will have to wait a couple of days, unfortunately.

I'm sorry about this, we'll let you know as soon as we have a fix.

Best,

Guillaume Couture

unread,
Jun 14, 2014, 3:36:31 PM6/14/14
to dand...@spaziodati.eu
Ok, no problem

Thank you :)

Guillaume Couture

unread,
Sep 1, 2014, 1:51:38 PM9/1/14
to dand...@spaziodati.eu
I continue to encounter the same problem...

Can you help me ?

Stefano Parmesan

unread,
Sep 8, 2014, 11:16:34 AM9/8/14
to dand...@spaziodati.eu
Hi Guillaume,

Sorry if this took so much, we had many updates under the hood that were delayed, and this has been moved on and on as well.

Today I released a new version of dataTXT with the changes that will hopefully fix this issue, let me know if you encounter anything strange.

Thank you and regards,

-- 
Dott. Stefano Parmesan
Backend Web Developer and Data Lover ~ SpazioDati s.r.l.
Via Adriano Olivetti, 13 – 4th floor
"Le Albere" district – 38122 Trento – Italy
Reply all
Reply to author
Forward
0 new messages