Volcanoes can absolutely run out of magma. In fact, most volcanoes are thought to only have enough magma for a few eruptions. Once a volcano runs out of magma, it is considered extinct.