Skip to content

Instantly share code, notes, and snippets.

@jack-nie jack-nie/leak.rb forked from badboy/leak.rb
Created Aug 3, 2016

Embed
What would you like to do?
#!/usr/bin/env ruby
# encoding: utf-8
require 'memory_profiler'
gem 'redis', ENV['RVERSION']
require 'redis'
puts Process.pid
puts Redis::VERSION
MemoryProfiler.report {
r = Redis.new
i=0
100.times do
r.set "key#{i}", "value#{i}"
end
}.pretty_print
2906
3.2.2
Total allocated: 447227 bytes (3721 objects)
Total retained: 0 bytes (0 objects)
allocated memory by gem
-----------------------------------
301650 other
144252 redis-3.2.2
1325 2.3.0/lib
allocated memory by file
-----------------------------------
285554 <internal:prelude>
64000 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/command_helper.rb
55332 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/ruby.rb
16240 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis.rb
16096 leak.rb
8680 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/client.rb
1165 /home/jer/.rbenv/versions/2.3.0/lib/ruby/2.3.0/socket.rb
160 /home/jer/.rbenv/versions/2.3.0/lib/ruby/2.3.0/monitor.rb
allocated memory by location
-----------------------------------
285554 <internal:prelude>:76
24000 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/command_helper.rb:19
20000 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/command_helper.rb:8
17400 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/ruby.rb:52
16900 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/ruby.rb:269
16000 leak.rb:16
8000 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis.rb:714
8000 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/command_helper.rb:24
8000 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/ruby.rb:274
8000 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/ruby.rb:44
4000 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis.rb:695
4000 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis.rb:696
4000 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/client.rb:113
4000 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/command_helper.rb:18
4000 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/command_helper.rb:27
4000 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/command_helper.rb:28
4000 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/ruby.rb:297
1165 /home/jer/.rbenv/versions/2.3.0/lib/ruby/2.3.0/socket.rb:1207
936 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/client.rb:318
936 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/client.rb:373
936 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/client.rb:475
888 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/client.rb:372
560 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/client.rb:382
344 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/ruby.rb:118
328 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/ruby.rb:152
200 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/ruby.rb:124
160 /home/jer/.rbenv/versions/2.3.0/lib/ruby/2.3.0/monitor.rb:244
152 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/client.rb:375
152 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/client.rb:408
120 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis.rb:51
96 leak.rb:13
40 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis.rb:49
40 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis.rb:50
40 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis.rb:53
40 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/client.rb:78
40 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/client.rb:85
40 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/client.rb:9
40 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/ruby.rb:119
40 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/ruby.rb:16
40 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/ruby.rb:208
40 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/ruby.rb:214
allocated memory by class
-----------------------------------
309731 String
68336 Thread::Backtrace
54272 Array
7816 Hash
6272 IO::EAGAINWaitReadable
264 Redis::Connection::TCPSocket
160 Thread::Mutex
120 Redis::Client
96 Redis
80 IO::EINPROGRESSWaitWritable
40 Redis::Client::Connector
40 Redis::Connection::Ruby
allocated objects by gem
-----------------------------------
2778 redis-3.2.2
936 other
7 2.3.0/lib
allocated objects by file
-----------------------------------
1200 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/command_helper.rb
1051 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/ruby.rb
535 <internal:prelude>
404 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis.rb
401 leak.rb
123 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/client.rb
6 /home/jer/.rbenv/versions/2.3.0/lib/ruby/2.3.0/socket.rb
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/2.3.0/monitor.rb
allocated objects by location
-----------------------------------
600 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/command_helper.rb:19
535 <internal:prelude>:76
435 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/ruby.rb:52
400 leak.rb:16
200 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis.rb:714
200 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/command_helper.rb:24
200 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/ruby.rb:274
200 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/ruby.rb:44
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis.rb:695
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis.rb:696
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/client.rb:113
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/command_helper.rb:18
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/command_helper.rb:27
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/command_helper.rb:28
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/command_helper.rb:8
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/ruby.rb:269
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/ruby.rb:297
14 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/client.rb:382
6 /home/jer/.rbenv/versions/2.3.0/lib/ruby/2.3.0/socket.rb:1207
5 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/ruby.rb:124
4 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/ruby.rb:152
3 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/ruby.rb:118
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/2.3.0/monitor.rb:244
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis.rb:49
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis.rb:50
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis.rb:51
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis.rb:53
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/client.rb:318
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/client.rb:372
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/client.rb:373
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/client.rb:375
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/client.rb:408
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/client.rb:475
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/client.rb:78
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/client.rb:85
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/client.rb:9
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/ruby.rb:119
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/ruby.rb:16
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/ruby.rb:208
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/ruby.rb:214
1 leak.rb:13
allocated objects by class
-----------------------------------
2485 String
947 Array
107 Hash
88 Thread::Backtrace
87 IO::EAGAINWaitReadable
1 IO::EINPROGRESSWaitWritable
1 Redis
1 Redis::Client
1 Redis::Client::Connector
1 Redis::Connection::Ruby
1 Redis::Connection::TCPSocket
1 Thread::Mutex
retained memory by gem
-----------------------------------
NO DATA
retained memory by file
-----------------------------------
NO DATA
retained memory by location
-----------------------------------
NO DATA
retained memory by class
-----------------------------------
NO DATA
retained objects by gem
-----------------------------------
NO DATA
retained objects by file
-----------------------------------
NO DATA
retained objects by location
-----------------------------------
NO DATA
retained objects by class
-----------------------------------
NO DATA
Allocated String Report
-----------------------------------
388 ""
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/command_helper.rb:27
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/ruby.rb:274
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/ruby.rb:44
87 <internal:prelude>:76
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/ruby.rb:16
200 "*3\r\n$3\r\nset\r\n$4\r\nkey0\r\n$6\r\nvalue0\r\n"
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/command_helper.rb:28
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/ruby.rb:269
200 "0"
200 leak.rb:16
200 "3"
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/command_helper.rb:19
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/command_helper.rb:24
100 "$3"
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/command_helper.rb:19
100 "$4"
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/command_helper.rb:19
100 "$6"
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/command_helper.rb:19
100 "*3"
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/command_helper.rb:24
100 "+"
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/ruby.rb:274
100 "+OK\r\n"
100 <internal:prelude>:76
100 "4"
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/command_helper.rb:19
100 "6"
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/command_helper.rb:19
100 "OK"
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/ruby.rb:297
100 "OK\r\n"
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/ruby.rb:44
100 "key0"
100 leak.rb:16
100 "set"
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/command_helper.rb:18
100 "value0"
100 leak.rb:16
87 "Resource temporarily unavailable - read would block"
87 <internal:prelude>:76
87 "read would block"
87 <internal:prelude>:76
3 "\x02\x00\x18\xEB\x7F\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00"
2 /home/jer/.rbenv/versions/2.3.0/lib/ruby/2.3.0/socket.rb:1207
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/ruby.rb:119
1 "127.0.0.1"
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/ruby.rb:152
1 "AF_INET"
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/ruby.rb:152
1 "Operation now in progress - connect(2) would block"
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/2.3.0/socket.rb:1207
1 "REDIS_URL"
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/client.rb:9
1 "connect(2) would block"
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/2.3.0/socket.rb:1207
1 "connect_timeout"
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/client.rb:382
1 "db"
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/client.rb:382
1 "driver"
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/client.rb:382
1 "host"
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/client.rb:382
1 "id"
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/client.rb:382
1 "inherit_socket"
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/client.rb:382
1 "password"
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/client.rb:382
1 "path"
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/client.rb:382
1 "port"
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/client.rb:382
1 "reconnect_attempts"
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/client.rb:382
1 "scheme"
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/client.rb:382
1 "tcp_keepalive"
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/client.rb:382
1 "timeout"
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/client.rb:382
1 "unix"
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/connection/ruby.rb:208
1 "url"
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.2.2/lib/redis/client.rb:382
Retained String Report
-----------------------------------
2476
3.3.0
Total allocated: 105321191 bytes (4065 objects)
Total retained: 0 bytes (0 objects)
allocated memory by gem
-----------------------------------
105060525 2.3.0/lib
136004 redis-3.3.0
124662 other
allocated memory by file
-----------------------------------
105059200 /home/jer/.rbenv/versions/2.3.0/lib/ruby/2.3.0/timeout.rb
108566 <internal:prelude>
64000 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/command_helper.rb
46220 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb
16664 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis.rb
16096 leak.rb
9120 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/client.rb
1165 /home/jer/.rbenv/versions/2.3.0/lib/ruby/2.3.0/socket.rb
160 /home/jer/.rbenv/versions/2.3.0/lib/ruby/2.3.0/monitor.rb
allocated memory by location
-----------------------------------
104994400 /home/jer/.rbenv/versions/2.3.0/lib/ruby/2.3.0/timeout.rb:81
108566 <internal:prelude>:76
44800 /home/jer/.rbenv/versions/2.3.0/lib/ruby/2.3.0/timeout.rb:78
24000 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/command_helper.rb:19
20000 /home/jer/.rbenv/versions/2.3.0/lib/ruby/2.3.0/timeout.rb:84
20000 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/command_helper.rb:8
16900 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb:85
16000 leak.rb:16
8000 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis.rb:754
8000 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/command_helper.rb:24
8000 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb:323
8000 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb:328
8000 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb:63
4000 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis.rb:735
4000 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis.rb:736
4000 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/client.rb:120
4000 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/command_helper.rb:18
4000 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/command_helper.rb:27
4000 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/command_helper.rb:28
4000 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb:351
1165 /home/jer/.rbenv/versions/2.3.0/lib/ruby/2.3.0/socket.rb:1207
1160 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/client.rb:331
1160 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/client.rb:493
1032 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/client.rb:386
840 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/client.rb:385
520 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/client.rb:395
424 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis.rb:52
352 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb:143
328 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb:177
200 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb:149
200 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb:72
160 /home/jer/.rbenv/versions/2.3.0/lib/ruby/2.3.0/monitor.rb:244
144 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/client.rb:388
144 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/client.rb:423
120 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis.rb:51
96 leak.rb:13
40 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis.rb:49
40 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis.rb:50
40 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis.rb:54
40 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/client.rb:85
40 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/client.rb:9
40 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/client.rb:92
40 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb:144
40 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb:254
40 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb:257
40 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb:263
40 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb:27
40 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb:71
allocated memory by class
-----------------------------------
104965600 Thread
205671 String
69096 Array
41712 RubyVM::Env
24080 Proc
12544 Hash
1600 Thread::Backtrace
272 Redis::Connection::TCPSocket
160 Thread::Mutex
120 Redis::Client
96 Redis
80 IO::EAGAINWaitReadable
80 IO::EINPROGRESSWaitWritable
40 Redis::Client::Connector
40 Redis::Connection::Ruby
allocated objects by gem
-----------------------------------
2552 redis-3.3.0
1007 2.3.0/lib
506 other
allocated objects by file
-----------------------------------
1200 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/command_helper.rb
1000 /home/jer/.rbenv/versions/2.3.0/lib/ruby/2.3.0/timeout.rb
823 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb
407 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis.rb
401 leak.rb
122 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/client.rb
105 <internal:prelude>
6 /home/jer/.rbenv/versions/2.3.0/lib/ruby/2.3.0/socket.rb
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/2.3.0/monitor.rb
allocated objects by location
-----------------------------------
600 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/command_helper.rb:19
500 /home/jer/.rbenv/versions/2.3.0/lib/ruby/2.3.0/timeout.rb:81
400 /home/jer/.rbenv/versions/2.3.0/lib/ruby/2.3.0/timeout.rb:78
400 leak.rb:16
200 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis.rb:754
200 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/command_helper.rb:24
200 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb:323
200 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb:328
200 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb:63
105 <internal:prelude>:76
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/2.3.0/timeout.rb:84
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis.rb:735
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis.rb:736
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/client.rb:120
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/command_helper.rb:18
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/command_helper.rb:27
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/command_helper.rb:28
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/command_helper.rb:8
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb:351
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb:85
13 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/client.rb:395
6 /home/jer/.rbenv/versions/2.3.0/lib/ruby/2.3.0/socket.rb:1207
5 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb:149
5 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb:72
4 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb:177
3 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis.rb:52
3 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb:143
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/2.3.0/monitor.rb:244
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis.rb:49
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis.rb:50
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis.rb:51
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis.rb:54
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/client.rb:331
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/client.rb:385
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/client.rb:386
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/client.rb:388
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/client.rb:423
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/client.rb:493
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/client.rb:85
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/client.rb:9
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/client.rb:92
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb:144
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb:254
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb:257
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb:263
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb:27
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb:71
1 leak.rb:13
allocated objects by class
-----------------------------------
2227 String
918 Array
301 Proc
301 RubyVM::Env
208 Hash
100 Thread
2 Thread::Backtrace
1 IO::EAGAINWaitReadable
1 IO::EINPROGRESSWaitWritable
1 Redis
1 Redis::Client
1 Redis::Client::Connector
1 Redis::Connection::Ruby
1 Redis::Connection::TCPSocket
1 Thread::Mutex
retained memory by gem
-----------------------------------
NO DATA
retained memory by file
-----------------------------------
NO DATA
retained memory by location
-----------------------------------
NO DATA
retained memory by class
-----------------------------------
NO DATA
retained objects by gem
-----------------------------------
NO DATA
retained objects by file
-----------------------------------
NO DATA
retained objects by location
-----------------------------------
NO DATA
retained objects by class
-----------------------------------
NO DATA
Allocated String Report
-----------------------------------
302 ""
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/command_helper.rb:27
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb:328
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb:63
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb:27
1 <internal:prelude>:76
200 "*3\r\n$3\r\nset\r\n$4\r\nkey0\r\n$6\r\nvalue0\r\n"
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/command_helper.rb:28
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb:85
200 "0"
200 leak.rb:16
200 "3"
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/command_helper.rb:19
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/command_helper.rb:24
100 "$3"
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/command_helper.rb:19
100 "$4"
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/command_helper.rb:19
100 "$6"
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/command_helper.rb:19
100 "*3"
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/command_helper.rb:24
100 "+"
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb:328
100 "+OK\r\n"
100 <internal:prelude>:76
100 "4"
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/command_helper.rb:19
100 "6"
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/command_helper.rb:19
100 "OK"
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb:351
100 "OK\r\n"
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb:63
100 "key0"
100 leak.rb:16
100 "set"
100 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/command_helper.rb:18
100 "value0"
100 leak.rb:16
3 "\x02\x00\x18\xEB\x7F\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00"
2 /home/jer/.rbenv/versions/2.3.0/lib/ruby/2.3.0/socket.rb:1207
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb:144
1 "127.0.0.1"
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb:177
1 "AF_INET"
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb:177
1 "Operation now in progress - connect(2) would block"
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/2.3.0/socket.rb:1207
1 "REDIS_URL"
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/client.rb:9
1 "Resource temporarily unavailable - read would block"
1 <internal:prelude>:76
1 "connect(2) would block"
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/2.3.0/socket.rb:1207
1 "db"
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/client.rb:395
1 "driver"
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/client.rb:395
1 "host"
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/client.rb:395
1 "id"
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/client.rb:395
1 "inherit_socket"
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/client.rb:395
1 "password"
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/client.rb:395
1 "path"
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/client.rb:395
1 "port"
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/client.rb:395
1 "read would block"
1 <internal:prelude>:76
1 "reconnect_attempts"
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/client.rb:395
1 "rediss"
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb:257
1 "scheme"
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/client.rb:395
1 "tcp_keepalive"
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/client.rb:395
1 "timeout"
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/client.rb:395
1 "unix"
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/connection/ruby.rb:254
1 "url"
1 /home/jer/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/redis-3.3.0/lib/redis/client.rb:395
Retained String Report
-----------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.