HTTPError: 502 Server Error: Bad Gateway

1,604 views
Skip to first unread message

Daniel Zuidinga

unread,
Aug 25, 2016, 2:35:34 PM8/25/16
to Firebase Google Group
When I post data to firebase via python from time to time I get the error:

HTTPError: 502 Server Error: Bad Gateway


This seems to be random. I can't identify the reason. Sometimes I have also problems getting data from firebase via c#. After some retries it works.

Jacob Wenger

unread,
Aug 30, 2016, 2:27:23 AM8/30/16
to fireba...@googlegroups.com
Hey Daniel,

Are you using the REST API? Or a third-party wrapper?

Does your Firebase project happen to be on a server that experienced downtime during your testing (check the status dashboard here)? You can find which server your Firebase project is on by navigating to:

https://<DATABASE_NAME>.firebaseio.com/.settings/owner.json

Make sure to replace <DATABASE_NAME> with the name of your database.

Cheers,
Jacob

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/d73ba7c0-87b4-45eb-93a8-676d03fb93c4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tony Meng

unread,
Aug 30, 2016, 3:07:19 PM8/30/16
to Firebase Google Group
Daniel,

As Jacob mentioned, if you can provide us your database name as well as the server you're on, we can investigate further for you and let you know what's going on on our side.

Thanks,
Tony


On Monday, August 29, 2016 at 11:27:23 PM UTC-7, Jacob Wenger wrote:
Hey Daniel,

Are you using the REST API? Or a third-party wrapper?

Does your Firebase project happen to be on a server that experienced downtime during your testing (check the status dashboard here)? You can find which server your Firebase project is on by navigating to:

https://<DATABASE_NAME>.firebaseio.com/.settings/owner.json

Make sure to replace <DATABASE_NAME> with the name of your database.

Cheers,
Jacob
On Thu, Aug 25, 2016 at 11:35 AM, 'Daniel Zuidinga' via Firebase Google Group <fireba...@googlegroups.com> wrote:
When I post data to firebase via python from time to time I get the error:

HTTPError: 502 Server Error: Bad Gateway


This seems to be random. I can't identify the reason. Sometimes I have also problems getting data from firebase via c#. After some retries it works.

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.

Dušan Plavák

unread,
Oct 10, 2016, 11:20:18 AM10/10/16
to Firebase Google Group
Hi there,

I have exactly the same problem. For some reason python throws an error:

File "/some/path/python3.5/site-packages/requests/models.py", line 862, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 502 Server Error: Bad Gateway for url: https://ibetproject.firebaseio.com/...

Server is:
s-usc1c-nss-120.firebaseio.com

and DB name is:
ibetproject

Could you look at it?

From my observation it can be something with size of put request. Because some put request are just fine, but others will fail wit 502 Bad Gateway

Dňa utorok, 30. augusta 2016 21:07:19 UTC+2 Tony Meng napísal(-a):

Tony Meng

unread,
Oct 10, 2016, 1:18:19 PM10/10/16
to Firebase Google Group
Hi Dušan,

I've been trying to reproduce the issue without much success. I am hoping you can help me go a bit deeper. If you could answer the following questions, that'd be super helpful.

1. How long have you been seeing the issue? 
2. What payload are you uploading? 
3. What version of requests are you using?
4. Are you using auth?

Thanks!
Tony

Tony Meng

unread,
Oct 10, 2016, 7:47:24 PM10/10/16
to Firebase Google Group
Also, if you add the query param `?print=silent` does that fix your issue?

Tony Meng

unread,
Oct 11, 2016, 1:49:53 PM10/11/16
to Firebase Google Group
We believe the reason to be caused by the `debug` param set to 'true' in your auth token. For writes, with debug set, the response includes the full payload. So for large writes, the response may be very large.

We're actively working on mitigating this issue on our side; to make the response header named 'X-Firebase-Auth-Debug' of reasonable size.

I will let you know when we have pushed this fix. In the meantime, if you remove the debug param from your auth header, you can bypass this issue as well.

Tony Meng

unread,
Oct 12, 2016, 5:38:57 PM10/12/16
to Firebase Google Group
We have rolled out a fix for the Firebases listed in this thread.

JimJty

unread,
Dec 14, 2016, 9:05:20 PM12/14/16
to Firebase Google Group
Was this fix rolled out to all Firebases? I have been having this problem for months (I handle it by reposting on failure), finally got fed up after my unit tests were failing.

Here is my server name:
and

Jacob Wenger

unread,
Dec 15, 2016, 12:55:37 PM12/15/16
to fireba...@googlegroups.com
Hey Jim,

This thread is from a couple months ago, so almost certainly the change has made it to all Firebase Database. Please reach out through our personalized support channel so we can help you with your specific problem.

Cheers,
Jacob

To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages