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.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

    

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.