503 Service Unavailable after error about space

Hi, just setting up and configuring a new discourse site, first time with discourse, had the site running perfectly fine on an Ubuntu server, when all of a sudden it complained about something about being out of space for download to local? I was planning on wiring it to my S3 account anyway so I went to admin to do this, ticked the upload to s3 option, all good, pasted my AWS credentials and the fields started showing a generic error message under them. I refreshed the page and then got the 503…

Where can I look for logs in the docker container, and any idea why the 503 would start kicking up. I tried running launcher rebuild app but it still resulted in the app being unavailable.

Found the logs, the app is complaining about a template error in the rails log:

ActionView::Template::Error (s3_upload_bucket):
    44:     <%- if SiteSetting.s3_cdn_url.present? %>
    45:       Discourse.S3CDN = '<%= SiteSetting.s3_cdn_url %>';
    46:     <%- end %>
    47:     Discourse.S3BaseUrl = '<%= Discourse.store.absolute_base_url %>';
    48:   <%- end %>
    49: </script>
  lib/file_store/s3_store.rb:95:in `s3_bucket'
  lib/file_store/s3_store.rb:13:in `initialize'
  lib/discourse.rb:289:in `new'
  lib/discourse.rb:289:in `store'
  app/views/common/_discourse_javascript.html.erb:47:in `_app_views_common__discourse_javascript_html_erb__2897053388381153668_70097388552340'
  app/views/layouts/application.html.erb:92:in `_app_views_layouts_application_html_erb___4578854902901934276_70097391459740'
  app/controllers/categories_controller.rb:33:in `block (2 levels) in index'
  app/controllers/categories_controller.rb:32:in `index'
  lib/middleware/anonymous_cache.rb:124:in `call'
  config/initializers/quiet_logger.rb:10:in `call_with_quiet_assets'
  config/initializers/silence_logger.rb:26:in `call'
  lib/middleware/request_tracker.rb:73:in `call'
  lib/scheduler/defer.rb:85:in `process_client'
  lib/middleware/unicorn_oobgc.rb:95:in `process_client'

There’s a repetitive error about being able to connect Redis in production.stderr.log which I’m not sure is related or not.

We need more information. Can you paste more of the logs?

1 Like

I figured out what was happening, the 503 was totally unrelated to the S3 template error.

It looks like launcher had downloaded/created about 5GB of docker images/instances and eaten up every last bit of space on the server. So when the launcher tried to run it had absolutely no space to use for discourse, the server has a 10GB HDD on it and the launcher managed to eat up every last bit of it with only a handful of rebuilds.

It’s resolved now, but thank you for responding, I think probably what happened with the S3 settings is that I was filling in the settings as discourse was basically in it’s death throes (from lack of space) and thats why the errors occurred and the log entries happened.

1 Like