Search code examples
google-app-enginenginxgoogle-app-engine-php

Google App Engine error "Upstream sent too big header"


I am running a Laravel app with Google App Engine Standard PHP 7.2, with Elfinder package.

Today, I receive 502 error while trying to access Elfinder. Upon analyzing the log, I found this particular error:

96 upstream sent too big header while reading response header from upstream, client: XXX.XXX.XXX.XXX, server: , request: "GET /xxx/elfinder/connector?_token=XXX", upstream: "fastcgi://unix:/tmp/google-config/php-fpm.sock:", host: "XXX", referrer: "XXX".

After googling for similar problem, I found out it is probably a problem with nginx proxy_buffer_size. However, I did not know how to edit nginx.conf in Google App Engine Standard. Can anyone help me?

Thanks in advance.


Solution

  • I had the same issue on GAE standard php73 and this probaby has to do with the app.yaml

        SESSION_DRIVER:     cookie
    

    setting (or in your .env) This sends all session info via the header, and this can become too big (dont know the GAE default limit)

    You will need to use a redis (GCS memorystore) or database setting for the session. GCS memorystore was too expensive ($33 per month minimum) for me so I use the database as session driver.