The usual cause for "foaming electrolyte" is that it has absorbed sufficient Carbon Dioxide from exposure to open air that a significant amount of Sodium or Potassium Carbonate has formed.
Sodium or Potassium Carbonate in solution are very much like soapy water and will support rather large bubbles.
Just drain your electrolyte and refresh it with a new mix.
Avoid exposing your electrolyte mix to the open air for more than a few minutes at most.