Peritonitis causes

Overview
Causes of peritonitis can be divided into Infected and Non-infected, which are as follows:

Infected peritonitis

 * Perforation of a hollow viscus is the most common cause of peritonitis. Examples include perforation of the distaloesophagus (Boerhaave syndrome), of the stomach (peptic ulcer, gastric carcinoma, of the duodenum (peptic ulcer), of the remaining intestine (e.g. appendicitis, diverticulitis, Meckel diverticulum, IBD, intestinal infarction, intestinal strangulation, colorectal carcinoma, meconium peritonitis), or of the gallbladder(cholecystitis). Other possible reasons for perforation include trauma, ingestion of sharp foreign body(such as a fish bone), perforation by an endoscope or catheter, and anastomotic leakage. The latter occurrence is particularly difficult to diagnose early, as abdominal pain and ileus paralyticus are considered normal in patients who just underwent abdominal surgery. In most cases of perforation of a hollow viscus, mixed bacteria are isolated; the most common agents include Gram-negative bacilli (e.g. Escherichia coli) and anaerobic bacteria (e.g. Bacteroides fragilis).
 * Disruption of the peritoneum, even in the absence of perforation of a hollow viscus, may also cause infection simply by letting micro-organisms into the peritoneal cavity. Examples include trauma, surgical wound, continuous ambulatory peritoneal dialysis, intra-peritoneal chemotherapy. Again, in most cases mixed bacteria are isolated; the most common agents include cutaneous species such as Staphylococcus aureus, and coagulase-negative staphylococci, but many others are possible, including fungi such as Candida.
 * Spontaneous bacterial peritonitis (SBP) is a peculiar form of peritonitis occurring in the absence of an obvious source of contamination. It occurs either in children, or in patients with ascites. See the article on spontaneous bacterial peritonitis for more information.
 * Systemic infections (such as tuberculosis) may rarely have a peritoneal localisation.

Non-infected peritonitis

 * Leakage of sterile body fluids into the peritoneum, such as blood (e.g.endometriosis, blunt abdominal trauma), gastric juice (e.g. peptic ulcer, gastric carcinoma),bile (e.g. liver biopsy), urine (pelvic trauma), menstruum (e.g. salpingitis), pancreatic juice (pancreatitis), or even the contents of a ruptured dermoid cyst. It is important to note that, while these body fluids are sterile at first, they frequently become infected once they leak out of their organ, leading to infectious peritonitis within 24-48h.
 * Sterile abdominal surgery normally causes localised or minimal generalised peritonitis, which may leave behind a foreign body reaction and/or fibrotic adhesions. Obviously, peritonitis may also be caused by the rare, unfortunate case of a sterile foreign body inadvertently left in the abdomen after surgery (e.g. gauze,sponge).
 * Much rarer non-infectious causes may include familial Mediterranean fever, porphyria, and systemic lupus erythematosus.