Websites hosted on Plesk server are unavailable with 502 Bad Gateway: upstream sent too big header while reading response header

Follow

Comments

13 comments

  • Avatar
    Jan Bludau

    nice 2 know :-)

    0
    Comment actions Permalink
  • Avatar
    Sharul Hafiz

    Doesn't work. How do you calculate the buffer size?

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    Hello @Sharul,

    For determining the size which will be suitable for you, please, refer to these links:
    https://gist.github.com/magnetikonline/11312172#determine-fastcgi-response-sizes
    http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#fastcgi_buffer_size

    0
    Comment actions Permalink
  • Avatar
    Khoneketa

    Not working for me

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    Hello Khoneketa,

    Error 502 for websites may have a variety of causes, e.g. issues with PHP or Apache down.

    Try checking this article for guidance: https://support.plesk.com/hc/en-us/articles/115001463089--HUB-502-Bad-Gateway

     

    In case this wouldn't help, consider submitting a request for Plesk Support:

    https://support.plesk.com/hc/en-us/articles/213608509-How-to-submit-a-request-to-Plesk-support- 

    0
    Comment actions Permalink
  • Avatar
    Cosme

    Works for me as well :)

    0
    Comment actions Permalink
  • Avatar
    Rubén Ramos

    Thanks very much !! Work fine ;-)

    0
    Comment actions Permalink
  • Avatar
    Kea

    Hello,

    In my logs I only have this:

    upstream sent unexpected FastCGI record: 3 while reading response header from upstream

    All websites on the server are unreachable and give Error 502 

    I contacted support and got just this as a solution. I applied it. But the situation repeats.

    0
    Comment actions Permalink
  • Avatar
    Yulia Plokhotnikova

    Hello @Kea,

    This issue was addressed in ticket already. If you are working with support directly, feel free to re-open the ticket as issue may have different symptoms and have another cause.

    0
    Comment actions Permalink
  • Avatar
    Giuseppe

    Nothing ... I've really tried them all but I always get a 502 error. I visualize the site (Magento 2) with "website preview".

    In the log file "/var/log/sw-cp-server/error_log" I read the error: "upstream sent too big header while reading response header from upstream, client: 127.0.0.1".

    I have modified both from "Apache & nginx Settings> Additional nginx directives" and directly from "/etc/nginx/nginx.conf" but nothing.

    What else can I do? Anyone have other indications?

    0
    Comment actions Permalink
  • Avatar
    Massimiliano Sacchetto

    Verificato il mio file php.ini che viene fornito con Applicazione FPM servita da nginx, Inserisco il codice 

    fastcgi_buffers 8 16k;
    fastcgi_buffer_size 32k;

    ma ricevo il messaggio di errore 

    "Configurazione Apache non valida: AH00526: errore di sintassi sulla riga 1 di /var/www/vhosts/system/partyinfesta.shop/conf/vhost.conf: comando 'fastcgi_buffering' non valido, forse errato o definito da un modulo non incluso nella configurazione del server"

    Ho comunque provato tutte le configurazioni ma ottengo sempre lo stesso messaggio di errore

    0
    Comment actions Permalink
  • Avatar
    Bernardo Murillo

    It works for me, thanks.

    0
    Comment actions Permalink
  • Avatar
    Linus (Edited )

    Article Improvement for "For all domains"

    1. Connect to the server using SSH.

    2. Create / Open the file /etc/nginx/conf.d/proxy_buffer.conf for editing.

    3. Add / Increase the following parameters:

      proxy_buffers 8 16k;
      proxy_buffer_size 32k;
      fastcgi_buffers 8 16k;
      fastcgi_buffer_size 32k;
    4. Check for any errors in your nginx config
      nginx -t
    5. Reload nginx to apply changes:

      service nginx reload

    Increase values of these parameters if it is needed.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request