なるほど https://github.com/guilleiguaran/fakeredis/blob/master/README.md
Ruby でやってみる『機械学習 はじめよう第3回 ベイジアンフィルタを実装してみよう』メモ - 牌語備忘録 -pygo http://cortyuming.hateblo.jp/entry/20140627/p2
$ heroku pg:info DATABASE
=== DATABASE_URL, PG_HOBBY_BASIC_URL
Plan: Hobby-basic
Status: Available
Connections: 8/20
PG Version: 9.6.1
Created: 2017-04-20 18:31 UTC
Data Size: 43.3 MB
Tables: 26
Rows: 46869/10000000 (In compliance)
Max response time seems to be better than nominal. Why?
$ git clone https://github.com/rbenv/rbenv.git ~/.rbenv
$ cd ~/.rbenv && src/configure && make -C src
$ git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
$ tail -2 .bashrc
export PATH=$HOME/.rbenv/bin:$PATH
eval "$(rbenv init -)"
$ rbenv install 2.4.1
そこから
Rubyのコンパイルで電池がやばい (久しぶりの環境で本筋にたどりつく前に時間切れになるパターン)
BUILD FAILED (Ubuntu 17.04 using ruby-build 20170405-4-g365dd1f)
ERROR: Ruby install aborted due to missing extensions
Try running `apt-get install -y libreadline-dev` to fetch missing dependencies.
あー
Redisのコネクションプールの使い方を知らないといけないことに気づいたところでそろそろ時間切れ (Rubyはまだコンパイル中w)
Using Sidekiq's Redis Connections in Other Places
http://blog.dylangriff.in/2013/09/28/using-sidekiqs-redis-connections-in-other-places/
Map Redis types directly to Ruby objects
This instance has about 1GB of media files on S3 after running for about 2 weeks.
$ heroku pg:info DATABASE
=== DATABASE_URL, PG_HOBBY_BASIC_URL
Plan: Hobby-basic
Status: Available
Connections: 8/20
PG Version: 9.6.1
Created: 2017-04-20 18:31 UTC
Data Size: 44.1 MB
Tables: 26
Rows: 48877/10000000 (In compliance)
スレッドとかホストとかの間のやり取りにRedisじゃなくてGoのチャンネル使ったらどうかと思ったけど、チャンネルはネットワーク超えられないよなw
$ heroku pg:info DATABASE
=== DATABASE_URL, PG_HOBBY_BASIC_URL
Plan: Hobby-basic
Status: Available
Connections: 7/20
PG Version: 9.6.1
Created: 2017-04-20 18:31 UTC
Data Size: 44.8 MB
Tables: 26
Rows: 49227/10000000 (In compliance)
require 'fakeredis'しなくてもRedis使えるのなんで?と思ったらローカルでRedisが動いていたという
$ heroku pg:info DATABASE
=== DATABASE_URL, PG_HOBBY_BASIC_URL
Plan: Hobby-basic
Status: Available
Connections: 10/20
PG Version: 9.6.1
Created: 2017-04-20 18:31 UTC
Data Size: 45.5 MB
Tables: 26
Rows: 50520/10000000 (In compliance)
$ heroku pg:info DATABASE
=== DATABASE_URL, PG_HOBBY_BASIC_URL
Plan: Hobby-basic
Status: Available
Connections: 8/20
PG Version: 9.6.1
Created: 2017-04-20 18:31 UTC
Data Size: 45.9 MB
Tables: 26
Rows: 50541/10000000 (In compliance)
Just a decent memory use this morning for this instance. https://mastodon.zunda.ninja/media/meDMEcpzqf50wfwoT_s
cld3-3.1.0 does not seem to be built on Heroku:
$ heroku apps:fork --from zundan-mastodon-staging --to zundan-mastodon-master
$ heroku pipelines:add zundan-mastodon -a zundan-mastodon-master --stage development
Enable Automatic Deploys from master
$ git fetch upstream
$ git checkout master
$ git rebase upstream/master
$ git push origin
$ ruby -r ./siteconf20170509-1178-131c6bz.rb extconf.rb
sh: 1: protoc: not found
"you need to install protoc as well to have Ruby code generation functionality" https://github.com/google/protobuf/tree/master/ruby
well...
Mastodon master with cld3 works on Heroku with heroku-buildpack-apt but I feel this a little bit cranky: https://github.com/zunda/mastodon/compare/master...use-cld3-on-heroku
I've just paid the cost for this instance on Heroku for April, whic is $8.32.
$ heroku pg:info DATAB
ASE
=== DATABASE_URL, PG_HOBBY_BASIC_URL
Plan: Hobby-basic
Status: Available
Connections: 8/20
PG Version: 9.6.1
Created: 2017-04-20 18:31 UTC
Data Size: 46.4 MB
Tables: 26
Rows: 52405/10000000 (In compliance)
A spike in traffic seems to have resulted in a spike in response time. I also see H27s.
https://mastodon.zunda.ninja/media/1l5mIgI92JUvSnCqq7E
The spike in traffic was mostly HEAD request to /users/zundan/updates/533 as well as GET to /users/zundan/updates/533.atom from different IP addresses. I suppose the conversation was picked up somewhere and, well, maybe clients rendered the conversation on the fly on their browser?
The first peak in memory use was when I posted a photograph. Mastodon ran some commands on the dyno to process the image which, I suppose, was then posted to S3.
The second spike in memory use was when ImageMagick was ran against an avatar who appeared in Federated timeline. Interesting.
@h12o@blessedgeeks.org 少なくともフォロー関係はそのまま別ドメインに持って行くとわけのわからないことになりそうですよねw
$ heroku remote -v
▸ remote is not a heroku command.
すみませんgitでしたw
$ heroku repo:purge_cache
$ git checkout -b use-cld3-on-heroku-no-rebuild 2b99b4
$ git push -f heroku-mastodon-master use-cld3-on-heroku-no-rebuild:master
$ git commit --allow-empty -m 'deploying with build cache'
$ git push -f heroku-mastodon-master use-cld3-on-heroku-no-rebuild:master
:
remote: Module build failed: Error: ENOENT: no such file or directory, scandir '…/node_modules/node-sass/vendor'
:
$ heroku pg:info DATABASE
=== DATABASE_URL, PG_HOBBY_BASIC_URL
Plan: Hobby-basic
Status: Available
Connections: 8/20
PG Version: 9.6.1
Created: 2017-04-20 18:31 UTC
Data Size: 47.8 MB
Tables: 26
Rows: 54918/10000000 (In compliance)
Growth of number of rows on database for this instance. Still looking stable :) https://mastodon.zunda.ninja/media/FC9m1szyCmfH-tGGrXo
I thought I did this already but finally moved stack for this instance from Cedar-14 to Heroku-16 resulted in reduction of slug size from 244 MB to 235 MB :)
@hyuki ローカルタイムラインには自分しかいませんがリプライとかブーストは含まれない感じです。連合と比べてホームには自分へのリプライが多くて、ホームに比べて連合には時々知らない方のトゥートが混ざります。ご参考まで :-)
> SELECT text, language FROM statuses WHERE account_id=1 ORDER BY id DESC LIMIT 3;
text | プルリクエスト出して安心してたけどまだ洗濯物たたんでなかったw
language | ja
text | \テスト\/ですと/
language | ja
text | @hyuki 連合には自分からのリプライも表示されませんねー
language | sn
May 12 15:57:02 zundan-mastodon heroku/router: at=error code=H19 desc="Backend connection timeout" method=POST path="/api/subscriptions/1418" host=mastodon.zunda.ninja request_id=526c7d63-68a7-4685-a595-9a8f529a9e29 fwd="217.182.80.236" dyno=web.1 connect=5000ms service= status=503 bytes= protocol=https
Current master (654f4f; v58) consumes less memory and responds quicker :) https://mastodon.zunda.ninja/media/hqMqI5wP4_TaT25ZPic
\masterに/ \追随/ \しますたー/
66328adf83793844a94b32ec9d4b44523b65a6f0
heroku config:unset STREAMING_API_BASE_URLするとmethod=GET path=/api/v1/streaming status=404ですねー
STREAMING_API_BASE_URLの最初をhttps://からws://にしても来ない
LastPassの動作がおかしいと思ったらテザリング先のIPアドレスを怪しいと思っていたらしい
Mastodon master responses quicker with less memory than v1.3.3. Cool :) https://mastodon.zunda.ninja/media/HYtN1NPy-qlVnyc5Yk8
$ heroku pg:info DATABASE
=== DATABASE_URL, PG_HOBBY_BASIC_URL
Plan: Hobby-basic
Status: Available
Connections: 8/20
PG Version: 9.6.1
Created: 2017-04-20 18:31 UTC
Data Size: 51.6 MB
Tables: 27
Rows: 58940/10000000 (In compliance)
彼がシェルを起動するのは夜が白み始める前、コードを書いていた最後のプログラマが眠りについてエディタが空白文字で満たされる頃だ。「この時間帯に一番生きのいいcommitが取れるんですよ。お互いケンカも少ない」職人はほほえみつつ、見事なマウスさばきでlogからハッシュをコピーペーストしてcherry-pickを繰り返す。「rebase -i?ありゃあダメだね。エディタの匂いがついちまう:wq」職人のNo Newline at End of Fileを見つめる目はやさしい。
Cherry-pick職人は、丹精を込めてbranchに並べたcommitたちをrequest-pullしていちにちを終える。「Pull Requestの方が早いんじゃないかって?あれもダメだ。不自由なソフトウェアが絡んでるし、足が4本しかない」と愚痴をこぼす。職人ならではのこだわりが感じられる瞬間だ。
彼がシェルを起動するのは夜が白み始める前、コードを書いていた最後のプログラマが眠りについてエディタが空白文字で満たされる頃だ。「この時間帯に一番生きのいいcommitが取れるんですよ。お互いケンカも少ない」職人はほほえみつつ、見事なマウスさばきでlogからハッシュをコピーペーストしてcherry-pickを繰り返す。「rebase -i?ありゃあダメだね。エディタの匂いがついちまう:wq」職人のNo Newline at End of Fileを見つめる目はやさしい。
Cherry-pick職人は、丹精を込めてbranchに並べたcommitたちをrequest-pullしていちにちを終える。「Pull Requestの方が早いんじゃないかって?あれもダメだ。不自由なソフトウェアが絡んでるし、足が4本しかない」と愚痴をこぼす。職人ならではのこだわりが感じられる瞬間だ。