Hi,
We are running Trongate application on a docker container. Based on the traffic my client decided to scale up the containers. (Roudn robin method -> I don't know about this , but my admin told me this -> handling requests across multiple containers) Ok after scaling up , when I try to login from /members/login I am not able to login and I am getting same login page again and again. But on a single container it is working fine. After searching stack over flow they mentioned add session_name("Some name") before session_start(). But this is not working. I have added this in engine/bootstrap.php Can any one please help me in this regards?
Thank you
Siri K
How to share session across multiple docker containers?
4 years ago
4 years ago
#1
4 years ago
#2
Hi Siri, long time no speak... I hope all is well with you.
I haven't played with Trongate inside a Docker container, let alone multiple containers.
My suggestion would be to force the login to see if other things are working or put several echo "step1"; echo "step2.."; in the code to see where it is falling over.
I haven't played with Trongate inside a Docker container, let alone multiple containers.
My suggestion would be to force the login to see if other things are working or put several echo "step1"; echo "step2.."; in the code to see where it is falling over.
4 years ago
#3
I think your issue is to do with Cocker not being able to handle state. So, things like sessions and cookies will break because your setup is over-engineered bullschitt.
So, you're gonna have to figure out an alternative way of storing tokens. If it was me, I'd look into encrypting tokens and storing them with localStorage, with javascript. JSON web tokens are another bullschitt thing that you could look into. Of course, it's all no fun at all.
I apologise for not having better news for you. I hardly know what to say. Choose an exotic setup and you get a bunch of exotic problems. It's just the way it goes, unfortunately.
So, you're gonna have to figure out an alternative way of storing tokens. If it was me, I'd look into encrypting tokens and storing them with localStorage, with javascript. JSON web tokens are another bullschitt thing that you could look into. Of course, it's all no fun at all.
I apologise for not having better news for you. I hardly know what to say. Choose an exotic setup and you get a bunch of exotic problems. It's just the way it goes, unfortunately.
4 years ago
#4
Hi Siri,
Not sure if you are still having issues with this project as you have been quiet on this thread.
Are you bundling all your services in one Docker container or decoupled each service in it's own container?
Could you share your Dockerfile?
Not sure if you are still having issues with this project as you have been quiet on this thread.
Are you bundling all your services in one Docker container or decoupled each service in it's own container?
Could you share your Dockerfile?
4 years ago
#5
Hi Simon.
sorry for late response. Currently we are deploying application on proxmox server with Jenkins pipe lines etc. That's why busy with that stuff. Once this is done then I will look into that and surely communicate with you.
Thank you very much
Siri K
sorry for late response. Currently we are deploying application on proxmox server with Jenkins pipe lines etc. That's why busy with that stuff. Once this is done then I will look into that and surely communicate with you.
Thank you very much
Siri K