[API] Improve websocket efficiency
(Total: 0.00 h)
- "logs.id > ?" condition is open ended. This should have a limit and schedule more work if necessary.
- Should look at 'id' passed into push_events and return immediately if that id < last_log_id
- Should record 'id' in the last_log_id if no rows were returned
#2 Updated by Ward Vandewege almost 5 years ago
puma also shouldn't recover from out of memory conditions, it should just die. That way runit will restart it.
2014-07-02_18:28:36.48001 * Version 2.8.2 (ruby 2.1.1-p76), codename: Sir Edmund Percival Hillary 2014-07-02_18:28:36.48002 * Min threads: 0, max threads: 64 2014-07-02_18:28:36.48002 * Environment: production 2014-07-02_18:28:41.48719 * Listening on tcp://127.0.0.1:8100 2014-07-02_18:28:41.49459 Use Ctrl-C to stop 2014-07-08_16:16:41.99895 /var/www/4xphq.arvadosapi.com/releases/20140702182803/lib/eventbus.rb:206:in `wait_for_notify': failed to allocate memory (NoMemoryError) 2014-07-08_16:16:42.00571 from /var/www/4xphq.arvadosapi.com/releases/20140702182803/lib/eventbus.rb:206:in `block (3 levels) in on_connect' 2014-07-08_16:16:42.00572 from /var/www/4xphq.arvadosapi.com/releases/20140702182803/vendor/bundle/ruby/2.1.0/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract/connection_pool.rb:129:in `with_connection' 2014-07-08_16:16:42.00573 from /var/www/4xphq.arvadosapi.com/releases/20140702182803/lib/eventbus.rb:195:in `block (2 levels) in on_connect'