Yes, it is virus. Now I don't want you to freak out but it is same kind of virus as herpes but just slight different kind. It is estimated over 80% of adult US population infected with it depending which study you read. Once you have it, typically you have it for life. Some people break out more often than others. The symptoms usually last 7 to 10 days and it is self limiting. Almost all of the treatment is for comfort not for cure. There is no known cure for it, not yet.
If it break out outside of mouth, like around the lips, it forms typical looking cold sores. But when it happened inside of mouth, it will form ulceration due to moisture inside the mouth and it is very painful for few days. These breakouts happens more often when you are stressed out, probably due to lowered immune system during those time. They are opportunistic infection. You can use the Orajel for small lesions but when it gets big, it becomes ineffective.
Next time try one of this method: mix half of Kaopectate or Mylanta (yes, those white milky liquid kind) and liquid Benadryl, then rinse your mouth where the large lesions are just like mouthwash for 30 to 40 sec. and spit it out. This should give you some comfort and repeat as you needed. If your lesions are more severe and spread out, you probably need prescription to deal with it. Hope you feel better soon.