0
我正在使用Ruby 2.3.3和Rails 5.0.1。在我的應用程序中,對於每個請求,內存都在增加,並且在請求完成時不會減少。檢測Ruby內存泄漏
安裝寶石:(Gemfile.lock的)
GEM
remote: https://rubygems.org/
specs:
actioncable (5.0.1)
actionpack (= 5.0.1)
nio4r (~> 1.2)
websocket-driver (~> 0.6.1)
actionmailer (5.0.1)
actionpack (= 5.0.1)
actionview (= 5.0.1)
activejob (= 5.0.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.0.1)
actionview (= 5.0.1)
activesupport (= 5.0.1)
rack (~> 2.0)
rack-test (~> 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.0.1)
activesupport (= 5.0.1)
builder (~> 3.1)
erubis (~> 2.7.0)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
activejob (5.0.1)
activesupport (= 5.0.1)
globalid (>= 0.3.6)
activemodel (5.0.1)
activesupport (= 5.0.1)
activerecord (5.0.1)
activemodel (= 5.0.1)
activesupport (= 5.0.1)
arel (~> 7.0)
activesupport (5.0.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (~> 0.7)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.5.0)
public_suffix (~> 2.0, >= 2.0.2)
airbrussh (1.1.1)
sshkit (>= 1.6.1, != 1.7.0)
arel (7.1.4)
builder (3.2.2)
byebug (9.0.6)
capistrano (3.7.1)
airbrussh (>= 1.0.0)
capistrano-harrow
i18n
rake (>= 10.0.0)
sshkit (>= 1.9.0)
capistrano-bundler (1.2.0)
capistrano (~> 3.1)
sshkit (~> 1.2)
capistrano-harrow (0.5.3)
capistrano-rails (1.2.0)
capistrano (~> 3.1)
capistrano-bundler (~> 1.1)
capistrano-rvm (0.1.2)
capistrano (~> 3.0)
sshkit (~> 1.2)
capistrano-ssh-doctor (1.0.0)
capistrano (>= 3.1)
capybara (2.11.0)
addressable
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
codeclimate-test-reporter (1.0.6)
simplecov
coderay (1.1.1)
concurrent-ruby (1.0.3)
database_cleaner (1.5.3)
diff-lcs (1.2.5)
docile (1.1.5)
dotenv (2.1.1)
erubis (2.7.0)
execjs (2.7.0)
factory_girl (4.8.0)
activesupport (>= 3.0.0)
factory_girl_rails (4.8.0)
factory_girl (~> 4.8.0)
railties (>= 3.0.0)
faker (1.6.6)
i18n (~> 0.5)
fast_stack (0.2.0)
globalid (0.3.7)
activesupport (>= 4.1.0)
honeybadger (2.7.2)
htmlbeautifier (1.2.1)
httparty (0.14.0)
multi_xml (>= 0.5.2)
i18n (0.7.0)
jasmine (2.5.1)
jasmine-core (>= 2.5.1, < 3.0.0)
phantomjs
rack (>= 1.2.1)
rake
jasmine-core (2.5.2)
jasmine-jquery-rails (2.0.3)
json (2.0.2)
launchy (2.4.3)
addressable (~> 2.3)
libv8 (3.16.14.17)
libv8 (3.16.14.17-x86_64-darwin-16)
loofah (2.0.3)
nokogiri (>= 1.5.9)
mail (2.6.4)
mime-types (>= 1.16, < 4)
mail_gate (1.1.2)
mail
memory_profiler (0.9.8)
method_source (0.8.2)
mime-types (3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mini_portile2 (2.1.0)
minitest (5.10.1)
multi_xml (0.6.0)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-ssh (3.2.0)
newrelic_rpm (3.17.2.327)
nio4r (1.2.1)
nokogiri (1.6.8.1)
mini_portile2 (~> 2.1.0)
pg (0.19.0)
phantomjs (2.1.1.0)
pry (0.10.4)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
pry-byebug (3.4.2)
byebug (~> 9.0)
pry (~> 0.10)
public_suffix (2.0.4)
puma (3.6.2)
rack (2.0.1)
rack-mini-profiler (0.10.5)
rack (>= 1.2.0)
rack-test (0.6.3)
rack (>= 1.0)
rails (5.0.1)
actioncable (= 5.0.1)
actionmailer (= 5.0.1)
actionpack (= 5.0.1)
actionview (= 5.0.1)
activejob (= 5.0.1)
activemodel (= 5.0.1)
activerecord (= 5.0.1)
activesupport (= 5.0.1)
bundler (>= 1.3.0, < 2.0)
railties (= 5.0.1)
sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.1)
actionpack (~> 5.x)
actionview (~> 5.x)
activesupport (~> 5.x)
rails-dom-testing (2.0.1)
activesupport (>= 4.2.0, < 6.0)
nokogiri (~> 1.6.0)
rails-html-sanitizer (1.0.3)
loofah (~> 2.0)
railties (5.0.1)
actionpack (= 5.0.1)
activesupport (= 5.0.1)
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (12.0.0)
ref (2.0.0)
rspec-core (3.5.4)
rspec-support (~> 3.5.0)
rspec-expectations (3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0)
rspec-mocks (3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0)
rspec-rails (3.5.2)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 3.5.0)
rspec-expectations (~> 3.5.0)
rspec-mocks (~> 3.5.0)
rspec-support (~> 3.5.0)
rspec-support (3.5.0)
sass (3.4.23)
sass-rails (5.0.6)
railties (>= 4.0.0, < 6)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
shoulda-matchers (3.1.1)
activesupport (>= 4.0.0)
simple_form (3.3.1)
actionpack (> 4, < 5.1)
activemodel (> 4, < 5.1)
simplecov (0.12.0)
docile (~> 1.1.0)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.0)
simplecov-rcov (0.2.3)
simplecov (>= 0.4.1)
slop (3.6.0)
spring (2.0.1)
activesupport (>= 4.2)
sprockets (3.7.1)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.0)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sshkit (1.11.5)
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
stackprof (0.2.10)
supercache (0.7)
therubyracer (0.12.2)
libv8 (~> 3.16.14.0)
ref
thor (0.19.4)
thread_safe (0.3.5)
tilt (2.0.5)
tzinfo (1.2.2)
thread_safe (~> 0.1)
uglifier (3.0.4)
execjs (>= 0.3.0, < 3)
websocket-driver (0.6.4)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2)
will_paginate (3.1.5)
will_paginate-bootstrap (1.0.1)
will_paginate (>= 3.0.3)
xpath (2.0.0)
nokogiri (~> 1.3)
PLATFORMS
ruby
x86_64-darwin-16
DEPENDENCIES
airbrussh
byebug
capistrano
capistrano-bundler
capistrano-rails
capistrano-rvm
capistrano-ssh-doctor
capybara
codeclimate-test-reporter (~> 1.0.0)
database_cleaner
dotenv
factory_girl_rails
faker
fast_stack
honeybadger
htmlbeautifier
httparty
jasmine
jasmine-jquery-rails
launchy
mail_gate
memory_profiler
newrelic_rpm
pg
pry-byebug
puma
rack-mini-profiler
rails (= 5.0.1)
rails-controller-testing
rspec-rails
sass-rails (~> 5.0.0.beta1)
shoulda-matchers
simple_form
simplecov
simplecov-rcov
spring
stackprof
supercache
therubyracer
uglifier
will_paginate
will_paginate-bootstrap
RUBY VERSION
ruby 2.3.3p222
BUNDLED WITH
1.15.1
我用MemoryProfiler
檢測內存泄漏。我粘貼了MemoryProfiler.start
和MemoryProfiler.stop
的結果。 哪一個造成泄漏對我而言並不清楚。哪個寶石或代碼導致內存泄漏問題?
Total allocated: 242425441 bytes (2105822 objects)
Total retained: 2970695 bytes (16840 objects)
allocated memory by gem
-----------------------------------
68444044 activerecord-5.0.1
48631659 activesupport-5.0.1
33867169 ruby-2.3.3/lib
26983147 actionview-5.0.1
20242402 i18n-0.7.0
15872628 20170712102216/app
10357404 simple_form-3.3.1
3187323 puma-3.6.2
3010603 newrelic_rpm-3.17.2.327
2581225 activemodel-5.0.1
2174325 rack-mini-profiler-0.10.5
2077399 rack-2.0.1
1785709 erubis-2.7.0
1634373 arel-7.1.4
1154020 actionpack-5.0.1
209364 other
122145 concurrent-ruby-1.0.3
57606 did_you_mean-1.0.0
16299 railties-5.0.1
12261 sprockets-rails-3.2.0
2808 honeybadger-2.7.2
1160 sprockets-3.7.1
368 tzinfo-1.2.2
retained memory by gem
-----------------------------------
1102502 puma-3.6.2
728109 simple_form-3.3.1
522334 i18n-0.7.0
226441 actionview-5.0.1
93458 activerecord-5.0.1
74910 rack-2.0.1
70051 activesupport-5.0.1
60945 concurrent-ruby-1.0.3
31530 actionpack-5.0.1
22331 activemodel-5.0.1
12389 newrelic_rpm-3.17.2.327
11770 rack-mini-profiler-0.10.5
9717 ruby-2.3.3/lib
1879 20170712102216/app
1593 arel-7.1.4
504 railties-5.0.1
232 honeybadger-2.7.2
allocated memory by location
-----------------------------------
16675773 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.1/lib/active_support/core_ext/string/output_safety.rb:176
11287702 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/actionview-5.0.1/lib/action_view/helpers/tags/base.rb:51
6412328 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/result.rb:123
6169344 /usr/local/rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/set.rb:83
6122176 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/i18n-0.7.0/lib/i18n/backend/base.rb:118
5305392 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/associations/join_dependency/join_part.rb:51
5249720 /usr/local/rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/timeout.rb:81
4253488 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.1/lib/active_support/core_ext/hash/except.rb:11
4161024 /usr/local/rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/set.rb:360
3698688 /usr/local/rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/set.rb:96
3520608 /usr/local/rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/set.rb:88
3152622 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/simple_form-3.3.1/lib/simple_form/inputs/base.rb:180
2880280 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.1/lib/active_support/hash_with_indifferent_access.rb:283
2867056 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/i18n-0.7.0/lib/i18n.rb:145
2866128 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/i18n-0.7.0/lib/i18n/exceptions.rb:46
2818960 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/i18n-0.7.0/lib/i18n.rb:268
2676232 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/attribute_set/builder.rb:33
2662442 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.1/lib/active_support/core_ext/string/output_safety.rb:258
2649672 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/persistence.rb:69
2593155 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/actionview-5.0.1/lib/action_view/helpers/tag_helper.rb:192
2389918 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/log_subscriber.rb:51
1926400 /usr/local/rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/set.rb:420
1890554 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/puma-3.6.2/lib/puma/server.rb:907
1803634 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/simple_form-3.3.1/lib/simple_form/inputs/base.rb:181
1732528 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.1/lib/active_support/core_ext/string/output_safety.rb:198
1599053 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/i18n-0.7.0/lib/i18n.rb:330
1569960 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/relation/predicate_builder.rb:72
1508831 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.1/lib/active_support/multibyte/unicode.rb:248
1493725 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/actionview-5.0.1/lib/action_view/helpers/tags/base.rb:109
1462544 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/core.rb:135
1431338 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/actionview-5.0.1/lib/action_view/helpers/tag_helper.rb:152
1426240 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/attribute.rb:5
1402178 /usr/local/rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/logger.rb:654
1373677 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/actionview-5.0.1/lib/action_view/template.rb:310
1360800 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.1/lib/active_support/core_ext/object/json.rb:161
1353705 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.1/lib/active_support/inflector/methods.rb:385
1288272 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/relation.rb:24
1280920 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/relation.rb:36
1259712 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/associations/association_scope.rb:67
1244682 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/rack-2.0.1/lib/rack/query_parser.rb:81
1200960 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/associations/join_dependency.rb:140
1156385 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.1/lib/active_support/tagged_logging.rb:21
1135632 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/actionview-5.0.1/lib/action_view/helpers/form_helper.rb:1867
1086637 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/rack-mini-profiler-0.10.5/lib/patches/db/pg.rb:7
1076640 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/i18n-0.7.0/lib/i18n/backend/base.rb:32
1067904 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/attribute_methods.rb:347
1055840 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.1/lib/active_support/json/encoding.rb:89
1050872 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/puma-3.6.2/lib/puma/thread_pool.rb:70
1038184 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.1/lib/active_support/core_ext/hash/keys.rb:14
1035416 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/relation/predicate_builder.rb:97
retained memory by location
-----------------------------------
1050872 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/puma-3.6.2/lib/puma/thread_pool.rb:70
516280 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/i18n-0.7.0/lib/i18n.rb:330
435844 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/simple_form-3.3.1/lib/simple_form/inputs/base.rb:180
253231 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/simple_form-3.3.1/lib/simple_form/inputs/base.rb:181
112705 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/actionview-5.0.1/lib/action_view/template.rb:310
31056 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/concurrent-ruby-1.0.3/lib/concurrent/collection/map/non_concurrent_map_backend.rb:16
28271 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/simple_form-3.3.1/lib/simple_form/inputs/base.rb:183
23673 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/puma-3.6.2/lib/puma/client.rb:258
22080 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/concurrent-ruby-1.0.3/lib/concurrent/collection/map/mri_map_backend.rb:14
19832 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/activemodel-5.0.1/lib/active_model/attribute_methods.rb:383
18732 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/puma-3.6.2/lib/puma/client.rb:285
17776 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/actionview-5.0.1/lib/action_view/template/resolver.rb:165
17640 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/rack-2.0.1/lib/rack/query_parser.rb:64
16944 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.1/lib/active_support/hash_with_indifferent_access.rb:217
14480 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.1/lib/active_support/core_ext/hash/indifferent_access.rb:9
14160 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/actionpack-5.0.1/lib/action_dispatch/http/parameter_filter.rb:55
13784 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/rack-2.0.1/lib/rack/query_parser.rb:157
11800 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/actionview-5.0.1/lib/action_view/template.rb:121
11360 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/rack-mini-profiler-0.10.5/lib/patches/db/pg.rb:7
11328 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/actionview-5.0.1/lib/action_view/template/resolver.rb:215
11073 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293
10975 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/actionview-5.0.1/lib/action_view/template.rb:340
9440 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/actionview-5.0.1/lib/action_view/template.rb:141
9132 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/simple_form-3.3.1/lib/simple_form/inputs/base.rb:184
8914 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/actionview-5.0.1/lib/action_view/template.rb:347
8406 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/rack-2.0.1/lib/rack/query_parser.rb:167
8110 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/actionview-5.0.1/lib/action_view/helpers/form_helper.rb:1889
7776 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/puma-3.6.2/lib/puma/client.rb:35
6968 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/connection_adapters/postgresql/schema_statements.rb:238
6857 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/concurrent-ruby-1.0.3/lib/concurrent/collection/map/non_concurrent_map_backend.rb:24
5887 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/i18n-0.7.0/lib/i18n.rb:332
5828 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/actionview-5.0.1/lib/action_view/template/resolver.rb:348
5774 /usr/local/rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/uri/common.rb:384
5680 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/attribute.rb:5
5664 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/actionview-5.0.1/lib/action_view/template/resolver.rb:269
5360 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/attribute.rb:80
5360 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/connection_adapters/postgresql/schema_statements.rb:676
5360 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/connection_adapters/postgresql/schema_statements.rb:683
5106 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/attribute_methods/read.rb:33
4720 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.1/lib/active_support/core_ext/hash/except.rb:11
4496 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/model_schema.rb:350
4496 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/model_schema.rb:380
4376 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/connection_adapters/schema_cache.rb:62
3622 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/attribute_methods.rb:30
3511 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/rack-2.0.1/lib/rack/multipart.rb:36
3280 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/result.rb:123
3024 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.1/lib/active_support/callbacks.rb:382
2808 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.1/lib/active_support/callbacks.rb:163
2551 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/actionpack-5.0.1/lib/action_dispatch/journey/path/pattern.rb:71
2360 <APPLICATION_HOME_PATH>/shared/bundle/ruby/2.3.0/gems/actionview-5.0.1/lib/action_view/template.rb:139
不是一個答案,但結帳https://blog.codeship.com/debugging-a-memory-leak-on-heroku/更多的泄漏檢測建議。 – chrismanderson