It depends on the amount of ravioli. Generally, this is an item that would be cooked to order, so there really would be no need to heat vast batches at one time. It only takes a few minutes to cook ravioli, even when its frozen.
I assume you will preparing this meal in your home? Yes? If so, you can use two or three large pots and cook 12-15 at a time. But, for time's sake, you may wish to consider not freezing the ravioli before hand. They will cook faster and your time spent cooking 40 ravioli will be greatly reduced.
If the stove does not have room for that many pots, you will have to cook them in batches. Set the cooked ravioli aside while the remaining ravioli are being cooked. You can then put them all back in the boiling water for a quick second or two (use a hand strainer) to raise up their temperature to a uniform level, drain and serve.
Good luck.