Hi and welcome to HCM.
Since this last so long this is something that should be evaluated. There can be esophageal or stomach disoder, stenosis or stricture. I suggest to do gastroscopy. It is hard to explain why does this vomiting
last for 3 months. There is small possiblity that gastrocolitis can give such symptoms. Try to find is there particular food which aggravate vomiting,but further testing should definitely be done.
Wish you good health.