It's supposed to foam up. That's why it works. But you have to clamp it solid. If you don't, it will do just as you say. It will foam up and make a mess but it won't stick.

I watched a guy use it to mend split wood but I didn't do it myself. It was the lid to a small chest. He clamped the crap out of it. Bar clamps and battens. It wasn't actually "Gorilla" brand glue. It was a commercial, polyurethane glue. Maybe there's a difference there.

To be honest, I think I might change my suggestion to the carpenter's glue. Although I have used, "Gorilla" brand glue and it has worked well for me, it is a one-shot deal. You have to do it right the first time or you'll be screwed. No second chances. Carpenter's glue is easier to use and, if you don't get it right, you can do it over.