documentation icon indicating copy to clipboard operation
documentation copied to clipboard

How to debug a production instance

Open xeruf opened this issue 4 years ago • 5 comments
trafficstars

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 avatar Jan 16 '21 17:01 xeruf

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 avatar Jan 23 '21 08:01 xeruf

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

xeruf avatar Jan 25 '21 20:01 xeruf

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 avatar Jan 25 '21 23:01 Gargron

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

Gargron avatar Jan 25 '21 23:01 Gargron

@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.

xeruf avatar Jan 26 '21 07:01 xeruf