XO Slim Elite Keto What causes peritonitis? There are two types of peritonitis when viewed from the cause. Spontaneous bacterial peritonitis (SBP) or primary peritonitis is the result of a fluid infection in your peritoneal cavity. Liver failure or kidney failure can cause this condition. People with peritoneal dialysis for kidney failure also have an increased risk for SBP.While secondary peritonitis is usually caused by an infection that spreads from the digestive tract.