I have a rails site hosted on a DigitalOcean droplet with dokku and a herokusih deployment. Everything seems to work pretty well, and the site generally seems to run pretty fast (clicking between two pages feels nearly instant).
However, the first page I load on the site always takes a long time (I'd say about 2-5 seconds). Again, after this, everything loads quickly. This doesn't happen just on the homepage, whichever page is loaded first in a session is slow, and then they all go fast. Once I start a session, the site feels fast (instant or under 1s) even if I open it on a different device. The site doesn't get a lot of traffic, but I'm wondering why the first page load is slow.
What could be causing the slow first-hit, and how would I be able to accurately diagnose this?
I suspect it could be that the site id going to "sleep" somehow and boots on the first load. But I'm not aware of having set it up this way, and don't know how to verify this.
Software versions:
- Rails 7.0.5
- dokku version 0.31.0
Latest dokku deploy log:
Enumerating objects: 9, done.
Counting objects: 100% (9/9), done.
Delta compression using up to 8 threads
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 501 bytes | 501.00 KiB/s, done.
Total 5 (delta 4), reused 0 (delta 0), pack-reused 0
-----> Cleaning up...
-----> Building poste from herokuish
-----> Adding BUILD_ENV to build environment...
BUILD_ENV added successfully
-----> Ruby app detected
-----> Installing bundler 2.3.25
-----> Removing BUNDLED WITH version in the Gemfile.lock
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-3.2.2
-----> Installing dependencies using bundler 2.3.25
Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin BUNDLE_DEPLOYMENT=1 bundle install -j4
Fetching gem metadata from https://rubygems.org/..........
Fetching rake 13.0.6
Installing rake 13.0.6
Fetching concurrent-ruby 1.2.2
Fetching minitest 5.18.0
Fetching builder 3.2.4
Fetching erubi 1.12.0
Installing erubi 1.12.0
Installing builder 3.2.4
Installing minitest 5.18.0
Using racc 1.6.2
Fetching crass 1.0.6
Fetching rack 2.2.7
Installing crass 1.0.6
Fetching nio4r 2.5.9
Fetching websocket-extensions 0.1.5
Installing nio4r 2.5.9 with native extensions
Installing rack 2.2.7
Installing websocket-extensions 0.1.5
Fetching marcel 1.0.2
Installing concurrent-ruby 1.2.2
Installing marcel 1.0.2
Fetching mini_mime 1.1.2
Using date 3.3.3
Fetching timeout 0.3.2
Installing mini_mime 1.1.2
Installing timeout 0.3.2
Using bundler 2.4.10
Fetching method_source 1.0.0
Fetching thor 1.2.2
Installing method_source 1.0.0
Installing thor 1.2.2
Fetching zeitwerk 2.6.8
Installing zeitwerk 2.6.8
Fetching msgpack 1.7.1
Fetching qonfig 0.28.0
Fetching google-protobuf 3.23.4 (x86_64-linux)
Installing msgpack 1.7.1 with native extensions
Installing qonfig 0.28.0
Installing google-protobuf 3.23.4 (x86_64-linux)
Fetching faraday-net_http 3.0.2
Installing faraday-net_http 3.0.2
Using ruby2_keywords 0.0.5
Fetching multipart-post 2.3.0
Installing multipart-post 2.3.0
Fetching kaminari-core 1.2.2
Fetching multi_xml 0.6.0
Installing multi_xml 0.6.0
Installing kaminari-core 1.2.2
Fetching pg 1.5.3
Fetching redis 4.8.1
Installing redis 4.8.1
Installing pg 1.5.3 with native extensions
Fetching sqlite3 1.6.3 (x86_64-linux)
Installing sqlite3 1.6.3 (x86_64-linux)
Fetching nokogiri 1.15.2 (x86_64-linux)
Installing nokogiri 1.15.2 (x86_64-linux)
Fetching sitemap_generator 6.3.0
Installing sitemap_generator 6.3.0
Fetching websocket-driver 0.7.5
Installing websocket-driver 0.7.5 with native extensions
Fetching rack-test 2.1.0
Installing rack-test 2.1.0
Using net-protocol 0.2.1
Fetching i18n 1.14.1
Installing i18n 1.14.1
Fetching tzinfo 2.0.6
Installing tzinfo 2.0.6
Fetching sprockets 4.2.0
Installing sprockets 4.2.0
Fetching sass-embedded 1.64.1 (x86_64-linux-gnu)
Fetching faraday 2.7.6
Installing faraday 2.7.6
Fetching crawler_detect 1.2.2
Installing crawler_detect 1.2.2
Fetching faraday-multipart 1.0.4
Fetching httparty 0.21.0
Installing faraday-multipart 1.0.4
Fetching loofah 2.21.3
Installing httparty 0.21.0
Installing loofah 2.21.3
Fetching puma 5.6.5
Installing sass-embedded 1.64.1 (x86_64-linux-gnu)
Fetching net-imap 0.3.4
Installing puma 5.6.5 with native extensions
Installing net-imap 0.3.4
Fetching net-pop 0.1.2
Installing net-pop 0.1.2
Fetching net-smtp 0.3.3
Fetching activesupport 7.0.5
Installing net-smtp 0.3.3
Installing activesupport 7.0.5
Fetching bootsnap 1.16.0
Installing bootsnap 1.16.0 with native extensions
Fetching ruby-openai 4.1.0
Installing ruby-openai 4.1.0
Fetching rails-html-sanitizer 1.6.0
Installing rails-html-sanitizer 1.6.0
Fetching mail 2.8.1
Installing mail 2.8.1
Fetching rails-dom-testing 2.0.3
Installing rails-dom-testing 2.0.3
Fetching globalid 1.1.0
Installing globalid 1.1.0
Fetching activemodel 7.0.5
Installing activemodel 7.0.5
Fetching actionview 7.0.5
Installing actionview 7.0.5
Fetching activejob 7.0.5
Fetching activerecord 7.0.5
Installing activejob 7.0.5
Fetching actionpack 7.0.5
Installing actionpack 7.0.5
Installing activerecord 7.0.5
Fetching jbuilder 2.11.5
Installing jbuilder 2.11.5
Fetching kaminari-actionview 1.2.2
Installing kaminari-actionview 1.2.2
Fetching actioncable 7.0.5
Installing actioncable 7.0.5
Fetching actionmailer 7.0.5
Installing actionmailer 7.0.5
Fetching railties 7.0.5
Installing railties 7.0.5
Fetching sprockets-rails 3.4.2
Installing sprockets-rails 3.4.2
Fetching activestorage 7.0.5
Installing activestorage 7.0.5
Fetching kaminari-activerecord 1.2.2
Installing kaminari-activerecord 1.2.2
Fetching actionmailbox 7.0.5
Installing actionmailbox 7.0.5
Fetching actiontext 7.0.5
Fetching kaminari 1.2.2
Installing kaminari 1.2.2
Installing actiontext 7.0.5
Fetching dartsass-rails 0.5.0
Installing dartsass-rails 0.5.0
Fetching importmap-rails 1.1.6
Installing importmap-rails 1.1.6
Fetching stimulus-rails 1.2.1
Fetching turbo-rails 1.4.0
Installing turbo-rails 1.4.0
Installing stimulus-rails 1.2.1
Fetching rails 7.0.5
Installing rails 7.0.5
Fetching active_analytics 0.2.1
Installing active_analytics 0.2.1
Bundle complete! 28 Gemfile dependencies, 76 gems now installed.
Gems in the groups 'development' and 'test' were not installed.
Bundled gems are installed into `./vendor/bundle`
Post-install message from httparty:
When you HTTParty, you must party hard!
Bundle completed (85.82s)
Cleaning up the bundler cache.
Removing bundler (2.3.25)
-----> Detecting rake tasks
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
I, [2023-08-20T17:14:24.751490 #906] INFO -- : Writing /tmp/build/public/assets/manifest-b84bfa46a33d7f0dc4d2e7b8889486c9a957a5e40713d58f54be71b66954a1ff.js
I, [2023-08-20T17:14:24.752110 #906] INFO -- : Writing /tmp/build/public/assets/manifest-b84bfa46a33d7f0dc4d2e7b8889486c9a957a5e40713d58f54be71b66954a1ff.js.gz
I, [2023-08-20T17:14:24.752302 #906] INFO -- : Writing /tmp/build/public/assets/app-4b615a9403558cfd8bff66c2d713670e7de9191f0135f8051716feacee16c632.js
I, [2023-08-20T17:14:24.752415 #906] INFO -- : Writing /tmp/build/public/assets/app-4b615a9403558cfd8bff66c2d713670e7de9191f0135f8051716feacee16c632.js.gz
I, [2023-08-20T17:14:24.752532 #906] INFO -- : Writing /tmp/build/public/assets/application-37f365cbecf1fa2810a8303f4b6571676fa1f9c56c248528bc14ddb857531b95.js
I, [2023-08-20T17:14:24.752619 #906] INFO -- : Writing /tmp/build/public/assets/application-37f365cbecf1fa2810a8303f4b6571676fa1f9c56c248528bc14ddb857531b95.js.gz
I, [2023-08-20T17:14:24.752727 #906] INFO -- : Writing /tmp/build/public/assets/controllers/application-368d98631bccbf2349e0d4f8269afb3fe9625118341966de054759d96ea86c7e.js
I, [2023-08-20T17:14:24.753097 #906] INFO -- : Writing /tmp/build/public/assets/controllers/application-368d98631bccbf2349e0d4f8269afb3fe9625118341966de054759d96ea86c7e.js.gz
I, [2023-08-20T17:14:24.753920 #906] INFO -- : Writing /tmp/build/public/assets/controllers/hello_controller-549135e8e7c683a538c3d6d517339ba470fcfb79d62f738a0a089ba41851a554.js
I, [2023-08-20T17:14:24.754473 #906] INFO -- : Writing /tmp/build/public/assets/controllers/hello_controller-549135e8e7c683a538c3d6d517339ba470fcfb79d62f738a0a089ba41851a554.js.gz
I, [2023-08-20T17:14:24.754906 #906] INFO -- : Writing /tmp/build/public/assets/controllers/index-2db729dddcc5b979110e98de4b6720f83f91a123172e87281d5a58410fc43806.js
I, [2023-08-20T17:14:24.755011 #906] INFO -- : Writing /tmp/build/public/assets/controllers/index-2db729dddcc5b979110e98de4b6720f83f91a123172e87281d5a58410fc43806.js.gz
I, [2023-08-20T17:14:24.755277 #906] INFO -- : Writing /tmp/build/public/assets/app-f697670ef9193db23ebd3c813f62448c3d874f9c7ced5dc40aa9c90aff9f45a4.css
I, [2023-08-20T17:14:24.755528 #906] INFO -- : Writing /tmp/build/public/assets/app-f697670ef9193db23ebd3c813f62448c3d874f9c7ced5dc40aa9c90aff9f45a4.css.gz
I, [2023-08-20T17:14:24.773208 #906] INFO -- : Writing /tmp/build/public/assets/articles-e92d40b73fa4526b36e9fe2527d9b81c8d6b0cf1bd5ae879fc05431c05c99cec.css
I, [2023-08-20T17:14:24.776509 #906] INFO -- : Writing /tmp/build/public/assets/articles-e92d40b73fa4526b36e9fe2527d9b81c8d6b0cf1bd5ae879fc05431c05c99cec.css.gz
I, [2023-08-20T17:14:24.777860 #906] INFO -- : Writing /tmp/build/public/assets/office-1d14aa7904f8fd35760d32635a19b063149e5242da582d29be97b742a4f2100e.css
I, [2023-08-20T17:14:24.778322 #906] INFO -- : Writing /tmp/build/public/assets/office-1d14aa7904f8fd35760d32635a19b063149e5242da582d29be97b742a4f2100e.css.gz
I, [2023-08-20T17:14:24.781081 #906] INFO -- : Writing /tmp/build/public/assets/turbo-4851a9a0b1d947e810dfd0448a72aef261d455183ebea681f4f28a73640a9ece.js
I, [2023-08-20T17:14:24.781988 #906] INFO -- : Writing /tmp/build/public/assets/turbo-4851a9a0b1d947e810dfd0448a72aef261d455183ebea681f4f28a73640a9ece.js.gz
I, [2023-08-20T17:14:24.783473 #906] INFO -- : Writing /tmp/build/public/assets/turbo.min-f309baafa3ae5ad6ccee3e7362118b87678d792db8e8ab466c4fa284dd3a4700.js
I, [2023-08-20T17:14:24.784353 #906] INFO -- : Writing /tmp/build/public/assets/turbo.min-f309baafa3ae5ad6ccee3e7362118b87678d792db8e8ab466c4fa284dd3a4700.js.gz
I, [2023-08-20T17:14:24.786004 #906] INFO -- : Writing /tmp/build/public/assets/turbo.min.js-8bc8f4a58d1c106d58dec8bef6c638ff12ff4d078f19d8ebd8c4277f4c9bc85a.map
I, [2023-08-20T17:14:24.787757 #906] INFO -- : Writing /tmp/build/public/assets/turbo.min.js-8bc8f4a58d1c106d58dec8bef6c638ff12ff4d078f19d8ebd8c4277f4c9bc85a.map.gz
I, [2023-08-20T17:14:24.791321 #906] INFO -- : Writing /tmp/build/public/assets/actiontext-28c61f5197c204db043317a8f8826a87ab31495b741f854d307ca36122deefce.js
I, [2023-08-20T17:14:24.792707 #906] INFO -- : Writing /tmp/build/public/assets/actiontext-28c61f5197c204db043317a8f8826a87ab31495b741f854d307ca36122deefce.js.gz
I, [2023-08-20T17:14:24.794968 #906] INFO -- : Writing /tmp/build/public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js
I, [2023-08-20T17:14:24.795964 #906] INFO -- : Writing /tmp/build/public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js.gz
I, [2023-08-20T17:14:24.796132 #906] INFO -- : Writing /tmp/build/public/assets/trix-ac629f94e04ee467ab73298a3496a4dfa33ca26a132f624dd5475381bc27bdc8.css
I, [2023-08-20T17:14:24.796234 #906] INFO -- : Writing /tmp/build/public/assets/trix-ac629f94e04ee467ab73298a3496a4dfa33ca26a132f624dd5475381bc27bdc8.css.gz
I, [2023-08-20T17:14:24.801418 #906] INFO -- : Writing /tmp/build/public/assets/es-module-shims-69d0cb4dc1d01c9dc2ed52f2ab66874fd545fe7e35c7841009b4e8c55f231dee.js
I, [2023-08-20T17:14:24.801903 #906] INFO -- : Writing /tmp/build/public/assets/es-module-shims-69d0cb4dc1d01c9dc2ed52f2ab66874fd545fe7e35c7841009b4e8c55f231dee.js.gz
I, [2023-08-20T17:14:24.803957 #906] INFO -- : Writing /tmp/build/public/assets/es-module-shims.min-4ca9b3dd5e434131e3bb4b0c1d7dff3bfd4035672a5086deec6f73979a49be73.js
I, [2023-08-20T17:14:24.805106 #906] INFO -- : Writing /tmp/build/public/assets/es-module-shims.min-4ca9b3dd5e434131e3bb4b0c1d7dff3bfd4035672a5086deec6f73979a49be73.js.gz
I, [2023-08-20T17:14:24.806681 #906] INFO -- : Writing /tmp/build/public/assets/es-module-shims.js-c69f1a5dd068dfc08a4cedc0ad77b792985bf256e162852bd03cdf764b666c4a.map
I, [2023-08-20T17:14:24.807490 #906] INFO -- : Writing /tmp/build/public/assets/es-module-shims.js-c69f1a5dd068dfc08a4cedc0ad77b792985bf256e162852bd03cdf764b666c4a.map.gz
I, [2023-08-20T17:14:24.808863 #906] INFO -- : Writing /tmp/build/public/assets/stimulus-1bd52683afde5c8ff5572f5d49429cea5bf7744ca636fcb830c015d8cccf353e.js
I, [2023-08-20T17:14:24.809498 #906] INFO -- : Writing /tmp/build/public/assets/stimulus-1bd52683afde5c8ff5572f5d49429cea5bf7744ca636fcb830c015d8cccf353e.js.gz
I, [2023-08-20T17:14:24.810636 #906] INFO -- : Writing /tmp/build/public/assets/stimulus-autoloader-c584942b568ba74879da31c7c3d51366737bacaf6fbae659383c0a5653685693.js
I, [2023-08-20T17:14:24.811811 #906] INFO -- : Writing /tmp/build/public/assets/stimulus-autoloader-c584942b568ba74879da31c7c3d51366737bacaf6fbae659383c0a5653685693.js.gz
I, [2023-08-20T17:14:24.813560 #906] INFO -- : Writing /tmp/build/public/assets/stimulus-importmap-autoloader-db2076c783bf2dbee1226e2add52fef290b5d31b5bcd1edd999ac8a6dd31c44a.js
I, [2023-08-20T17:14:24.816081 #906] INFO -- : Writing /tmp/build/public/assets/stimulus-importmap-autoloader-db2076c783bf2dbee1226e2add52fef290b5d31b5bcd1edd999ac8a6dd31c44a.js.gz
I, [2023-08-20T17:14:24.816527 #906] INFO -- : Writing /tmp/build/public/assets/stimulus-loading-1fc59770fb1654500044afd3f5f6d7d00800e5be36746d55b94a2963a7a228aa.js
I, [2023-08-20T17:14:24.817114 #906] INFO -- : Writing /tmp/build/public/assets/stimulus-loading-1fc59770fb1654500044afd3f5f6d7d00800e5be36746d55b94a2963a7a228aa.js.gz
I, [2023-08-20T17:14:24.818537 #906] INFO -- : Writing /tmp/build/public/assets/stimulus.min-d03cf1dff41d6c5698ec2c5d6a501615a7a33754dbeef8d1edd31c928d17c652.js
I, [2023-08-20T17:14:24.821185 #906] INFO -- : Writing /tmp/build/public/assets/stimulus.min-d03cf1dff41d6c5698ec2c5d6a501615a7a33754dbeef8d1edd31c928d17c652.js.gz
I, [2023-08-20T17:14:24.822085 #906] INFO -- : Writing /tmp/build/public/assets/stimulus-autoloader-c584942b568ba74879da31c7c3d51366737bacaf6fbae659383c0a5653685693.js
I, [2023-08-20T17:14:24.823314 #906] INFO -- : Writing /tmp/build/public/assets/stimulus-autoloader-c584942b568ba74879da31c7c3d51366737bacaf6fbae659383c0a5653685693.js.gz
I, [2023-08-20T17:14:24.824283 #906] INFO -- : Writing /tmp/build/public/assets/stimulus-importmap-autoloader-db2076c783bf2dbee1226e2add52fef290b5d31b5bcd1edd999ac8a6dd31c44a.js
I, [2023-08-20T17:14:24.825901 #906] INFO -- : Writing /tmp/build/public/assets/stimulus-importmap-autoloader-db2076c783bf2dbee1226e2add52fef290b5d31b5bcd1edd999ac8a6dd31c44a.js.gz
I, [2023-08-20T17:14:24.826405 #906] INFO -- : Writing /tmp/build/public/assets/stimulus-loading-1fc59770fb1654500044afd3f5f6d7d00800e5be36746d55b94a2963a7a228aa.js
I, [2023-08-20T17:14:24.828155 #906] INFO -- : Writing /tmp/build/public/assets/stimulus-loading-1fc59770fb1654500044afd3f5f6d7d00800e5be36746d55b94a2963a7a228aa.js.gz
I, [2023-08-20T17:14:24.828470 #906] INFO -- : Writing /tmp/build/public/assets/stimulus.min.js-0f3bbd3e2e72e4d7178153a52d180de4086e47082ecfc388ce82a90d8a3d7480.map
I, [2023-08-20T17:14:24.829771 #906] INFO -- : Writing /tmp/build/public/assets/stimulus.min.js-0f3bbd3e2e72e4d7178153a52d180de4086e47082ecfc388ce82a90d8a3d7480.map.gz
I, [2023-08-20T17:14:24.831303 #906] INFO -- : Writing /tmp/build/public/assets/active_analytics/application-b705677af05d61d9643ca19ff1bcf119669b1d665935cadb614a3d543f97da17.js
I, [2023-08-20T17:14:24.832041 #906] INFO -- : Writing /tmp/build/public/assets/active_analytics/application-b705677af05d61d9643ca19ff1bcf119669b1d665935cadb614a3d543f97da17.js.gz
I, [2023-08-20T17:14:24.832878 #906] INFO -- : Writing /tmp/build/public/assets/active_analytics/application-396549c7a8cc06c09b9fa8811292c5c7cf78fa645b44d1d722ad218433b25f39.css
I, [2023-08-20T17:14:24.834152 #906] INFO -- : Writing /tmp/build/public/assets/active_analytics/application-396549c7a8cc06c09b9fa8811292c5c7cf78fa645b44d1d722ad218433b25f39.css.gz
I, [2023-08-20T17:14:24.835832 #906] INFO -- : Writing /tmp/build/public/assets/activestorage-3ab61e47dd4ee2d79db525ade1dca2ede0ea2b7371fe587e408ee37b7ade265d.js
I, [2023-08-20T17:14:24.837601 #906] INFO -- : Writing /tmp/build/public/assets/activestorage-3ab61e47dd4ee2d79db525ade1dca2ede0ea2b7371fe587e408ee37b7ade265d.js.gz
I, [2023-08-20T17:14:24.838894 #906] INFO -- : Writing /tmp/build/public/assets/activestorage.esm-01f58a45d77495cdfbdfcc872902a430426c4391634ec9c3da5f69fbf8418492.js
I, [2023-08-20T17:14:24.839679 #906] INFO -- : Writing /tmp/build/public/assets/activestorage.esm-01f58a45d77495cdfbdfcc872902a430426c4391634ec9c3da5f69fbf8418492.js.gz
I, [2023-08-20T17:14:24.841459 #906] INFO -- : Writing /tmp/build/public/assets/actioncable-5433453f9b6619a9de91aaab2d7fc7ff183e5260c0107cbc9a1aa0c838d9a74e.js
I, [2023-08-20T17:14:24.847290 #906] INFO -- : Writing /tmp/build/public/assets/actioncable-5433453f9b6619a9de91aaab2d7fc7ff183e5260c0107cbc9a1aa0c838d9a74e.js.gz
I, [2023-08-20T17:14:24.850970 #906] INFO -- : Writing /tmp/build/public/assets/actioncable.esm-e01089c3ec4fe7817fa9abcad06cab6bdc387f95f0ca6aab4bf7ba7537f70690.js
I, [2023-08-20T17:14:24.852670 #906] INFO -- : Writing /tmp/build/public/assets/actioncable.esm-e01089c3ec4fe7817fa9abcad06cab6bdc387f95f0ca6aab4bf7ba7537f70690.js.gz
Asset precompilation completed (4.28s)
Cleaning assets
Running: rake assets:clean
-----> Detecting rails configuration
-----> Discovering process types
Procfile declares types -> web
-----> Releasing poste...
-----> Checking for predeploy task
No predeploy task found, skipping
-----> Checking for release task
No release task found, skipping
=====> Processing deployment checks
No CHECKS file found. Simple container checks will be performed.
For more efficient zero downtime deployments, create a CHECKS file. See https://dokku.com/docs/deployment/zero-downtime-deploys/ for examples
-----> Deploying poste via the docker-local scheduler...
-----> Deploying web (count=1)
Attempting pre-flight checks (web.1)
-----> Executing 1 healthchecks
Running healthcheck name='web check' delay=0 path='/health/check' retries=5 timeout=5 type='path'
Healthcheck succeeded name='web check'
All checks successful (web.1)
=====> Start of poste container output (web.1)
Puma starting in single mode...
* Puma version: 5.6.5 (ruby 3.2.2-p53) ("Birdie's Version")
* Min threads: 5
* Max threads: 5
* Environment: production
* PID: 12
* Listening on http://0.0.0.0:5000
Use Ctrl-C to stop
I, [2023-08-20T17:15:23.793842 #12] INFO -- : [e7dd50f0-3c32-4b25-8042-91fcdcd291ff] Started GET "/health/check" for 172.17.0.1 at 2023-08-20 17:15:23 +0000
I, [2023-08-20T17:15:23.814752 #12] INFO -- : [e7dd50f0-3c32-4b25-8042-91fcdcd291ff] Processing by ApplicationController#health_check as */*
I, [2023-08-20T17:15:23.822655 #12] INFO -- : [e7dd50f0-3c32-4b25-8042-91fcdcd291ff] Rendered text template (Duration: 0.0ms | Allocations: 7)
I, [2023-08-20T17:15:23.823900 #12] INFO -- : [e7dd50f0-3c32-4b25-8042-91fcdcd291ff] Completed 200 OK in 8ms (Views: 7.0ms | Allocations: 723)
=====> End of poste container output (web.1)
Scheduling old container shutdown in 60 seconds (web.1)
=====> Triggering early nginx proxy rebuild
-----> Ensuring network configuration is in sync for poste
-----> Configuring poste.pt...(using built-in template)
-----> Configuring www.poste.pt...(using built-in template)
-----> Creating https nginx.conf
Enabling HSTS
Reloading nginx
-----> Running post-deploy
-----> Ensuring network configuration is in sync for poste
-----> Configuring poste.pt...(using built-in template)
-----> Configuring www.poste.pt...(using built-in template)
-----> Creating https nginx.conf
Enabling HSTS
Reloading nginx
-----> Renaming containers
Found previous container(s) (ce968cd29148) named poste.web.1
Renaming container (ce968cd29148) poste.web.1 to poste.web.1.1692551740
Renaming container poste.web.1.upcoming-21322 (34dcbd0190c0) to poste.web.1
-----> Checking for postdeploy task
-----> Executing postdeploy task from app.json: bundle exec rake db:migrate
=====> Start of poste postdeploy task (247dfb42b) output
=====> End of poste postdeploy task (247dfb42b) output
-----> Updated schedule file
-----> Shutting down old containers in 60 seconds
=====> Application deployed:
http://poste.pt
https://poste.pt
https://www.poste.pt
http://www.poste.pt
@exception_thrown — see DO usage graphs above. If I zoom out to the 6- or 24-hour graphs, essentially the same up/down pattern repeats continuously

The app is booting on first page load, and usually running stuff like loading ruby gems into memory or even precompiling assets.
You could set the healthcheck to a page that is typically slow, and that would warm the cache for the app.