Sounds like you used a quat based algicide. They will bubble like crazy! Made that mistake once in my spa and had to drain it. I think time will take care of it but someone who knows more about algicides might have a better answer. Ben's advice of only using polyquat is sound. It will not foam and bubble.
Bookmarks