I never thought of resurrection magic as all that common, honestly- in 30+ years, I've only seen a handful of PCs get brought back from the dead...and one of those had an artifact fused to his skull that did it automatically. Otherwise, its too costly.
This has not been the case for any of our games. Following the wealth by level guidelines in 3e or 3.5e meant that every group would have enough money to raise dead someone starting at about level 2(a group of 6 adventurers that are level 2 have 900 GP a piece and therefore could get 5400 GPs together...the material cost of Raise Dead is 5000 GP). More practically, a group of 5 PCs had the money to easily bring someone back by 6th level, where 10% of each character's wealth pooled together was 6500. Enough to pay for the material cost of the spell and a generous fee for a cleric to cast it.
At level 11 and higher in 3.5, 10% of any one character's wealth is enough to bring someone back from the dead. Also, at 11th level, an encounter with 4 enemies should drop enough treasure to pay for a raise dead. So, you should be able to bring one member of the party after each combat at 11th level and higher. Especially considering the party likely contains a cleric who can cast the spell, thereby only needing the 5000 GP and not having to pay a cleric to cast it.
The cost is only 500 GP in 4e to bring someone back in Heroic tier. Most people have that amount of money by level 2. Though, in 4e only "heroes" can by brought back at all. So Raise Dead isn't an option for anyone but PCs, in general.
In 1e and 2e it's a little more difficult to judge, given there were no guidelines for how much wealth a group should have other than what the DM thought was appropriate. Still, in all of my 2e games that were over 5th level, we considered Raise Dead an appropriate spell to cast when someone died. Below that, it was a little too expensive.
I've had PCs who were working on their 6th or 7th return from death. If you totaled the party, it would be closer to 30. That was just in one game.
It's been part of the "signing agreement" for every adventuring party I've ever been in that should any member of the party die, that all of the remaining members would pool their money to have them brought back and that each member had to agree to it before joining.
I'd be extremely surprised if a character ran out of magic over the course of a novel unless all of the action took place in a day or less.
I've read a couple of D&D novels where a caster explicitly ran out of a certain spell at a dramatically appropriate time. And a couple more where a caster mentally took an inventory of the spells they had available before choosing what to cast. It's been a while since I read any of them, but there was even one where a caster completely ran out of spells in a day.