ccampbell/chromephp — Issue #10: a lot of logs throws 502 in nginx
Author: zxqfox
Created: 2011-12-16 07:12:29+00:00
State: open

Error in nginx log:
2011/12/16 11:02:57 [error] 13912#0: *5 upstream sent too big header while reading response header from upstream,...
Client received HTTP/1.0 502 ...

fix:

@@ -602,6 +602,12 @@
*/
protected function _writeToFile($json)
{
+ static $setCookie;
+
+ if (!empty($setCookie)) {
+ return $setCookie;
+ }
+
// if the log path is not setup then create it
if (!is_dir($this->getSetting(self::LOG_PATH))) {
mkdir($this->getSetting(self::LOG_PATH));

and

- return $this->_setCookie($data);
+ return $setCookie = $this->_setCookie($data);