Question

Bad performance on deploy static site with App Platform

I’ve got very ugly results with static site deployment on DO App Platform. Site based on Hugo builder and contain 15k pages. Build time as part whole process take about 2 min which is good result for sure. But then starting total nightmare. Deployment to CDN stage could take from 34 to infinity minutes. In most cases deployment fails cause there limit for run applied for 1 hour as i remember. I have try alternative build method with Gitlab CI/CD runner and deploy via rsync to alternative CDN. Whole process take 6 minutes for run and about 5-10 min for changes propagation inside CDN.

So please explain, if possible, why deploy stage took so long time? My results for deployment to DO Spaces ams3 bucket on top of 100Mbit connection from Ukraine via rclone utility:

Transferred:   	  183.740M / 183.740 MBytes, 100%, 314.105 kBytes/s, Checks:               452 / 452, 100%
Transferred:        17638 / 17638, 100%
Elapsed time:      9m59.4s

Impressive? It is not 34 min and not an hour or more. Maybe there reasonable to implement deployment by rclone?

Subscribe
Share

Hi @kamaln7

Deploy performance is still slow. Any news in created internal ticket from DO engineers? regarding to run Hugo in live mode. There is small problem, cause there Hugo crashing too frequently when try to serve 16k pages. in this case simplest thing is to upload files into bucket and serve them through nginx. But this is workaround and completely broke apps concept in my mind. Thanks for help


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Pinned Answer

Hey @DenysK & @eillarra,

A few days ago we released an update to the static site upload process that has brought significant improvements to upload and processing times. If you’re still experiencing slow upload times, please open a support ticket and we’ll take a closer look.

Sorry for the inconvenience and I hope you’ll like the improved performance :)

Thanks for the update @DenysK. We are still working on the upload issue. I apologize for the inconvenience here. I’d recommend trying to build the static site one more time in case it was a temporary networking issue. Another option, if Hugo built-in server can’t handle this many files, is to use a Dockerfile to compile the assets and then serve them using nginx. If that would work for you I’d be happy to help you create the Dockerfile.

I’ll let you know once we have an update on the underlying issue.

Hi @DenysK,

Thanks for reporting this. I’ve filed an internal ticket to look into why the file upload is so slow. Until this is addressed, you can run Hugo as a Service instead of a Static Site. This will skip the file upload process, but it does mean that you won’t be able to make use of the 3 free static sites perk. It will still be fronted by the Cloudflare CDN so you can make use of caching.

If you’d like to try it out, a run command such as this one should work. You might want/need to customize it a bit based on your site. Also, look into configuring Cache-Control headers as well. If you want to replicate the Static Sites’ headers, you can use Cache-Control: public,max-age=10,s-maxage=86400.

Run command:

hugo server --bind=0.0.0.0 --port=$PORT --appendPort=false --disableBrowserError=true --minify=true --watch=false