Dungeons are a sometimes food. They're best when they're one of several patches in a larger quilt. Again I'll point to the best adventure made for D&D, Dragon's Crown. You have lots of overland travel back and forth across Athas (with numerous side quests you can throw in to break up the main quest), exploration, and social interaction in between the dungeons. That's a good mix, and the dungeons don't overstay their welcome.
Another good example from the console side of things is the Legend of Zelda: The Ocarina of Time. While the dungeons there are a bit larger than I like in D&D, there's a lot of stuff going on in between them, and often you need to do a smaller dungeon or go explore somewhere in order to properly open up a major dungeon (or, more often, acquire an item you'll need in that dungeon).
A bad example is Princes of the Apocalypse, which is essentially one big 13-level dungeon with a topography that's a bit odd (there are four surface-level "Haunted Keeps" that serve as entrances to the four quarters of the ruined dwarf city Tyar-Besil, with all four quarters having a path leading down to a cavern level which in turn leads to four "elemental nodes"). The early part where you try to figure out what has happened to a group of dignitaries traveling from Luskan to Waterdeep is fun, because there's overland travel and encountering the different keeps and figuring out what they're all about, But once you go below, it's a Big Slog. And I think the designers anticipated that and included some side treks, but there's no easy way to incorporate those because there's no reason for the PCs to be traveling and encounter them.