A couple time now I've created a microblog using the instructions here. All seems well but then when I come back to it a few days later all I have is a "502 Bad Gateway" error. Any thoughts on why that might be?

    rdelrossi You are most likely exceeding your hosting plan's memory allowance which is causing your processes to be terminated by the quota monitor.

    If you want it to restart automatically when this happens:

    1. Create a script ~/apps/name_of_app/cron with the following contents:

      #!/bin/bash
      cd ~/apps/name_of_app
      VENV_DIR=$( poetry env info | grep ^Path | awk '{print $2}' | head -n 1 ) poetry run supervisord -c misc/supervisord.conf 
    1. Run the following command to make the script executable:

      chmod 700 ~/apps/name_of_app/cron
    1. Run crontab -e and add the following line to your crontab:

      * * * * * ~/apps/name_of_app/cron >> ~/logs/apps/name_of_app/cron.log 2>&1

    Thanks for the quick reply, @sean. If I'm exceeding my memory allowance with a blank microblog.pub perhaps it's not the right vehicle for me ;-)

    I appreciate the workaround, but that seems to be beyond the spirt of a good customer. I was really just experimenting, but do I understand correctly that you're saying that if I really wanted to use it, I should explore an upgrade to my plan?

    • sean replied to this.

      rdelrossi if the application you want to run uses more memory than your plan provides then yes, you would need to upgrade.

      a month later
      8 months later

      rdelrossi

      I have the same problem, I think since the beginning a few months ago now. The excessive memory consumption doesn't seem to be something normal for the application, but I can't understand the logs either. The application consumes stable 400-500 MB for hours and suddenly jumps to the stars. I cleaned the list of followers and followers that could be causing problems but still the problem persists.

      Really, I don't think it's a problem that will be fixed by expanding resources. It seems to be an issue of malfunctioning of the application.

      Updating and restarting (Thanks Sean for providing the necessary commands) always worked to get back to normal.
      But now it no longer updates the timeline when it restarts, although at that point any other interaction seems to work fine.

      (I just tried rebooting again, for the tenth time, and now it did bring me a timeline update, and then "502 Bad Gateway" )

      Something strange that I observe in logs is that I keep getting errors coming from url's of accounts that I no longer follow, nor do they follow me.

      Mastodon