One of the longest sentences in literature is certainly in William Faulkner's Absalom, Absalom! (1936). That sentence is composed of 1,288 words and is Quentin Compson’s silent thoughts.
“There was a wisteria vine blooming for the second time that summer on a wooden trellis before one window, into which sparrows came now and then in random gusts, making a dry vivid dusty sound before going away: and opposite Quentin, Miss Coldfield in the eternal black which she had worn for forty-three years now, whether for sister, father, or nothusband none knew, sitting so bolt upright in the straight hard chair that was so tall for her that her legs hung straight and rigid as if she had iron shinbones and ankles, clear of the floor with that air of impotent and static rage like children’s feet, and talking in that grim haggard amazed voice until at last listening would renege and hearing-sense self-confound and the long-dead object of her impotent yet indomitable frustration would appear, as though by outraged recapitulation evoked, quiet inattentive and harmless, out of the biding and dreamy and victorious dust.” — Absalom, Absalom! by William Faulkner
Molly Bloom's soliloquy in the James Joyce novel Ulysses (1922) is also a consideration at 3,687 words, but I knock this one out because it really is just a bunch of sentences without punctuation.
Joyce was known for "stream of consciousness" which was quite a popular stylistic device in the 1920s and 30s. It made those run-on sentences that your English marked you down for on compositions legitimate. At least, that was the line I used on my tenth-grade English teacher, Mr. Reece, who replied that "Those writers know the rules, so now they can break them."
Victor Hugo has a nice 800-plus line in Les Misérables.
John Updike was very careful with his sentences, but he used a few unusually long ones across his many novels.
“But then they were married (she felt awful about being pregnant before but Harry had been talking about marriage for a while and anyway laughed when she told him in early February about missing her period and said Great she was terribly frightened and he said Great and lifted her put his arms around under her bottom and lifted her like you would a child he could be so wonderful when you didn’t expect it in a way it seemed important that you didn’t expect it there was so much nice in him she couldn’t explain to anybody she had been so frightened about being pregnant and he made her be proud) they were married after her missing her second period in March and she was still little clumsy dark-complected Janice Springer and her husband was a conceited lunk who wasn’t good for anything in the world Daddy said and the feeling of being alone would melt a little with a little drink.” — Rabbit, Run, by John Updike
This extremely long sentence became a kind of game. Here are some examples that seem more like a gimmick to me.
Jonathan Coe’s The Rotter’s Club, which ends with a 33-page-long, 13,955 word sentence.
Czech and Polish novelists have written book-length sentences since the 1960s.
French writer Mathias Énard has a one-sentence novel, Zone, that is 517 pages long with only 23 chapter breaks to allow you not go insane while reading.
In Jamaica Kincaid’s “The Letter from Home,” she has a long one full of commas. I can see why she wants it to run fast as a sentence, but you could easily make some of the commas into periods and it would work just as well.
"I milked the cows, I churned the butter, I stored the cheese, I baked the bread, I brewed the tea, I washed the clothes, I dressed the children; the cat meowed, the dog barked, the horse neighed, the mouse squeaked, the fly buzzed, the goldfish living in a bowl stretched its jaws; the door banged shut, the stairs creaked, the fridge hummed, the curtains billowed up, the pot boiled, the gas hissed through the stove, the tree branches heavy with snow crashed against the roof; my heart beat loudly thud! thud!, tiny beads of water grew folds, I shed my skin…"