Commit Graph
11 Commits
Author SHA1 Message Date
rubic0n 6221581cf0 Create script to generate dummy data, for perf investigation 2021-02-13 23:20:43 -06:00
rubic0n 1179957a32 Start redis server on VM boot
Otherwise you have to start it yourself after vagrant halt / vagrant up
2021-02-13 23:20:43 -06:00
rubic0n 9331f06784 Add rack-mini-profiler, to diagnose perf issues 2021-02-13 23:20:43 -06:00
rubic0n 57a88c5904 Avoid redundant OAuth queries when not signed in
If you aren't signed in, you don't have an auth token.
When you don't have an auth token, React was sending the headers

"Authorization: Bearer null"

This caused 5 Doorkeeper token lookups using
WHERE "oauth_access_tokens"."token" = 'null'
on the Explore page (the root of the app when not signed in).
2021-02-06 22:41:35 -06:00
rubic0n 2952c9f59d Simplify db config 2021-01-24 23:57:30 -06:00
rubic0n 1b9349bc52 Remove unnecessary queries from requested conversations count 2021-01-24 23:19:20 -06:00
rubic0n 28beb28a78 Upgrade to Rails 6
- Added listen gem because rails app:update failed without it
- Removes nsa gem because it requires activesupport < 6
  Oddly, there's a newer version per GitHub that's not on RubyGems
  that raises the requirement to < 7. But, we need a new release
  before we can use that.
- Upgrade rails-i18n to v6, for Rails 6 compatibility
- Remove redis-rails since it requires Rails < 6, but we can just use
  the regular Rails :redis_cache_store that was introduced in 5.2.
- Run `rails app:update`
  - Had to weed through the `config/environments` changes to pick up
    newly added settings, while not losing settings that were
    intentionally configured
  - This generated config/initializers/new_framework_defaults_6_0.rb.
    The goal is to uncomment all of the settings in that file. Once
    they're all uncommented, delete the file and edit
    config/application.rb's load_defaults to be 6.0.
  - force_ssl controller method is deprecated in favor of a Rails
    config setting.
  - bin/setup was generated by Rails
  - Verbose query logging in development is really helpful. It shows
    you what line of code caused a query to execute.
  - Calling establish_connection after worker boot isn't necessary
    with ActiveRecord anymore. ActiveRecord handles it gracefully.
  - Rails generated a migration to add a foreign key for ActiveStorage.
    Gab currently doesn't use ActiveStorage, and instead uses Paperclip
    (since ActiveStorage didn't exist when Mastadon started). So, this
    change isn't relevant to Gab.
- Added ` || ''` in the profiles controller, because I was unable
  to save a change to a newly created profile. (This probably
  explains the 500 error I received on prod Gab recently.)
2021-01-23 09:01:31 -06:00
rubic0n 70c29c6cbd Fix "ERR! error: password authentication failed for user "vagrant"" 2021-01-23 09:00:35 -06:00
rubic0n 590dfc97e1 Run pending migrations 2021-01-22 22:53:38 -06:00
rubic0n 4f4f248fa1 postgresql_makara adapter is Postgres, not MySQL 2021-01-22 22:53:38 -06:00
rubic0n 194971da19 Install Redis 4+ since Sidekiq 5 needs that 2021-01-22 22:53:38 -06:00