Home > Net >  How to have separate slugs per dyno on Heroku?
How to have separate slugs per dyno on Heroku?

Time:12-25

I am running out of space on heroku slug size, so I was thinking I can solve it by separating a worker from the main web dyno and have heroku built separate slugs for each dyno. Is this even possible? I found no info on this anywhere, so I could neither prove it can be done, nor prove it wrong. Any thoughts? Thanks

CodePudding user response:

It is possible to split web and worker (if it makes sense) and deploy them differently.

You could also look at reducing the slug following the Heroku guidelines, or using Docker to containerize the application. Docker images are not limited by the slug max size limit.

CodePudding user response:

Since it seems like the underlying issue you want to solve is slug size, have you attempted either of the following potential solutions?

  • Ignore files that don't need to be in the final build using .slugignore (documentation)
  • Clear the build cache because sometimes this may take up extra space (documentation)
  • Create a support ticket asking for an increase in your allowed slug size.

While these may not immediately answer your "how can I split up a slug" question, I feel like they may be easier solutions to solving your slug size issue than hacking around your deployment process, which seems not fun.

  • Related