The solution? They were buried on top of one another. Here's the unique story of the layered burial of the Old Jewish Cemetery in Prague, Czech Republic:
Over the centuries, there has been close to 12 layers of people buried within the confines of the Old Jewish cemetery. It has been estimated that there are approximately 12,000 tombstones presently visible and there may be as many as 100,000 burials in all.
http://trifter.com/europe/czech-republic/the-famous-layered-jewish-cemetery-in-prague/
From the Upcoming ueue, submitted by lannaxe96.
http://www.flickr.com/photos/paulellinson/3209736575/
i remember this one being very tightly packed in, but also half destroyed with the building of the Žižkov Television Tower