boof / rack-esi Goto Github PK
View Code? Open in Web Editor NEWESI middleware implementation for Rack. This middleware is currently reimplemented to run commands in parallel and fetch with curb.
License: MIT License
ESI middleware implementation for Rack. This middleware is currently reimplemented to run commands in parallel and fetch with curb.
License: MIT License
I'm trying to get this middleware running on Rails 4 w/ Unicorn as the web server. When I load a page with a single ESI tag I get the following:
Should I be using a different web server in development for this to work? Any help would be appreciated.
23:30:45 web.1 | Finishing #<Rack::ESI::Worker:0x007fe342778760 run>...
23:30:45 web.1 | Finishing #<Rack::ESI::Worker:0x007fe342778a80 run>...
23:30:45 web.1 | Finishing #<Rack::ESI::Worker:0x007fe342783ea8 run>...
23:30:45 web.1 | /Users/harlow/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rack-esi-0.2.0/lib/rack-esi/threaded.rb:46:in stop': No live threads left. Deadlock? from /Users/harlow/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rack-esi-0.2.0/lib/rack-esi/threaded.rb:46:in
process_document'
23:30:45 web.1 | from /Users/harlow/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rack-esi-0.2.0/lib/rack-esi/processor.rb:48:in process' 23:30:45 web.1 | from /Users/harlow/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rack-esi-0.2.0/lib/rack-esi.rb:39:in
call'
23:30:45 web.1 | from /Users/harlow/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/sendfile.rb:112:in call' 23:30:45 web.1 | from /Users/harlow/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/railties-4.1.0.beta1/lib/rails/engine.rb:516:in
call'
23:30:45 web.1 | from /Users/harlow/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/railties-4.1.0.beta1/lib/rails/application.rb:142:in call' 23:30:45 web.1 | from /Users/harlow/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/lint.rb:49:in
_call'
23:30:45 web.1 | from /Users/harlow/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/lint.rb:37:in call' 23:30:45 web.1 | from /Users/harlow/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/showexceptions.rb:24:in
call'
23:30:45 web.1 | from /Users/harlow/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/commonlogger.rb:33:in call' 23:30:45 web.1 | from /Users/harlow/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/chunked.rb:43:in
call'
23:30:45 web.1 | from /Users/harlow/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/content_length.rb:14:in call' 23:30:45 web.1 | from /Users/harlow/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/unicorn-4.7.0/lib/unicorn/http_server.rb:580:in
process_client'
23:30:45 web.1 | from /Users/harlow/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/unicorn-4.7.0/lib/unicorn/http_server.rb:660:in worker_loop' 23:30:45 web.1 | from /Users/harlow/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/unicorn-4.7.0/lib/unicorn/http_server.rb:527:in
spawn_missing_workers'
23:30:45 web.1 | from /Users/harlow/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/unicorn-4.7.0/lib/unicorn/http_server.rb:153:in start' 23:30:45 web.1 | from /Users/harlow/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/unicorn-4.7.0/bin/unicorn:126:in
<top (required)>'
23:30:45 web.1 | from /Users/harlow/.rbenv/versions/2.0.0-p247/bin/unicorn:23:in load' 23:30:45 web.1 | from /Users/harlow/.rbenv/versions/2.0.0-p247/bin/unicorn:23:in
The documentation should mention that you need to declare the esi namespace correctly as "http://www.edge-delivery.org/esi/1.0" on the html element. Took me a little while to figure that one out. :)
How can I use it with rails3?
Any hints, ideas?
I'm running a rails 2.3.11 project and when I include your gem and set the Rack::ESI middleware, the site no longer returns content. It seems that the request is processed, but the content is never returned to the browser.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.