[GH-ISSUE #172] Response headers too big when using Chrome PHP handler #57

Closed
opened 2026-03-04 02:11:44 +03:00 by kerem · 3 comments
Owner

Originally created by @Tobion on GitHub (Mar 13, 2013).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/172

I just found a problem with the chrome php logger that is now enabled by default in symfony.
When the response headers get too big, chrome will simply show an error page.
Tthis seems to happen pretty fast, e.g. when using sonata admin.
Eeven curl raises an error when the headers are too big.
So the handler should probably limit it automatically, so the page does not get unusable.
About the limit: According to curl: "avoided giant realloc for header (max is 102400)"
Don't know the exact limit for Chrome.

Originally created by @Tobion on GitHub (Mar 13, 2013). Original GitHub issue: https://github.com/Seldaek/monolog/issues/172 I just found a problem with the chrome php logger that is now enabled by default in symfony. When the response headers get too big, chrome will simply show an error page. Tthis seems to happen pretty fast, e.g. when using sonata admin. Eeven curl raises an error when the headers are too big. So the handler should probably limit it automatically, so the page does not get unusable. About the limit: According to curl: "avoided giant realloc for header (max is 102400)" Don't know the exact limit for Chrome.
kerem closed this issue 2026-03-04 02:11:45 +03:00
Author
Owner

@stof commented on GitHub (Mar 13, 2013):

There is nothing we can do here IMO. the issue is the way ChromePHP works, getting all log messages in a single header. The way Firephp works (using 1 header per log message) avoids getting too big headers.
This should probably be reported to ChromePHP itself.

<!-- gh-comment-id:14840499 --> @stof commented on GitHub (Mar 13, 2013): There is nothing we can do here IMO. the issue is the way ChromePHP works, getting all log messages in a single header. The way Firephp works (using 1 header per log message) avoids getting too big headers. This should probably be reported to [ChromePHP](http://www.chromephp.com/) itself.
Author
Owner

@Seldaek commented on GitHub (Mar 13, 2013):

We can stop appending to the header once it reached the max size of chrome (once that is known). Better have incomplete logs than a broken page IMO.

<!-- gh-comment-id:14840726 --> @Seldaek commented on GitHub (Mar 13, 2013): We can stop appending to the header once it reached the max size of chrome (once that is known). Better have incomplete logs than a broken page IMO.
Author
Owner

@Seldaek commented on GitHub (Apr 23, 2013):

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.

<!-- gh-comment-id:16849542 --> @Seldaek commented on GitHub (Apr 23, 2013): 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.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/monolog#57
No description provided.