Gasoline is inherently unstable and turns into a gummy, plastic-like substance after only a few months. Although there are off-the-shelf fuel stabilizer additives available, the max lifetime is only around 2 years.
Diesel fuel is subject to the same problems without special additives and precautions.