I've seen it a couple of times at my job (I am not a nurse, but a nurses aide). It's usually when the person is dying of end stage liver disease and varicose veins develop in the esophagus. These veins end up bursting and that's when you see quite a large amount of blood come out of the nose and mouth.