Strapi 4.20 - 30 min(!) startup time - how to debug?

System Information
  • **Strapi Version4.20.1:
  • **Operating SystemAlpine Linux 3.18 (run in docker container):
  • **DatabasePostgres 14:
  • **Node Version18.20.1:
  • **NPM Version10.2.4:
  • **Yarn Versionn/a:

Since we have extended our strapi app by one innocent-looking collection type and one small custom service, we are consistently encountering start-up times of approx. 30mins for strapi. It immediately logs the app version and strapi start to the console, but is not reachable by its port (1337).

Here’s a typical startup log with timestamps:

2024-04-09T15:04:20.991003880Z
2024-04-09T15:04:20.991067865Z > [appname, redacted]@1.8.0 start
2024-04-09T15:04:20.991071542Z > strapi start
2024-04-09T15:04:20.991073266Z
2024-04-09T15:33:05.889219477Z
2024-04-09T15:33:05.889461480Z  Project information
2024-04-09T15:33:05.889479563Z
2024-04-09T15:33:05.904837879Z ┌────────────────────┬──────────────────────────────────────────────────┐
2024-04-09T15:33:05.904861475Z │ Time               │ Tue Apr 09 2024 17:33:05 GMT+0200 (Central Euro… │
2024-04-09T15:33:05.904863974Z │ Launched in        │ 3025 ms                                          │
2024-04-09T15:33:05.904865902Z │ Environment        │ production                                       │
2024-04-09T15:33:05.904867659Z │ Process PID        │ 17                                               │
2024-04-09T15:33:05.904869483Z │ Version            │ 4.20.1 (node v18.20.1)                           │
2024-04-09T15:33:05.904871291Z │ Edition            │ Community                                        │
2024-04-09T15:33:05.904873014Z │ Database           │ postgres                                         │
2024-04-09T15:33:05.904874707Z └────────────────────┴──────────────────────────────────────────────────┘
2024-04-09T15:33:05.904876802Z
2024-04-09T15:33:05.904960640Z  Actions available
2024-04-09T15:33:05.904981470Z
2024-04-09T15:33:05.904985734Z Welcome back!
2024-04-09T15:33:05.905085858Z To manage your project 🚀, go to the administration panel at:
2024-04-09T15:33:05.905253986Z http://0.0.0.0:1337/admin
2024-04-09T15:33:05.905536451Z
2024-04-09T15:33:05.905547006Z To access the server ⚡️, go to:
2024-04-09T15:33:05.905551593Z http://0.0.0.0:1337
2024-04-09T15:33:05.905554052Z
2024-04-09T15:33:10.981505576Z [2024-04-09 17:33:10.979] http: POST /graphql (83 ms) 200

Note the 29mins delay between line 4 and 5.

What can we do to further investigate the reason for this startup delay?