sensu / sensu-dashboard

A dashboard for Sensu, for displaying & managing events & clients.
http://sensuapp.org
MIT License
96 stars 44 forks source link

Connection failures when communicating with api (ruby 2.0.0) #138

Closed dieb closed 10 years ago

dieb commented 11 years ago

I recently started noticing some requests made from the browser to the dashboard were failing ("could not retrieve /path from the sensu api"). Currently using dashboard 0.9.9 and ruby 2.0.0.

After some digging I found that my request ended up on the http.errback callback, which indicates there may have been an error. Inside that callback, status code was 200, but the body had incomplete text.

This might be related to em-http-request issue#190. FWIU em is not thread-safe and you can only open up new connections on the reactor thread. In my case, the issue is probably a timeout and thus the request eventually gets preemptively cancelled.

A workaround has been suggested there and I got my own patch to remediate the problem.

I'd like to open up the issue for discussion on how to best address this problem, if there's anything we can do about it on sensu-dashboard's side.

amdprophet commented 10 years ago

Moving to AngularJS from Backbone.JS. This should no longer be an issue in the next release.