A stomach virus or stomach flu is a common problem. The length of symptoms depends on a few different factors. If you are worried, I would recommend taking your son to his pediatrician.
In general, a stomach virus lasts about 7-10 days. This is for the classic virus infection--or as its medically known a viral gastroenteritis or viral gastritis. We normally except the course to be a sudden onset of symptoms, with a peak of symptoms at 2-3 days. Normally, the symptoms improve however may persist until 7-10 days out. If things are not improving by day 4-5 and not nearly all resolved by two weeks out I would recommend talking to his pediatrician.
There are a few factors that can prolong a stomach virus. This first is if there is a different diagnosis. Many other problem of the stomach can occur. If there is significant fevers or abdominal pain
, this may indicate another diagnosis and suggest that more workup is needed. If there is a problem with the immune system, this can also prolong symptoms. Any other underlying gastrointestinal problem can also predispose to a longer course.
The main treatment for a viral gastritis is supportive--staying hydrated is key. If symptoms are not improving after 4-5 days and not resolved by 2 weeks I would recommend speaking to your doctor