Skip to content
  • Solutions
    By Role
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    By Infrastructure
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
  • Product
    • Plesk Features
    • Plesk Editions
    • What’s new
    • Pricing
    • Roadmap
    • Lifecycle Policy
    • Extensions Catalogue
  • Pricing
  • Extensions
    Featured Extensions
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    Bundles and packs:
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack

    See all Extensions

  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
Plesk 360 login
Free Trial

Knowledge Base

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

 
apachecachedomainsfastcgigo

Symptoms

  • Website or website preview is unavailable:

    502 Bad Gateway

  • In the log files /var/log/nginx/error.log or /var/www/vhosts/example.com/logs/proxy_error_log, the following error messages can be found:

    [error] 14790#0: *188 upstream sent too big header while reading response header from upstream, client: 203.0.113.2, server: subdomain.example.com, request: "POST /admin_catalog.php HTTP/1.1", upstream: "http://10.0.0.1:7080/admin_catalog.php", host: "subdomain.example.com", referrer: "http://subdomain.example.com/admin_catalog.php"


    [error] 707#0: *2016153 FastCGI sent in stderr: "PHP message: Error checking in buffer: The buffer you checked in was not checked out" while reading upstream, client: 203.0.113.2, server: example.com, request: "POST /wp-admin/admin-ajax.php HTTP/1.1", upstream: "fastcgi://unix:///var/www/vhosts/system/example.com/php-fpm.sock:", host:"example.com", referrer: "https://example.com/wp-admin/post-new.php?wp-post-new-reload=true"


    2020/04/27 20:07:05 [error] 4966#0: *39052 proxy_buffer_size x is not enough for cache key, it should be increased to at least xx, client: *****, server: example.com, request: "GET /wp-admin/admin-post.php.."

  • The same symptoms can be observed when WHMCS is installed on the same server as Plesk and when navigating to WHMCS > Clientes > John Doe > Invoices.

Cause

A request cannot be processed by the proxy server because of insufficient buffer size.

Resolution

For one or few domains

  1. Log into Plesk.

  2. Go to Domains > example.com > PHP Settings and check the selected PHP handler (the field run PHP as).

  3. Go to Domains > example.com > Apache & nginx Settings, scroll down to the field Additional nginx directives and set the following parameters in accordance with the used PHP handler:

    • For PHP handler FPM application served by Nginx and disabled Proxy Mode:

      fastcgi_buffers 8 16k;
      fastcgi_buffer_size 32k;

    • For other cases:

      proxy_buffers 8 16k;
      proxy_buffer_size 32k;

Increase values of these parameters if it is needed.

For all domains

  1. Connect to the server using SSH.

  2. Open the file /etc/nginx/nginx.conf for editing.

  3. Increase the following parameters in the section http {:

    proxy_buffers 8 16k;
    proxy_buffer_size 32k;
    fastcgi_buffers 8 16k;
    fastcgi_buffer_size 32k;

  4. Restart nginx to apply changes:

    # service nginx restart

Increase values of these parameters if it is needed.

Tweet
Share
Share
Email
0 Shares
Read the full article
Related Posts

How to Host a Go App on Plesk

Read More »

Your Complete .htaccess Guide: Including .htaccess Basics and More

Read More »

NGINX vs Apache – Which Is the Best Web Server in 2024?

Read More »
Knowledge Base

 Website pages based on WordPress show “404 Not Found” when PHP-FPM by Apache is used

Read More »

How to configure Apache to process PHP code inside an .html file on a Plesk server

Read More »

Websites on PHP-FPM are unavailable or loading slowly: server reached max_children setting (*), consider raising it

Read More »

How to allow access to a website directory from specific IP address in Plesk?

Read More »

Hosting Wiki

  • Django
  • Server Redundancy
  • CacheFly
  • Google Cloud CDN
  • CGI
  • Bare Metal Server
  • PhpMyAdmin
  • phpPgAdmin
  • Oracle VM Server
  • Server Virtualization Software
  • Windows Server
  • Linux
  • PHP
  • MongoDB
  • HTTP/3
  • HTTP/2
  • Domain
  • Plesk
  • Lighttpd
  • Apache Tomcat
  • NGINX
  • Apache
  • Web Server
  • DNS Server
  • SSH
  • HTTP
X-twitter Linkedin Youtube Reddit Github
  • Product
  • Login
  • Pricing
  • Editions
  • For Partners
  • Partner Program
  • Contributor Program
  • Affiliate Program
  • Plesk University
  • Company
  • Blog
  • Careers
  • Events
  • About Plesk
  • Our Brand
  • Resources
  • User and Admin guides
  • Help Center
  • Migrate to Plesk
  • Contact Us
  • Hosting Wiki
  • Forum
  • Legal
  • Legal
  • Privacy Policy
  • Imprint

© 2025 WebPros International GmbH

Part of the WebPros®  Family