Unable to update a Confluence page when proxying Confluence with NGINX

Still need help?

The Atlassian Community is here for you.

Ask the community


Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.

    

Summary

After editing a Confluence page, when publishing changes, Confluence does not successfully update the page. The editor may show the following errors:

Something went wrong after loading the editor. Copy your unsaved changes and refresh the page to keep editing.
Can't reach the server. Check your internet connection, and we'll keep trying to reconnect you.

This particular issue only occurs on some specific pages, other pages can still be created, edited and published without any issues. 

Environment

Confluence is running behind a NGINX reverse proxy. 

Diagnosis

Open your browser's developer tools, on the Network tab. When pressing updating the affected page, look for the relevant POST request, for example:

POST https://<base-URL>/synchrony/v1/data/Synchrony-51c69451-2521-39g6-9e08-57t27a374eq1/confluence-7618315

With this particular issue, it will return a "HTTP 413 - Request Entity Too Large" error.

Disabling Collaborative Editing may or may not help with the issue. When accessing Confluence after bypassing the proxy, however, the page is able to be updated with no issues.

Cause

The HTTP 413 error is returned due to the NGINX proxy's settings. By default, NGINX blocks any requests over 1MB in size, and so this may block the POST operation when updating a large Confluence page, if the total content is over 1MB.

Solution

Edit the NGINX configuration file where the Confluence server was configured, and add the following parameter to increase NGINX's maximum request size:

  • client_max_body_size 100M;

This parameter can be added either inside the server context, or inside the location context (make sure to add it on the default Confluence location context, as well as Synchrony's location context).

Afterwards, save the NGINX configuration file, and restart/reload NGINX and Confluence.

For more information on configuring NGINX as a reverse proxy for Confluence, please see: 


Last modified on Jun 17, 2020

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.