Intermittent 500 Internal Server Error


#1

Hi there,

Every few months, I get a series of ERROR 500 intermittently on my instance (lgbt.io) until I clear remote file caches (despite still having more than 50% free disk space), clear Sidekiq’s Retries and Dead tasks and do a mastodon service restart. Sometimes even a server reboot, in order to get my instance back to stable state.

I tried to relate my server RAM with ERROR 500. Despite my server RAM (8GB) is constantly topped, ERROR 500 doesn’t happen constantly (it happens only every few months). So, the error may or may not caused by memory?

I also wonder what files or any error logs that should I look into to find out the underlying issues?

[My instance has a total of 750 members, 44000 toots and 1653 connections to other instances]


#2

Where the logs are depends on your deployment choice, Docker or standalone. You would want to look at the logs of the web process, in Docker it’s: docker logs mastodon_web_1 (container name may vary, add -f if you want the log to update in real-time), with systemd it’s: journalctl -u mastodon-web (likewise about the -f)

It’s important to understand what goes wrong specifically, normally you shouldn’t need to clear anything manually.