Tengo un puñado de instancias de Discourse que funcionaron durante mucho tiempo sin problemas. Recientemente me mudé a Hetzner desde DO. Como parte de la mudanza, finalmente inicié el monitoreo, usando Uptime por ahora. Endurecí los servidores usando Ubuntu USG.
Tres de las 7 instancias se desconectan rutinariamente durante 5 a 15 minutos aproximadamente a la misma hora todos los días. Quizás esto ocurría en DO, pero sin monitoreo, ¿quién sabe?
Todos los sitios ejecutan el mismo conjunto de plugins oficiales.
Sospechando un problema de memoria, actualicé una instancia de 2 CPU 2GB RAM a 3 CPU con 4GB RAM.
No cambié db_shared_buffers: “256MB”
No cambié UNICORN_WORKERS: 4
El aumento del rendimiento parece haber ayudado, pero ¿necesitaría tantos recursos en un sitio muy tranquilo?
Agradecería cualquier idea o sugerencia.
La secuencia del incidente siempre comienza con un error de excepción de trabajo
Mensaje (4 copias reportadas)
Excepción de trabajo: Esperó 1.0 segundos
Rastreo de pila
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/redis-client-0.25.0/lib/redis_client/ruby_connection/buffered_io.rb:214:in `block in fill_buffer'
_in_kernel_:187:in `loop'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/redis-client-0.25.0/lib/redis_client/ruby_connection/buffered_io.rb:197:in `fill_buffer'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/redis-client-0.25.0/lib/redis_client/ruby_connection/buffered_io.rb:187:in `ensure_remaining'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/redis-client-0.25.0/lib/redis_client/ruby_connection/buffered_io.rb:152:in `getbyte'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/redis-client-0.25.0/lib/redis_client/ruby_connection/resp3.rb:113:in `parse'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/redis-client-0.25.0/lib/redis_client/ruby_connection/resp3.rb:50:in `load'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/redis-client-0.25.0/lib/redis_client/ruby_connection.rb:96:in `read'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/redis-client-0.25.0/lib/redis_client/connection_mixin.rb:31:in `call'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/redis-client-0.25.0/lib/redis_client.rb:316:in `block (2 levels) in call_v'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/redis-client-0.25.0/lib/redis_client/middlewares.rb:16:in `call'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/redis-client-0.25.0/lib/redis_client.rb:315:in `block in call_v'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/redis-client-0.25.0/lib/redis_client.rb:721:in `ensure_connected'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/redis-client-0.25.0/lib/redis_client.rb:314:in `call_v'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/redis-5.4.0/lib/redis/client.rb:90:in `call_v'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rack-mini-profiler-4.0.0/lib/mini_profiler/profiling_methods.rb:90:in `block in profile_method'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/redis-5.4.0/lib/redis.rb:152:in `block in send_command'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/redis-5.4.0/lib/redis.rb:151:in `synchronize'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/redis-5.4.0/lib/redis.rb:151:in `send_command'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/redis-5.4.0/lib/redis/commands/strings.rb:191:in `get'
/var/www/discourse/lib/discourse_redis.rb:144:in `public_send'
/var/www/discourse/lib/discourse_redis.rb:144:in `block (3 levels) in <class:DiscourseRedis>'
/var/www/discourse/lib/discourse_redis.rb:29:in `ignore_readonly'
/var/www/discourse/lib/discourse_redis.rb:144:in `block (2 levels) in <class:DiscourseRedis>'
/var/www/discourse/lib/sidekiq/pausable.rb:19:in `paused?'
/var/www/discourse/lib/sidekiq/pausable.rb:105:in `paused?'
/var/www/discourse/config/initializers/100-sidekiq.rb:98:in `block (3 levels) in <main>'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/mini_scheduler-0.18.0/lib/mini_scheduler.rb:74:in `block (2 levels) in start'
Seguido poco después por algo como:
Error al precalentar texto bonito: terminado /var/www/discourse/lib/discourse_js_processor.rb:89:in `call' /var/www/discourse/lib/discourse_js_processor.rb:89:in `block in v8_call' /var/www/discourse/lib
Mensaje (2 copias reportadas)
Error al precalentar texto bonito: terminado
/var/www/discourse/lib/discourse_js_processor.rb:89:in `call'
/var/www/discourse/lib/discourse_js_processor.rb:89:in `block in v8_call'
/var/www/discourse/lib/discourse_js_processor.rb:88:in `synchronize'
/var/www/discourse/lib/discourse_js_processor.rb:88:in `v8_call'
/var/www/discourse/lib/discourse_js_processor.rb:113: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:81:in `create_es6_context'
/var/www/discourse/lib/pretty_text.rb:135:in `block in v8'
/var/www/discourse/lib/pretty_text.rb:133:in `synchronize'
/var/www/discourse/lib/pretty_text.rb:133:in `v8'
/var/www/discourse/lib/pretty_text.rb:176:in `block in markdown'
/var/www/discourse/lib/pretty_text.rb:678:in `block in protect'
/var/www/discourse/lib/pretty_text.rb:678:in `synchronize'
/var/www/discourse/lib/pretty_text.rb:678:in `protect'
/var/www/discourse/lib/pretty_text.rb:175:in `markdown'
/var/www/discourse/lib/pretty_text.rb:301:in `cook'
/var/www/discourse/lib/discourse.rb:960:in `after_fork'
config/unicorn.conf.rb:197: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/w...
Rastreo de pila
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/broadcast_logger.rb:134:in `block in error'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/broadcast_logger.rb:231:in `block in dispatch'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/broadcast_logger.rb:231:in `each'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/broadcast_logger.rb:231:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/broadcast_logger.rb:134:in `error'
/var/www/discourse/lib/discourse.rb:962:in `rescue in after_fork'
/var/www/discourse/lib/discourse.rb:958:in `after_fork'
config/unicorn.conf.rb:197: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>'
