We upgrade Magento to 1.9.2.4. Now it worked for a while. When we cleared the cached. We can't log in to the backend anymore. It keeps saying
"Invalid Form Key. Please refresh the page."
Our staging site is working fine.
I followed some instructions like increase in_var_input, check cookies and others but didn't work out.
Best Answer
The record #1733 was set to www.example.com by someone. That caused the issue.