It seems that heroku doesn’t like session much
Not sure if this only happens to me. But just sometimes heroku just give out “Application Error” for no reason on my application. No errors have been logged in the console. So I send a couple email to herouk support but no luck, because there’s no log. So, I digged further. I found out that using http session on cloud might be a problem, because you don’t know where you application server will be or will it be scaled somewhere else. So, sometime the session is cut (It just my theory without any reference). So, please let me know if I’m wrong.
This is how I solved the problem, I changed everything and used memcache instead and the problem is gone. Memcache is in-memeory cache system which you have store objects as well. And I’m sure that it’s scaleable. So, if you have the same problem as me I would suggest using memcache instead it’s easy.
Ps. I use Sinatra.
Til next time,
noppanit at 00:00