Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Offical apps | Community apps | Demo | Docs | Install
  1. Cloudron Forum
  2. GitLab
  3. Help with improving GitLab startup latency

Help with improving GitLab startup latency

Scheduled Pinned Locked Moved GitLab
2 Posts 2 Posters 79 Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • timweddeT
    timweddeT
    timwedde
    wrote last edited by timwedde
    #1

    I noticed that over time my GitLab instance startup times became slower and slower, but not always consistently. I eventually managed to track this down to a recursive directory ownership command that the startup script runs unconditionally:
    chown -R git:git /app/data /run/gitlab /tmp/gitlab

    My instance has about 350k files and directories in its artifact storage, which causes this command to take upwards of 3 minutes when filesystem caches are cold. Needless to say this is quite annoying when updating or restarting the app after some time, when the FS caches are cold. It only takes ~30s when the caches are hot, but this is rarely the case for updates for daily/weekly restarts. As such, I regularly lose 3-5 minutes on restarts and updates, which adds up over time.
    This problem also gets worse as the instance grows, the more files and directories there are, the longer this command will take to run.

    Is it required to run this command on every startup? If not, could it be made into a one-time thing or somehow be made conditional to only run when actually required? This would greatly reduce startup times (and thus downtime during updates) for me and presumably everyone else with larger instances.

    1 Reply Last reply
    3
    • robiR
      robiR
      robi
      wrote last edited by
      #2

      Ah yeah, from the chown it seems it is necessary for GitLab to start, but maybe not all at once.

      If the command is run twice, once with depth 1 to allow GitLab to start, then later full depth if needed; that should solve the startup delay.

      If there's any changes to the container/updates those permissions reset.

      Frequency tech & energy mastery

      1 Reply Last reply
      0

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Bookmarks
      • Search