It's definitely a tricky dance
The idea is that hopefully your buffer sustains itself as you continue to add to it as the pages post, and ideally it'll only shrink if/when something comes up that causes you to cease work on the comic for one or more weeks.
That said! There are always a options 
1.) if your comic can be broken down into parts, say chapters, seasons, arcs, etc., one approach is to finish one before posting (thus using what you don't post up front as buffer), and then simply work until you finish the next chunk. If you run out of pages while still working you can just let the audience know that there will be a small hiatus until the next -whatever- is ready, and then start posting again while you work on the next one, and so on.
2.) If your comic isn't easy to break up into parts like that, or you just don't want to commit to working that far ahead at a time, it's always okay just to take an impromptu hiatus whenever you need one to rebuild buffer when it gets low~ Similar to the above, it's fine to just be like "hey I need to work ahead on the comic a little bit, so I'll be taking -period of time- off of uploading". If possible it's nice to estimate when you'll be back, but it's okay if you don't know too. Just be honest and communicative 