장애 기록
이 문서의 본문은 아직 한국어로 번역되지 않았습니다. 아래에 영어 원문을 제공합니다.
Ticket ID
SUP-0001
Title
Cloudflare 521 after Mastodon upgrade
Severity
High
Environment
- Ubuntu 24.04 LTS
- Mastodon
- Docker Compose
- Nginx
- Cloudflare
Issue
Users were unable to access the Mastodon instance after an upgrade. Cloudflare returned HTTP 521 while application containers continued running normally.
Symptoms
- Cloudflare HTTP 521
- Docker containers healthy
- PostgreSQL healthy
- Puma running normally
- Web access unavailable
Impact
- Public web access unavailable
- Service downtime: approximately 60–90 minutes
Investigation
- Checked Docker Compose status (
docker compose ps) - Verified Web and Puma logs
- Confirmed PostgreSQL connectivity
- Reviewed Elasticsearch logs
- Tested nginx configuration using
nginx -t - Checked nginx service status with
systemctl status nginx
Root Cause
Nginx failed to start due to an invalid configuration after the upgrade. As a result, Cloudflare could not establish a connection with the origin server.
Resolution
- Verified nginx configuration using
nginx -t - Removed duplicated nginx configuration
- Restarted nginx
- Confirmed successful service recovery
Verification
- nginx running normally
- Cloudflare accessible
- Mastodon web interface available
- Users able to reconnect successfully
Lessons Learned
- Cloudflare 521 does not always indicate an application failure.
- Reverse proxy services should be checked before investigating application containers.
Prevention
- Run
nginx -tbefore restarting nginx. - Verify nginx service status whenever Cloudflare returns 521.
- Review upstream configuration after upgrades.