“strive 1/21 ~ 1/28”
Use
-
[gem] faker
-
[gem] rbkit
-
[gem] rbkit-client
-
[gem] oink
- Rails plugin and log parser to help narrow down the source(s) of increased memory usage in rails applications.
-
[gem] memorylogic
- It worked very well because it adds the process id and memory usage in with EVERY single line logged and at the end of each rails request
-
[gem] stackprof
-
[gem] memory_profiler
-
[gem] derailed_benchmarks
Read
-
[capistrano] Capistrano 3 Upgrade Guide
-
[rails] Rails Connection Leak
-
[web] 如何切割 Microservices
- 這部份程式的行為是相對獨立的
- 即將快速發展
- scope 大 + legacy
-
[rails memory] Memory constantly increasing in Rails app
- sessions related?
- count_objects to display all the objets currently used
- symbols are keep in memory until your restart ruby. Symbol.all_symbols.size
-
[rails memory] 不是内存泄漏,而是Bloat
- What Is Bloat? you are loading in too much. Too much what, you ask? Why it’s too much ActiveRecord!
- Detecting Bloat => grep resource /var/log/syslog, The problem is when you have bloat, you start seeing them skyrocket past the memory limits, sometimes multiple times an hour:
- Root Cause
- Model.find(:all)
- :includes are Including Too Much
- :includes on a has_many
- @model_instance.relationship
- Filtering Records with Ruby Instead of SQL
- Evil Callbacks in the Model
- Named scopes, default scopes, and has_many relationships that specify :include Where Inappropriate
- Use :select When You Must Instantiate Large Quantities of Records
- Overfed Feeds
- Monster Migrations
Book
Video
-
[邏輯思維] 184 怎么样成为一个高手
- 筆記 看到文章 影片 無論如何 都要至少寫下一句自己的心得
-
[RubyConf 2016] - From no OSS experience to the core team in 15 minutes a day by André Arko
- start from read all the issues
- try to answer questions
- help with issues
- reproduce bugs
- writing patches
- improving everything
-
[ruby china 2016] 如何在 Rails 应用里面寻找内存泄漏
- how to detect:
- passenger-memory-stats
- passenger-status
- top && htop
- cat /proc/pid/status & cat/proc/[pid]/mem
- Tgid(Thread Group ID) is real process id, get_pid
- Application:
- New Relic
- SKYLIGHT
- Scout APM
- ONE APM
- how to resolve
- doorkeeper
- passenger_killer: killed after finished N processes
- oom_killer: killed process when exceed N processes, passenger auto restart
- oob: auto gc after finished N processes
- tools
- derailed_benchmarks
- memory_profiler
- stackprof
- rbkit
- rbkit-client
- oink
- memorylogic
- doorkeeper
- how to detect:
-
[ruby china 2016] Rubyists 可以从 Elixir 学到什么
- based on Erlang
- ships with great tools inspired by Ruby
- Ruby-like syntex
- functional way
- microservice