You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I implemented the following dirty script on server-side.
Let me know if you have any ideas...
crontab -e (replace <dir>)
*/1 * * * * <dir>/corforum/CoRT/check.sh 2>&1
check.sh (replace <dir>)
#!/bin/bash
# Define the URL to check
URL="https://cort.cor-forum.de"
# Send a GET request to the URL and capture the HTTP status code
HTTP_STATUS=$(curl -o /dev/null -s -w "%{http_code}\n" $URL)
# Check if the HTTP status code is 200
if [ "$HTTP_STATUS" -ne 200 ]; then
echo "Site $URL is not reachable. Status code: $HTTP_STATUS"
echo "Restarting Docker Compose services..."
# Navigate to the Docker Compose directory
cd <dir> /corforum/CoRT
# Restart the Docker Compose services
docker compose restart
echo "Docker Compose services restarted."
else
echo "Site $URL is reachable. Status code: $HTTP_STATUS"
fi
Joshua2504
changed the title
server crashing if mysql connection is lost
FIX: server crashing if mysql connection is lost
Aug 23, 2024
No description provided.
The text was updated successfully, but these errors were encountered: