Gut issues are very complex and have many variables. There is no simple answer to your question as you need testing to find out exactly what is wrong with you. You need to see either a GI specialist or a functioanl medicine doctor.
Take some drops of Gentian root extract 30 minutes before eating. Eat probiotics like self-made sauerkraut - the products from the store are crap. If you drink milk (even for coffee) - stop eating milk products and stop drinking milk totally.