Henry Darger: The Story of the Vivian Girls
Illustrated fantasy novel manuscript typed single-spaced with 15,145 pages in 10 volumes. Discovered after Darger's death, the manuscript has never been published. The total number of words has been estimated; some believe this might be the longest novel ever written. [1] The most conservative guess will put this in the million-word realm, possibly into tens of millions.
The longest roman fleuve ever written is Jules Romains's Les Hommes de bonne volonté (Men of Good Will), produced in 27 volumes, each with a separate title, and published from 1932-46. If taken as a single piece of fiction, it would be a strong contender for the longest novel ever written.
Popular fiction series about a single protagonist, with multiple authors, can dwarf such records: Perry Rhodan, a German series of novels about the eponymous space hero, can claim over 150 million words in over 2300 parts
https://en.wikipedia.org/wiki/List_of_longest_novels#Longest_novels_in_Latin_or_Cyrillic_alphabets
The longest book ever written - Yongle Dadian
During the Ming Dynasty at least 3,000 scholars spent 4 years, beginning in 1403, to work on the Yongle Dadian, an encyclopedia with 11,095 volumes and 22,877 chapters.
There are an estimated 370 million Chinese characters used.
https://tvtropes.org/pmwiki/pmwiki.php/Doorstopper/EncyclopediasAndDictionaries