Errors in /logs since the latest update

Hello :wave:

I’ve got some new never seen before errors and warnings in /logs since my latest update which was yesterday.

Message

Unicorn worker received USR2 signal indicating it is about to timeout, dumping backtrace for main thread
config/unicorn.conf.rb:301:in `backtrace'
config/unicorn.conf.rb:301:in `block (2 levels) in reload'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/logster-2.20.0/lib/logster/logger.rb:81:in `caller_locations'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/logster-2.20.0/lib/logster/logger.rb:81:in `add_with_opts'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/logster-2.20.0/lib/logster/logger.rb:60:in `add'
/usr/local/lib/ruby/3.3.0/logger.rb:697:in `info'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/broadcast_logger.rb:126:in `block in info'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/broadcast_logger.rb:231:in `block in dispatch'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/broadcast_logger.rb:231:in `each'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/broadcast_logger.rb:231:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/broadcast_logger.rb:126:in `info'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/log_subscriber.rb:167:in `info'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/actionpack-7.1.3.4/lib/action_controller/log_subscriber.rb:25:in `process_action'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/subscriber.rb:137:in `call'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/log_subscriber.rb:150:in `call'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/notifications/fanout.rb:181:in `block in finish'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/notifications/fanout.rb:26:in `block in iterate_guarding_ex...

Backtrace

/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/broadcast_logger.rb:130:in `block in warn'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/broadcast_logger.rb:231:in `block in dispatch'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/broadcast_logger.rb:231:in `each'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/broadcast_logger.rb:231:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/broadcast_logger.rb:130:in `warn'
/var/www/discourse/lib/signal_trap_logger.rb:40:in `public_send'
/var/www/discourse/lib/signal_trap_logger.rb:40:in `block (2 levels) in ensure_logging_thread_running'
<internal:kernel>:187:in `loop'
/var/www/discourse/lib/signal_trap_logger.rb:37:in `block in ensure_logging_thread_running'
Message (11 copies reported)

Failed to warm up pretty text: JavaScript was terminated (either by timeout or explicitly)
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/mini_racer-0.14.1/lib/mini_racer.rb:237:in `eval_unsafe'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/mini_racer-0.14.1/lib/mini_racer.rb:237:in `block (2 levels) in eval'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/mini_racer-0.14.1/lib/mini_racer.rb:378:in `timeout'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/mini_racer-0.14.1/lib/mini_racer.rb:236:in `block in eval'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/mini_racer-0.14.1/lib/mini_racer.rb:234:in `synchronize'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/mini_racer-0.14.1/lib/mini_racer.rb:234:in `eval'
/var/www/discourse/lib/discourse_js_processor.rb:93:in `create_new_context'
/var/www/discourse/lib/discourse_js_processor.rb:109:in `block in v8'
/var/www/discourse/lib/discourse_js_processor.rb:107:in `synchronize'
/var/www/discourse/lib/discourse_js_processor.rb:107:in `v8'
/var/www/discourse/lib/discourse_js_processor.rb:122:in `block in v8_call'
/var/www/discourse/lib/discourse_js_processor.rb:121:in `synchronize'
/var/www/discourse/lib/discourse_js_processor.rb:121:in `v8_call'
/var/www/discourse/lib/discourse_js_processor.rb:146:in `perform'
/var/www/discourse/lib/pretty_text.rb:34:in `apply_es6_file'
/var/www/discourse/lib/pretty_text.rb:41:in `block in ctx_load_directory'
/var/www/discourse/lib/pretty_text.rb:39:in `each'
/var/www/discourse/lib/pretty_text.rb:39:in `ctx_load_directory'
/var/www/discourse/lib/pretty_text.rb:77:in `create_es6_context'
/var/www/discourse/lib/pretty_text.rb:136:in `block in v8'
/var/www/discourse/lib/pretty_text.rb:134:in `synchronize'
/var/www/discourse/lib/pretty_text.rb:134:in `v8'
/var/www/discourse/lib/pretty_text.rb:177:in `block in markdown'
/var/www/discourse/lib/pretty_text.rb:686:in `block in protect'
/var/www/discourse/lib/pretty_text.rb:686:in `synchronize'
/var/www/discourse/lib/pretty_text.rb:686:i...

Backtrace

/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/broadcast_logger.rb:134:in `block in error'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/broadcast_logger.rb:231:in `block in dispatch'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/broadcast_logger.rb:231:in `each'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/broadcast_logger.rb:231:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/broadcast_logger.rb:134:in `error'
/var/www/discourse/lib/discourse.rb:941:in `rescue in after_fork'
/var/www/discourse/lib/discourse.rb:937:in `after_fork'
config/unicorn.conf.rb:295:in `block in reload'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/unicorn-6.1.0/lib/unicorn/http_server.rb:684:in `init_worker_process'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/unicorn-6.1.0/lib/unicorn/http_server.rb:721:in `worker_loop'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/unicorn-6.1.0/lib/unicorn/http_server.rb:547:in `spawn_missing_workers'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/unicorn-6.1.0/lib/unicorn/http_server.rb:561:in `maintain_worker_count'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/unicorn-6.1.0/lib/unicorn/http_server.rb:294:in `join'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/unicorn-6.1.0/bin/unicorn:128:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/3.3.0/bin/unicorn:25:in `load'
/var/www/discourse/vendor/bundle/ruby/3.3.0/bin/unicorn:25:in `<main>'

Seems the second error is freeze the app and drop the connection and load again only a few mins later. This happened last time when I try to change my dark color scheme and saving it in user interface page the save button stucked into Saving… position and not turned to success. After this the site not loading for a few minutes but this seems to me pretty random.

Thanks :slightly_smiling_face:

1 Like

Interesting one @tgxworld, are we seeing any of these as well?

1 Like

We are seeing Unicorn timeouts but they are happening for a wide variety of reasons.

I did just realise that logster truncates the message so we can’t view the full backtrace easily. I might need to improve this logging so that we only include backtraces of the Discourse app.

1 Like

Update: I didn’t see these errors since then. :slight_smile:

1 Like