JSON response is cut off, when the disk is full

25 Views Asked by At

Information

I have a Node JS/Express server that queries the DB and returns big amount of JSON data to the client that is making the request to that API. The server is running on Ubuntu 22.04 LTS on AWS EC2 instance. The server is also generating big amount of logs. When the disk becomes full because of log files, the response to this API (that returns big amount of JSON) gets truncated and only one half is being returned to client, which causes browser to issue an error. We got this issue today and after clearing logs, it got fixed. I know about different techniques and ideas of solving this issue (like pagination, getting data chunk by chunk, etc.).

Question

What is the actual reason for the response being cut off when disk space is running low and how this process happens (OS, NodeJS Server, Express)?

[Edit] If I rephrase the question: What is the correlation of returned JSON and disk space?

0

There are 0 best solutions below