I am sorry to hear that you have been dealing with recurrent ulcers within your mouth. Without being able to take a thorough history and examine you well (particularly when you have some active ulcers), there is no way for me to tell you for sure what is causing your oral ulcers. Thus I would recommend a consultation to see a dermatologist
specializing in oral pathologies, or an otolaryngologist
(ENT aka ears nose throat) when you have an active flare of the lesions. They may want to take a biopsy
of one of the ulcers to get a pathologic diagnosis.
What I can do is give you some general information on oral ulcers that may or may not pertain to your particular situation. There are a multitude of different causes of oral ulcers. When trying to categorize oral ulcers, it is useful (at least for me) to think of things in three main groups: traumatic ulcers, infectious ulcers, or ulcers due to immunologic problems. Traumatic ulcers can be from chemical or thermal injuries (like an overly hot cup of coffee). Infectious ulcers can be relatively common, such as cold sores or aphthous ulcers. And lastly immunologic ulcers can be from allergies, immunodeficiencies, or even autoimmune diseases. As you can see the causes can be quite diverse. Thus the best recommendation I can give is to follow-up with a dermatologist or an ENT. Anytime you have a chronic ulcer that is non-healing, I would definitely recommend getting it looked at.