Payload too large
Summary
When using a CRDT, the CRDT will grow and then his Json representation will also grow. In the end, the JSON will become too large.
Steps to reproduce
Write 500+ characters in our Markdown editor locally or online.
What is the current bug behavior?
The Markdown editor becomes unsynchronized because the JSON representation of the RGA becomes too large and therefore update requests are blocked.
Root of the problem
The problem comes from Nginx and the C-Service. They both define a limit for allowed request length.
Relevant logs and/or screenshots
When blocked by Nginx:
413 Request Entity Too Large
When blocked by the C-Service (Express/NodeJS):
413 Payload Too Large
How to fix
You can take a look at that post on stackoverflow.
Nginx
The default limit value is 1m. Source: Nginx docs.
Nginx limit can be changed in the Nginx config file at /etc/nginx/nginx.conf or in the config file of a specific domain in /etc/nginx/sites-available/ by adding client_max_body_size 50m
.
C-Service (Express)
The default limit value is 100kb. Source: Express docs.
In the C-Service, you can change the Express limit by adding in the service.ts:
app.use(
bodyParser.json({limit: '50mb'}),
);
For both Nginx and the c-service, the wanted limit should be discussed.