Critical "invalid CSRF token" when logging into panel and frontend forms are broken

It’s happening very frequently that I get “invalid CSRF token” when trying to log into the panel. Also, it seems related, when this issue is happening some frontend forms doesn’t work and doens’t send data.

Sometimes when deleting media/session folder things get back to normal but it breaks after a few hours.

Currently when I try to get to log in into the panel I get a blank page and the following two errors on the console:

Uncaught SyntaxError: “” literal not terminated before end of script

Firefox can‘t establish connection with the ser at en wss://

Please I really need help with this.