openminds / sneakers

Sneakers is a simple, fast way to mimick Openminds Shared and Cloud hosting environments using vagrant/virtualbox, and provisioned by Chef.
25 stars 11 forks source link

Nginx errors #44

Closed WouterSioen closed 11 years ago

WouterSioen commented 11 years ago

I get this error in my nginx error log: 2013/11/28 11:58:14 [error] 8792#0: *7 upstream sent too big header while reading response header from upstream, client: 10.0.2.2, server: localhost, request: "GET /app_dev.php HTTP/1.1", upstream: "http://127.0.0.1:42/app_dev.php", host: "127.0.0.1:8011"

This is my sneakers config (on a Mac, Vagrant 1.3.5, VirtualBox 4.2.16):

mysite:
  app_directory: "/Users/woutersioen/Sites/mysite/"
  documentroot_suffix: "web"
  type: "php54"
  http_port: 8011
  memory: 1024
  php_xdebug: 1

I don't have a lot of headers When i execute this command in the terminal:

curl -s -D - 'http://127.0.0.1.dev:8011/app_dev.php' -o /dev/null

It returns this:

HTTP/1.1 200 OK
Server: nginx/1.4.2
Date: Thu, 28 Nov 2013 11:02:58 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
X-Powered-By: PHP/5.4.21-1~dotdeb.0
Cache-Control: no-cache
X-Debug-Token: 7c6d26
Vary: Accept-Encoding
X-Proxy: levis

It doesn't look tike there are way too many headers. I tried raising the proxy and the fastcgi buffers in the nginx config as google suggested but this didn't solve my problem.

Zhann commented 11 years ago

Hi Wouter

Can you check if this helps: edit /etc/nginx/proxy.conf on your vagrant node and change the following:

- proxy_buffer_size       16k;
- proxy_buffers           4 32k;
- proxy_busy_buffers_size 64k;
+ proxy_buffer_size   128k;
+ proxy_buffers   4 256k;
+ proxy_busy_buffers_size   256k;
WouterSioen commented 11 years ago

I changed the proxy_vhost.conf with these values and also changed the proxy_temp_file_write_size to 256k. This solved my problem. Thanks!

I changed these values in the nginx.conf before, looks like this proxy file overwrites the other config file.

Zhann commented 11 years ago

I'm gonna re-open this. We'll discuss internally whether we want to raise this in production (and thus sneakers).

Zhann commented 11 years ago

@WouterSioen can you show us what you what headers you're sending and how? as current buffer sizes should suffice.. We've never had this issue with any of the websites going through our proxy servers.

WouterSioen commented 11 years ago

@Zhann I encounter the issue when Symfony2.3 whants to output an error in development mode.

When I invoke the request with curl, I get the full response back (even without raising the proxy values): http://127.0.0.1:8011/app_dev.php/qsdfqsdf

HTTP/1.1 404 Not Found
Server: nginx/1.4.2
Date: Thu, 28 Nov 2013 12:45:58 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
X-Powered-By: PHP/5.4.21-1~dotdeb.0
Cache-Control: no-cache
X-Debug-Token: 3ab4e4
Vary: Accept-Encoding

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="robots" content="noindex,nofollow" />
        <title>    No route found for &quot;GET /qsdfqsdf&quot; (404 Not Found)
</title>
        <link href="/bundles/framework/css/structure.css" rel="stylesheet" type="text/css" media="all" />
        <link href="/bundles/framework/css/body.css" rel="stylesheet" type="text/css" media="all" />
            <link href="/bundles/framework/css/exception.css" rel="stylesheet" type="text/css" media="all" />
    </head>
    <body>
        <div id="content">
            <div class="header clear-fix">
                <div class="header-logo">
                    <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALYAAAA+CAMAAACxzRGDAAAAUVBMVEX////Ly8yko6WLioxkYmVXVVkwLjLl5eWxsLJKSEzy8vJxcHLY2Ni+vb89Oz9XVVh+fH+Yl5n///+xsbLY2Nlxb3KkpKWXlph+fX+LiYy+vr/IZP61AAAAAXRSTlMAQObYZg
AABRBJREFUeNrVmtuWoyAQRS1FEEQSzQU7//+hYxUiXsKQZLJWM+chsUloN+WhCuguYoKyYqzmvGasKqH4HyRKxndipcgcumH8qViTM7TkUclcwaHmf5XM0eWq4km1KjdqXfMXJHVe1J3hL8lk5fCGv6wmT+o0d87U+XNrk0Y9nfv+7LM6ZJH5ZBL6LAbSxQ3Q5FDr22Skr8PQSy4n7isnsQxSX4r6pobhjCHHeDNOKrO3
yGmCvZOjV9j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F4wCCmEs1f9D1lUe0n4NAATed80Y5e0Q7CO2TezM/BR6wKdgQzKbCF4uOQC3Bk0fKAzbFlyRWg3gksA/gmm7eOjrpaKX7fHlEW2xLbE6GZsPiCiShVz
N7RG2xTz2G+OJtEqzdJ7APxy3MrSsV0VukXbKMp9lhs5BN6dr3CN+sySUaoxGwfRUM3I/gdPYONgVU+PLX4vUWm32AvUySarbONvcpV2RQEPKKjEBHFk01kQDGRblnn8ZuE9g+JUl8OWAPbkFK2K6JxhJVvF47FzYYnAN22ttwxKYCoH36rheEB7KG/HF/YUaa2G5JF+55tpyrl7B1WHM39HuP2N2EXPl1UBu8vbj4OjvD
+NoTE4ssF+ScARgaJY1N7+u8bY/Y9BSM5PKwJbvMVab32YP5FB5TtcYVrGoASolVLTzI7kVsYVxRtAb5n2JXq1vCdtd47XtYItynrN0835PasLg0y13aOPbmPI+on2Lr9e5tjSHvgkAvclUjL3Fsdaw03IzgTR62yYClk7QMah4IQ0qSsoYYbOix6zJR1ZGDNMOY3Bb6W5S6jiyovep3t7bUPyoq7OkjYumrfESp8zSBc/
OLosVf+nTnnKjsqR16++WDwpI8FxJWRFTlI6NKnqYJaL96TqjAbo9Toi5QiWBDcmfdFV+T8dkvFe5bItgstbM2X6QG2mVun+cazfRwOS0eiaeRRJKgLfc3BQAqfnhJyz8lfR6580SF/FXVu83Nz1xrrnFqqXL6Qxl47DNSm4RFflvN5sABDD8peouqLLKQXVdGbnqf+qIpOxON4ZyYdJEJ6sy4zS2c5eRPTT4Jyp46qDE5
/ptAWqJOQ9e6yE82FXBbZCk1/tXVoshVoopE3CB0zmraI3nbqCJ/gW3ZMgtbC5nh/QHlOoOZBxQCRgAAAABJRU5ErkJggg==" alt="Symfony" />
                </div>

                <div class="search">
                    <form method="get" action="http://symfony.com/search" target="_blank">
                        <div class="form-row">
                            <label for="search-id">
                                <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAABUElEQVQoz2NgAIJ29iBdD0d7X2cPb+tY2f9MDMjgP2O2hKu7vS8CBlisZUNSMJ3fxRMkXO61wm2ue6I3iB1q8Z8ZriDZFCS03fm/wX+1/xp/TBo8QPxeqf+MUAW+QI
FKj/+q/wX/c/3n/i/6Qd/bx943z/Q/K1SBI1D9fKv/AhCn/Wf5L5EHdFGKw39OqAIXoPpOMziX4T9/DFBBnuN/HqhAEtCKCNf/XDA/rZRyAmrpsvrPDVUw3wrkqCiLaewg6TohX1d7X0ffs5r/OaAKfinmgt3t4ulr4+Xg4ANip3j+l/zPArNT4LNOD0pAgWCSOUIBy3+h/+pXbBa5tni0eMx23+/mB1YSYnENroT5Pw/Q
SOX/mkCo+l/jgo0v2KJA643s8PgAmsMBDCbu/5xALHPB2husxN9uCzsDOgAq5kAoaZVnYMCh5Ky1r88Eh/+iABM8jUk7ClYIAAAAAElFTkSuQmCC" alt="Search on Symfony website" />
                            </label>

                            <input name="q" id="search-id" type="search" placeholder="Search on Symfony website" />

                            <button type="submit" class="sf-button">
                                <span class="border-l">
                                    <span class="border-r">
                                        <span class="btn-bg">OK</span>
                                    </span>
                                </span>
                            </button>
                        </div>
                   </form>
                </div>
            </div>

            <div class="sf-reset">
                    <div class="block-exception">
    <div class="block-exception-detected clear-fix">
        <div class="illustration-exception">
            <img alt="Exception detected!" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAAB8CAMAAACG/MQCAAADAFBMVEX29vbt8eLn7tTY5rPT46nI3ZHC2oO51XDH3I3J3pPe6cHy9O7y9Ozg6sXQ4aLA2X+w0FyqzU6202jF24nV5K3k7M7q8NzS46a/2Xqv0FrD24Xb6Lvw
8+jx8+rU5Ku31Gz19vTl7dHE24eszlLN4Jvj7My913js8eDo7ta813arzVC61nLz9fCuz1bZ57br8N631Wnc6L2tz1S102ay0WDh68r09fLO4J3L4JOx0V3a6bL////k78fX5bC002PI34z8/fnS5aHV5qjt9Nro8c/F3Ybp79qx0V7d67i713Gz0mGy0l/2+uzy9+Tc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vMhe1zYKDVzpOtypdZgkqx9whs1U56X
JjY7PqcJt4SlElk1AdF5zxv2GvQ1X2VjoVqhVZUX906lXwR3KTkNXmbd/VNNQ0nt/loHbFcfb8azXL3v7FTgpUpL96q2Z7TdUvDm6geYpUiZua7Ly40oC6Vm0ga/52Xmqr91/J+SF/sBcvugAAAABJRU5ErkJggg==" />
        </div>
        <div class="text-exception">
            <div class="open-quote">

... And a lot more

When doing this in Google Chrome (or another browser) I get an nginx error. What extra information do you need?

Zhann commented 11 years ago

Apparently this is a problem specific to Symphony in development mode. One of these solutions should help:

1) in app/config/config_dev.yml comment the following lines:

chromephp:
    type:   chromephp
    level:  info

2) change the nginx buffer sizes (which you did), but note that this is not how our production servers are set up (which is the whole point of Sneakers).

If you're satisfied with that answer, I'll close this issue.

Zhann commented 11 years ago

There's also an issue on https://github.com/symfony/symfony/issues/8413

WouterSioen commented 11 years ago

@Zhann Thanks for looking into this!