Actions
Bug #6705
closed[API] Websockets denial of service requesting past logs
Start date:
07/23/2015
Due date:
% Done:
100%
Estimated time:
(Total: 0.00 h)
Story points:
0.5
Description
If a user connects to websockets and provides last_log_id = 1, websockets will replay all logs matching the filter from the beginning of time. Unfortunately, while it is doing that, it stops responding to every other interaction as well.
It sometimes crashes with a stack overflow:
/home/peter/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15: stack level too deep (SystemStackError)
It's already supposed to break up sending the backlog in chunks to avoid this exact problem, so my suspicion is that EventMachine is being silly and executing push_events
immediately from schedule
instead of the intended behavior of queuing the task until the next turn of the event loop.
if count == limit # Number of rows returned was capped by limit(), we need to schedule # another query to get more logs (will start from last_log_id # reported by current query) EventMachine::schedule do push_events ws, nil end
Updated by Peter Amstutz over 9 years ago
- Target version changed from Bug Triage to 2015-08-05 sprint
Updated by Peter Amstutz over 9 years ago
- Status changed from In Progress to Resolved
- % Done changed from 50 to 100
Applied in changeset arvados|commit:2ab08e38376d9591394d35d7676badf96f7b99c9.
Actions