Open stylarene opened 1 year ago
You can create a bash script that restarts server.py every hour or so with:
#!/usr/bin/bash
while true
do
# Launch Script
python3 server.py &
# Get PID
PID=$!
# Wait 1 hour
sleep 1h
# Kill it
kill $PID
done
Thus, the error no longer occurred for me.
Alternativ as Python script to unify the codebase:
import subprocess
import time
while True:
# Launch Script
subprocess.Popen(["python3", "server.py"])
# Wait 1 hour
time.sleep(3600)
# Kill it
subprocess.call(["pkill", "-f", "server.py"])
having this issue multiple times, please help if you can
How can I fix it so that this error no longer occurs after a long period of inactivity?