The following verges on TMI but I thought it might be helpful to some.
From approximately 2008 to 2014, I began experiencing issues with my digestive tract with extreme pain that would double me over for 4 to 8 hours at a time. It occurred about every 5 or 6 months. I had a number of colonoscopies and endoscopies and the doctors could find nothing. They diagnosed me with IBS, but they really didn't help me. I pretty much had to figure it out on my own. I discovered through trial and error that I was having tremendous gas pains but nothing would come out either through burping, flatulence, or bowel movement. The gases were trapped in my digestive tract. Also, when this would occur I would have a lack of motility. Nothing would move. I would have loose bowels like diarrhea but nothing would come out. As a short term fix, I learned how I was feeling the hours before this would occur and I would take a laxative to clear myself out, thus avoiding the trapped gas.
Long term, I have experimented with a number of diets and it seems that the removal of chips, most pasta, sugary items like cookies and cakes, and most processed foods has helped a great deal. Also, avoiding overeating, even at holidays, has helped as well. I have also looked into and experimented with the FODMAP diet. (An explanation for this is too long for this post. Do a search if you want to know what it is.) That has helped too.
Since making these changes, I have had only one or two episodes since 2014, and I was able to head those off at the pass, so to speak. I still have digestive tract issues but the pain is much less acute and more along the lines of normal IBS than it was before.