I’m running into an issue where my app is reverting back to a previous version of the code when the web browser is refreshed. I’m wondering if anyone has seen this or has any thoughts on how to fix it
In more detail, my setup is:
- Code locally pushed to GitHub
- Using AWS CodePipeline to source and deploy the code to an EC2 server (I didn’t set up this step)
- EC2 server is running with nginx (I didn’t set up this step either)
In the past, this was working seamlessly. I would push my code to GitHub and then CodePipeline would pick up the change and I would see a “rerun” option on my Streamlit app. Once in a while, I wouldn’t see the “rerun” option so I would manually reboot my server (and I even restarted nginx a few times in the past), but the app would still be running automatically once the server (or nginx) came back up
This past Friday I updated my code and restarting the server made my app stop running. I was able to restart the process on EC2, but now I’m having the versioning issue. Basically if I push a change or manually hit “rerun” from the dropdown, I get the latest version of my code. But if I refresh my browser, it always goes back to a previous version (always the same old version). Other users are seeing the same issue
What I’ve tried:
- Pushing changes to my code (and I see the new code on my EC2 server)
- Restarting the EC2 server
- Restarting nginx
- Uninstalling and reinstalling Streamlit on the EC2 server
- Trying to find startup commands for EC2 that were potentially overriding my start_server.sh file (I couldn’t find anything)
- Clearing browser cache/history
One other note - I have two streamlit apps running from the same server. The older app hasn’t been touched in awhile, but was still running fine. Once I got my newer app to restart, the running data (from “ps aux | grep streamlit”) looked different for my newer app, so I changed the start_server.sh to make it look the same as my older app. It’s weird to me that I needed to change this, since I never did before, but I couldn’t get the running data to look the same otherwise (I don’t know if it was the same or different between apps in the past as I never looked at this until now)
Any help is greatly appreciated since, given my lack of AWS architecture knowledge, I’d rather not try to start from scratch and potentially mess it up even more