Inability to prevent the app from hibernating due to lack of traffic, even following the recommendation to add empty commits to the project's GitHub repository

Hi, I’ve developed an application to extract and integrate various databases with information related to my degree course, to serve as a reference for students and teachers. I created graphical visualizations and stored them on a website hosted on Streamlit’s cloud service.

The problem is that after 7 days without activity, the site with the graphic visualizations goes into hibernation mode and can no longer be accessed. The Streamlit documentation recommends creating an automated routine to add empty commits to the project’s GitHub repository, as a palliative alternative to the absence of user traffic. So I did. Every 5 days, an empty commit is added to the project repository, but this commit addition flow has not been successful in preventing the app from hibernating due to lack of traffic.

What could I change in the workflow created in GitHub Actions to prevent the app from hibernating? Below, for verification purposes, I’ve provided the code for automating the addition of commits, stored in the .yml file.

name: app_activity

on:
  schedule:
    - cron: "0 0 */5 * *"
  workflow_dispatch:

env:
  ACTIONS_ALLOW_UNSECURE_COMMANDS: true

jobs:
  auto_commits:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4

      - name: commit files
        run: |
          git config --local user.email "action@github.com"
          git config --local user.name "GitHub Action"
          git commit --allow-empty -m "Auto commit para manutenção da atividade do app"
          
      - name: push changes
        uses: ad-m/github-push-action@master
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          branch: main

Hi there, I have a streamlit app in the streamlit cloud that constantly goes into sleep mode. We open it every day, but it keeps going offline. Do you know the problem, and are there any solutions? Of course, it is a free service, but as an academic alliance member, I want to show demonstrators to an academic audience. It makes no sense for me to wake apps up for almost daily use again and again from hibernation. Cheers

1 Like

@Dr1 @magalhaes-d could you share links to your apps? We would like to understand a bit more about the app’s behavior, how long it takes to start up, what type of processing it is doing.

Hi, thanks for your reply! Here’s the link to access the app: https://web-sec-ufs.streamlit.app/

The app takes around 2 minutes to start after hibernation. As for the question of the app’s processing, I don’t know how to answer that correctly. But the app processes the bases that are in the github repository to generate the visualizations.

If you have any more questions, please feel free to ask.

Would love to see a solution to this issue. I have the same thing happening. The app goes to sleep after only two days rather than seven as Streamlit indicates in its documentation. I will change my empty commits to daily to see if this addresses, but would still like to know if theStramlit’s Community policy has changed.

1 Like

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