Skip to content

send_response intermittent failure #34

@catmando

Description

@catmando

The puffing billy gem is using evma_httpserver to simulate responses to javascript clients.

Intermittently a response is not getting back to the browser.

The puffing billy code (monkey patched to provide logging looks like this:)

Billy::ProxyConnection.send(:define_method, :send_response) do |response|
  Billy.log(:info, "puffing-billing: send_response #{response[:status]}, #{response[:headers]}, '#{response[:content][0..10]}'")
  res = EM::DelegatedHttpResponse.new(self)
  res.status = response[:status]
  res.headers = response[:headers]
  res.content = response[:content]
  res.send_response
  Billy.log(:info, "puffing-billing: send_response SENT!")
end

In the resulting log I see this:

puffing-billing: send_response 200, {"Content-Type"=>"application/javascript;charset=utf-8", "Connection"=>"close", "Status"=>"200", "X-Powered-By"=>"Phusion Passenger (mod_rails/mod_rack) 3.0.11", "Content-Length"=>"1708", "Server"=>"nginx/1.0.14 + Phusion Passenger 3.0.11 (mod_rails/mod_rack)"}, 'jQuery11200'
puffing-billing: send_response SENT!

but the browser log looks like this:

screen shot 2016-03-11 at 3 03 14 pm

This happens about 25 % of the time. When the response is successful everything looks exactly the same except in the browser net log I see 200 ... and 1708 bytes received.

The problem is NOT browser specific. I have tried the same scenario using poltergeist, with the same results.

It would be very difficult to get this into an isolated test case that I could share, but I would be happy to add logging to evma_httpserver, if I could have some clues WHAT to investigate. Also would be happy to set up a co-debug session on cloud9.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions