Two Instances Running at the Same Time

I just deployed a web service with a postgreSQL database, and one of the issues I’m facing now is that all the eventListeners and constructors are being created twice, which tells me that there are two instances of the website running at the same time.

I have a method that conserves the user session when you refresh the page, but because it gets run twice it only conserves the session token for a split second and then it promptly erases it the second time it’s executed.

Is there a way I can kill the second routine and have the web app run only once? Thanks in advance.

Hi Samuel,

There are scenarios where two instances may be running for a period of time, this is down to our zero-downtime feature and not something that can be disabled.

If you need to preserve temporary state in your application, one approach would be to leverage something like Redis for that use-case. Then it would not matter which instance handles a request, the user session would be retrieved from Redis.



This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.