Cornmeal won’t set up
It sounds like maybe you have introduced an enzyme (such as alpha amylase) into your polenta. What is in your recipe? You might try cooking your polenta at a boil for at least 30 seconds.