Bug #4295

[API] Improve websocket efficiency

Added by Peter Amstutz about 5 years ago. Updated about 5 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Target version:
Start date:
10/23/2014
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Story points:
0.5

Description

  • "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

Subtasks

Task #4301: Review 4295-efficient-websocketsResolvedPeter Amstutz

Associated revisions

Revision cf1097ef
Added by Peter Amstutz about 5 years ago

Merge branch '4295-efficient-websockets' closes #4295

Revision 0862d720 (diff)
Added by Peter Amstutz about 5 years ago

Increase the timeout on "lots of events" websocket test. refs #4295

History

#1 Updated by Peter Amstutz about 5 years ago

  • Description updated (diff)

#2 Updated by Ward Vandewege about 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'

#3 Updated by Peter Amstutz about 5 years ago

  • Status changed from New to In Progress
  • Assigned To set to Peter Amstutz

#4 Updated by Brett Smith about 5 years ago

Reviewing de3bb6c. There's a small typo in your comments for push_events where it says "it may nil" (missing a verb). But this is a good to merge, thanks.

#5 Updated by Anonymous about 5 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

Applied in changeset arvados|commit:cf1097ef1225c05eb4431093a4971739a3ee5a37.

#6 Updated by Ward Vandewege about 5 years ago

  • Story points set to 0.5

Also available in: Atom PDF