ruby on rails - What should be a simple render takes almost a minute -
i'm using passenger start
in development environment, yet thin
, webbrick
, puma
have same results. problem seems consistent across development machines running ubuntu 14.04. in production, not have issue @ all. ruby version 2.1.3
, 2.1.2
(tried both). using rails 4.1.6
(and tried 4.1.5
).
the login page being rendered simple , small. form posts devise session controller log in. ran strace passenger start
see taking forever. thoughts on causing this?
slow request
started "/users/sign_in" 10.0.2.2 @ 2014-09-19 11:26:24 -0400 processing devise::sessionscontroller#new html "", 8192) = 0 sched_yield() = 0 close(9) = 0 socket(pf_inet, sock_stream|sock_cloexec, ipproto_tcp) = 9 fcntl(9, f_getfd) = 0x1 (flags fd_cloexec) fstat(9, {st_mode=s_ifsock|0777, st_size=0, ...}) = 0 fstat(9, {st_mode=s_ifsock|0777, st_size=0, ...}) = 0 connect(9, {sa_family=af_inet, sin_port=htons(3000), sin_addr=inet_addr("0.0.0.0")}, 16) = 0 fstat(9, {st_mode=s_ifsock|0777, st_size=0, ...}) = 0 fstat(9, {st_mode=s_ifsock|0777, st_size=0, ...}) = 0 fstat(9, {st_mode=s_ifsock|0777, st_size=0, ...}) = 0 read(9, rendered devise/sessions/new.html.erb within layouts/application (52237.4ms) rendered layouts/_navigation_links.html.erb (1.5ms) rendered layouts/_navigation.html.erb (2.6ms) rendered layouts/_messages.html.erb (0.2ms) completed 200 ok in 52250ms (views: 52246.2ms | activerecord: 0.0ms)
f5 on browser , responds quickly
started "/users/sign_in" 10.0.2.2 @ 2014-09-19 11:27:35 -0400 processing devise::sessionscontroller#new html rendered devise/sessions/new.html.erb within layouts/application (3.7ms) rendered layouts/_navigation_links.html.erb (0.7ms) rendered layouts/_navigation.html.erb (1.4ms) rendered layouts/_messages.html.erb (0.2ms) completed 200 ok in 852ms (views: 849.3ms | activerecord: 0.0ms)
f5 on browser , responds again
started "/users/sign_in" 10.0.2.2 @ 2014-09-19 11:27:40 -0400 processing devise::sessionscontroller#new html "", 8192) = 0 close(9) = 0 socket(pf_inet, sock_stream|sock_cloexec, ipproto_tcp) = 9 fcntl(9, f_getfd) = 0x1 (flags fd_cloexec) fstat(9, {st_mode=s_ifsock|0777, st_size=0, ...}) = 0 fstat(9, {st_mode=s_ifsock|0777, st_size=0, ...}) = 0 connect(9, {sa_family=af_inet, sin_port=htons(3000), sin_addr=inet_addr("0.0.0.0")}, 16) = 0 fstat(9, {st_mode=s_ifsock|0777, st_size=0, ...}) = 0 fstat(9, {st_mode=s_ifsock|0777, st_size=0, ...}) = 0 fstat(9, {st_mode=s_ifsock|0777, st_size=0, ...}) = 0 read(9, rendered devise/sessions/new.html.erb within layouts/application (52214.5ms) rendered layouts/_navigation_links.html.erb (2.0ms) rendered layouts/_navigation.html.erb (3.6ms) rendered layouts/_messages.html.erb (0.1ms) completed 200 ok in 53057ms (views: 53053.3ms | activerecord: 0.0ms)
f5 on browser , responds again
started "/users/sign_in" 10.0.2.2 @ 2014-09-19 11:29:30 -0400 processing devise::sessionscontroller#new html rendered devise/sessions/new.html.erb within layouts/application (3.1ms) rendered layouts/_navigation_links.html.erb (0.4ms) rendered layouts/_navigation.html.erb (1.1ms) rendered layouts/_messages.html.erb (0.1ms) completed 200 ok in 769ms (views: 767.2ms | activerecord: 0.0ms)
edit
so ran strace -f passenger start
see fork processes , looks of gems gone. however, application works. strange.
[pid 2300] open("/home/kobaltz/.rvm/gems/ruby-2.1.3/gems/rdoc-4.1.2/lib/arel/nodes/grouping.rb", o_rdonly|o_cloexec) = -1 enoent (no such file or directory) [pid 2300] open("/home/kobaltz/.rvm/gems/ruby-2.1.3/gems/rails_layout-1.0.22/lib/arel/nodes/grouping.rb", o_rdonly|o_cloexec) = -1 enoent (no such file or directory) [pid 2300] open("/home/kobaltz/.rvm/gems/ruby-2.1.3/gems/quiet_assets-1.0.3/lib/arel/nodes/grouping.rb", o_rdonly|o_cloexec) = -1 enoent (no such file or directory) [pid 2300] open("/home/kobaltz/.rvm/gems/ruby-2.1.3/gems/pundit-0.3.0/lib/arel/nodes/grouping.rb", o_rdonly|o_cloexec) = -1 enoent (no such file or directory) [pid 2300] open("/home/kobaltz/.rvm/gems/ruby-2.1.3/gems/public_activity-1.4.2/lib/arel/nodes/grouping.rb", o_rdonly|o_cloexec) = -1 enoent (no such file or directory) [pid 2300] open("/home/kobaltz/.rvm/gems/ruby-2.1.3/gems/prawn-templates-0.0.3/lib/arel/nodes/grouping.rb", o_rdonly|o_cloexec) = -1 enoent (no such file or directory) [pid 2300] open("/home/kobaltz/.rvm/gems/ruby-2.1.3/gems/prawn-1.2.1/lib/arel/nodes/grouping.rb", o_rdonly|o_cloexec) = -1 enoent (no such file or directory) [pid 2300] open("/home/kobaltz/.rvm/gems/ruby-2.1.3/gems/pdf-reader-1.3.3/lib/arel/nodes/grouping.rb", o_rdonly|o_cloexec) = -1 enoent (no such file or directory) [pid 2300] open("/home/kobaltz/.rvm/gems/ruby-2.1.3/gems/ttfunk-1.2.2/lib/arel/nodes/grouping.rb", o_rdonly|o_cloexec) = -1 enoent (no such file or directory) [pid 2300] open("/home/kobaltz/.rvm/gems/ruby-2.1.3/gems/ruby-rc4-0.1.5/lib/arel/nodes/grouping.rb", o_rdonly|o_cloexec) = -1 enoent (no such file or directory) [pid 2300] open("/home/kobaltz/.rvm/gems/ruby-2.1.3/gems/pdf-core-0.2.5/lib/arel/nodes/grouping.rb", o_rdonly|o_cloexec) = -1 enoent (no such file or directory) [pid 2300] open("/home/kobaltz/.rvm/gems/ruby-2.1.3/extensions/x86_64-linux/2.1.0/passenger-4.0.50/arel/nodes/grouping.rb", o_rdonly|o_cloexec) = -1 enoent (no such file or directory) [pid 2300] open("/home/kobaltz/.rvm/gems/ruby-2.1.3/gems/passenger-4.0.50/lib/arel/nodes/grouping.rb", o_rdonly|o_cloexec) = -1 enoent (no such file or directory) [pid 2300] open("/home/kobaltz/.rvm/gems/ruby-2.1.3/extensions/x86_64-linux/2.1.0/mysql2-0.3.16/arel/nodes/grouping.rb", o_rdonly|o_cloexec) = -1 enoent (no such file or directory) [pid 2300] open("/home/kobaltz/.rvm/gems/ruby-2.1.3/gems/mysql2-0.3.16/lib/arel/nodes/grouping.rb", o_rdonly|o_cloexec) = -1 enoent (no such file or directory) [pid 2300] open("/home/kobaltz/.rvm/gems/ruby-2.1.3/gems/mini_magick-3.8.1/lib/arel/nodes/grouping.rb", o_rdonly|o_cloexec) = -1 enoent (no such file or directory) [pid 2300] open("/home/kobaltz/.rvm/gems/ruby-2.1.3/gems/subexec-0.2.3/lib/arel/nodes/grouping.rb", o_rdonly|o_cloexec) = -1 enoent (no such file or directory)
turning off config.assets.debug
might speed rendering
config.assets.debug = false
Comments
Post a Comment