Big, heavy lunches and dinners can spell trouble for people with ulcers. Frequent meals tend to take the edge off pain. Avoid anything that will stimulate excess stomach acid. That includes coffee, tea, and soft drinks containing caffeine. Even decaffeinated coffee should be avoided because it can cause heartburn.
Smokers get ulcers more often than nonsmokers.
No one is sure why. Try to minimize stress in your life. Stress doesn't cause ulcers. But for some people, stress may trigger the release of stomach acid, which can result in ulcer flare-ups. American Institute for Preventive Medicine.