Found on Version: 22.214.171.124 and 126.96.36.199 on Ubuntu 18.04.2 LTS
The Writer doc has 7600 Formula objects and regular text with some 30 graphics, 22MB and 380 pages. Started off with LO 188.8.131.52 without problem on save, until I added one trivial formula object (like the letter A, doesn’t really what it is) and bumped to 7636 objects. Then save gives the above message. Close the doc and reopen, it says “is corrupt and therefore cannot be opened”, prompts for repair and it opens the doc, without make any change and save, I get General input/output errors. It appears that there is a limit to the number of objects. Any pointer to increase the limit? BTW the number of objects is read from property → statistics and also paste an equation from another session of LO Writer which is displayed as an “Object 7636” icon.
PS I increased the cache of OLE objects from 20 to 40 (Tools → Options → LibreOffice → Advanced → Open Expert Configuration → org.openoffice.Office.Common → Cache → Writer) but it doesn’t help. It seems opening the doc is slightly faster.