I mix with distilled water and store in several small glass bottles (330ml Perrier bottles). It has lasted over 3 years that way in my storage test. It may last even longer but that is as long as I have tested and I usually go through 5 liters in a few months.
Gee, 3 years, nice, but You should consider shooting more
Personally I used tightly capped stock solutions of xtol up to a one year old, and I mix it 1+1 for one time developing.
I believe that weak batches in the past were due to an error in production and quality control, I had one few years ago with freshly mixed solution; it was too weak and I got thin negatives... I always used 5l batches.
It's not so much how long it lasts (though I had Xtol die in a very few months back when I tried it - this was from the old small packs though so maybe the 5L ones won't do that) but the fact that when it does go, it does so without any visible change in color and, all too often, very suddenly. Works fine one day, the next week you get virtually undeveloped negatives from developer that looks just like it did the previous week when it worked fine.