Bad Gateway Errors on new Microblog.pub
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:
- 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
- Run the following command to make the script executable:
chmod 700 ~/apps/name_of_app/cron
- 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?
- Edited
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.