Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Puma hangs during asset loading #358

Closed
bpardee opened this issue Aug 21, 2013 · 5 comments
Closed

Puma hangs during asset loading #358

bpardee opened this issue Aug 21, 2013 · 5 comments

Comments

@bpardee
Copy link

bpardee commented Aug 21, 2013

I have a fairly large backbone app and when I clear my tmp/cache, puma under MRI 2.0 hangs during asset loading until I get "Require.js Load Timeout for Modules" error (Increasing the waitSeconds for Require.js doesn't help). I have to kill -9 to stop the server at this point. Under JRuby 1.7.4, the console log lists all kinds of supposed syntax errors in my coffeescript files although there is nothing actually wrong. Then when I cntl-c I get "Error in reactor loop escaped: closed stream (IOError)". What I end up doing is starting up webrick to get all the asset compilations cached and after that puma seems to work fine.

@evanphx
Copy link
Member

evanphx commented Aug 21, 2013

Could you gist the output and add the url to it?

@bpardee
Copy link
Author

bpardee commented Aug 22, 2013

I've included the console output for several runs. Each attempt gets a little farther along until I get a successful render but some of the javascript is corrupted as I receive console errors. This includes a webrick run which successfully comes all the way up with no console errors.

Let me know if there is anything else I can do to help!

https://gist.github.com/bpardee/6306122

@evanphx
Copy link
Member

evanphx commented Jan 25, 2014

I have a feeling this is a threading bug within rails. puma itself does nothing with assets.

@evanphx evanphx closed this as completed Jan 25, 2014
@emiliowl
Copy link

@emiliowl
Copy link

Solve the problem by set

Rack::Timeout.timeout = 0

and at least I found some relevant info at the log file, really hope it helps:

Puma caught this error: Attempt to unlock a mutex which is locked by another thread (ThreadError)
/home/murta/.rvm/gems/ruby-2.1.3@trans_terralheiro_dev/gems/rack-1.4.5/lib/rack/lock.rb:20:in unlock' /home/murta/.rvm/gems/ruby-2.1.3@trans_terralheiro_dev/gems/rack-1.4.5/lib/rack/lock.rb:20:inensure in call'
/home/murta/.rvm/gems/ruby-2.1.3@trans_terralheiro_dev/gems/rack-1.4.5/lib/rack/lock.rb:21:in call' /home/murta/.rvm/gems/ruby-2.1.3@trans_terralheiro_dev/gems/rack-timeout-0.2.0/lib/rack/timeout.rb:108:incall'
/home/murta/.rvm/gems/ruby-2.1.3@trans_terralheiro_dev/gems/railties-3.2.16/lib/rails/engine.rb:484:in call' /home/murta/.rvm/gems/ruby-2.1.3@trans_terralheiro_dev/gems/railties-3.2.16/lib/rails/application.rb:231:incall'
/home/murta/.rvm/gems/ruby-2.1.3@trans_terralheiro_dev/gems/railties-3.2.16/lib/rails/railtie/configurable.rb:30:in method_missing' /home/murta/.rvm/gems/ruby-2.1.3@trans_terralheiro_dev/gems/puma-2.11.1/lib/puma/rack_patch.rb:13:incall'
/home/murta/.rvm/gems/ruby-2.1.3@trans_terralheiro_dev/gems/puma-2.11.1/lib/puma/configuration.rb:82:in call' /home/murta/.rvm/gems/ruby-2.1.3@trans_terralheiro_dev/gems/puma-2.11.1/lib/puma/server.rb:507:inhandle_request'
/home/murta/.rvm/gems/ruby-2.1.3@trans_terralheiro_dev/gems/puma-2.11.1/lib/puma/server.rb:375:in process_client' /home/murta/.rvm/gems/ruby-2.1.3@trans_terralheiro_dev/gems/puma-2.11.1/lib/puma/server.rb:262:inblock in run'
/home/murta/.rvm/gems/ruby-2.1.3@trans_terralheiro_dev/gems/puma-2.11.1/lib/puma/thread_pool.rb:104:in `call'
/home/murta/.rvm/gems/ruby-2.1.3@trans_terralheiro_dev/gems/puma-2.11.1/lib/puma/thread_pool.rb:104:in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants