94 buick no fuel

i have a good fuel pump good relay and fuses checked grounds that i could find will run in park and on road then will just die then out of blue will start and run for 10 mn or 2 hours