It’s probably the inulin that feeds bacteria. Onions are one of the #1 foods that aggravate IBS. Experiment with asparagus or garlic if you still want to consume it in smaller amounts. Artichokes have 3-5 times more than onions, so they’d probably spell trouble. Some people get along better on low-fibre diets, but you need to experiment to find out what agrees with you.