Skip to content
New issue

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

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

Already on GitHub? # to your account

ChromePhp - Ngnix 502 Bad Gateway error #40

Open
eltelemaco opened this issue Feb 17, 2014 · 3 comments
Open

ChromePhp - Ngnix 502 Bad Gateway error #40

eltelemaco opened this issue Feb 17, 2014 · 3 comments

Comments

@eltelemaco
Copy link

This is a useful extension, but there is a problem with some Ngnix and apache server due big header data sent by ChromePhp json, you can skip this issue by only using when really need it, with no abuse.

@soyuka
Copy link

soyuka commented Sep 16, 2014

+1
Seldaek/monolog#206
#23

Seldaek/monolog#172 :

Researched it a bit and I patched it, chrome seems to have a limit of 256KB across all headers, so splitting it like firephp wouldn't help. Anyway if someone can confirm it works fine it'd be nice.

...

@plawley
Copy link

plawley commented Nov 1, 2017

splitting it like firephp likely would help.
AWS application load balancers also seem to have a low header limit making it near impossible to use chromelogger with modern AWS resources.

Maybe do something like 1 header entry per log call, then stop at a configurable combined header length with a final warn('too many logs..') entry.
(clients can handle that last part, but chromelogger extension needs to support the mutli-header approach to make this extension usable at all anymore)

@bkdotcom
Copy link

bkdotcom commented Oct 8, 2019

bump

https://docs.aws.amazon.com/elasticloadbalancing/latest/userguide/how-elastic-load-balancing-works.html

The following size limits for Application Load Balancers are hard limits that cannot be changed.

HTTP/1.x Headers
Request line: 16 K
Single header: 16 K
Whole header: 64 K

HTTP/2 Headers
Request line: 8 K
Single header: 8 K
Whole header: 64 K

would really like to chunk the output into multiple headers

https://craig.is/writing/chrome-logger/techspecs

  1. First you should JSON encode it:
  2. Then you should utf8 encode it:
  3. THEN you should base64 encode it:
  4. Finally, you may optionally split it into chunks and prefix each chunk sequentially.. 'x:'
X-ChromeLogger-Data: 1:chunk_o_data
X-ChromeLogger-Data: 2:chunk_o_data
X-ChromeLogger-Data: 3:chunk_o_data

This will also necessitate a new protocol version header
X-ChromeLogger-Version: 2.0

(omission of X-ChromeLogger-Version would imply "1.0")

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants