mastodon / documentation

Mastodon documentation
https://docs.joinmastodon.org
GNU Free Documentation License v1.3
1.7k stars 972 forks source link

How to debug a production instance #852

Closed xeruf closed 8 months ago

xeruf commented 3 years ago

I have set up my instance according to https://docs.joinmastodon.org/admin/install and configured the caddy web server with a Caddyfile I found: https://gist.github.com/yukimochi/bb7c90cbe628f216f821e835df1aeac1#file-caddyfile-caddy2

Everything seems fine, except when I try to visit my instance on the web, I get an error page. I couldn't find anything helpful in the logs, so I wanted to enable further debugging. https://docs.joinmastodon.org/admin/config talks about the RAILS_ENV variable, which can't be set in the .env-file - but how else can I change it? Simply recompile with a different setting, i.e. RAILS_ENV=development bundle exec rails assets:precompile?

xeruf commented 3 years ago

related: document the purpose of RAILS_ENV=test - is it for running tests, or testing an instance before going into production? i.e. is the order test - development - production or development - test - production?

xeruf commented 3 years ago

RAILS_LOG_LEVEL from https://docs.joinmastodon.org/admin/config may also be relevant

Gargron commented 3 years ago

related: document the purpose of RAILS_ENV=test - is it for running tests, or testing an instance before going into production? i.e. is the order test - development - production or development - test - production?

Test is for unit testing. Only production is for production.

Gargron commented 3 years ago

See: https://docs.joinmastodon.org/admin/troubleshooting/

xeruf commented 3 years ago

@Gargron I looked there, but it does not specify any info about how to enable any kind of debug mode, and the default logs are not always sufficient.