Also, if you're using one of the newer gen 1 Tamas (as opposed to the original 90s P1 Tamas), feeding treats will result in a short life. Just feed the healthy meal for food and use the game to keep happiness up instead of treats.
The re-releases of the P1/P2 Tamagotchis have even less of a tolerance for feeding treats than the '97 versions, so it's highly recommended to play games with your Tamas in order to have them live longer. I also hear that the care mistakes you accumulate in their adult stage also shortens their lifespan, though I haven't been able to confirm this.
The longest I've ever had my Tama live for was 24 days, and that's during the period in their adult stage where they get especially needy.