<s>[INST] I am having very serious stomach pain in my upper abdomen (in teh middle just after the rib cage)..that feels liek my intestine are twisting . Also when this starts it causes me to fill nauseuous and i start spitting very watery saliva out conatantly  for at least 5min .tehn it stops and starts again. What might be the  problem ..it happen before and even after eating [/INST] Hi thanks for your question. Commonest cause of pain in the middle of abdomen above rib cage with nausea is gastritis that is inflammation of stomach. Gastritis is caused by excessive acid production secondary to a variety of factors like cigarette smoking, alcohol,spicy food and infection of stomach by a bacterium called as H Pylori. Gastitis is also associated with excessive salivation. You can take antacid, and proton pump blockers like pantoprazole. Consultation with a physician is advisable who may perform upper G I endoscopy on you to determine the cause of your symptoms. Hope this answers your question. </s>