Skip to content

Streaming not working #2

@mattfordham

Description

@mattfordham

Here there. I can't seem to get streaming working in my Rails app on Heroku with Unicorn. I also tested locally with Foreman with no luck. I am using the same view code as is in the test app for this gem. The file download never initiates... it just spins while it cranks through the loop. I know this isn't much to go on, but is there anything I could be missing?

Controller:

  @streaming = true
  @filename = 'report.csv'
   respond_to do |format|
     format.csv
end

View:


10_000_000.times do |i|
   csv << ["this","is","a","scale","test",i.to_s]
end

Procfile:
web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb

Unicorn.rb

timeout 30         # restarts workers that hang for 30 seconds```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions