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?

Show comments

Submit an answer


This textbox defaults to using Markdown to format your answer.

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

Sign In or Sign Up to Answer

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.

Kamal Nasser
DigitalOcean Employee
DigitalOcean Employee badge
October 1, 2021
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 :)

Kamal Nasser
DigitalOcean Employee
DigitalOcean Employee badge
March 30, 2021

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.

Kamal Nasser
DigitalOcean Employee
DigitalOcean Employee badge
March 22, 2021

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

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel