I had a piece of equipment that had a pto operated pump and it would do the same thing when it got below freezing then after awhile it would do it all the time regardless of temp. Had a bad seal in pump that wouldn't leak oil but would let it suck air around it and foam oil up.