Ube halaya should be stored in an air-tight container that is dry and clean. In the fridge - It'll last in the fridge for up to 5 days.  In the freezer - If you want to store this for longer, you can do so by freezing it in an air-tight container for up to 6 months. I have a batch of ube halaya in the fridge that is almost 6 months old right now, and I can’t wait to thaw it out and eat it! That being said, please follow general food safety precautions. Your ube halaya is only as good as the ingredients you used. Fresher ingredients = longer shelf life.  Improper food handling will also shorten the longevity of ube halaya. Things such as using dirty spoons or knives, or double dipping will introduce bacteria. Keeping the ube halaya at room temperature for extended times between chilling will also cause it to go bad sooner.  So, if your ube halaya is starting to smell different, starting to discolor, or has any weird taste, please discard.