Builds getting stuck every time

Sure, here’s one right now where I first uninstall the plugin: Netlify App

The build ran for 3+ minutes before I canceled it

Did you try running a clear cache and deploy after uninstalling the plugin? Maybe the plugin had cached some stuff and that cache is in a weird state?

After clearing cache for the first build after uninstalling the plugin, I think the subsequent ones should work fine.

hey I still have the same problem, this is annoying, are you still investigating this @hrishikesh ?

I have the same issue.
I even tried to delete cache before the build command:

[build]
publish = "public"
command = "rm -rf /opt/build/cache && hugo --gc --minify"

Sadly didn’t solve anything.
Deployment is still stuck and can’t go ahead unless you manually stop and click Clear Cache and deploy site

I would also like to point out that there are issues with Hugo versions as well:

10:14:43 AM: Build ready to start
10:14:46 AM: build-image version: a6bb34428a07e7de82f4df5dfe1843fbde91f670 (focal)
10:14:46 AM: build-image tag: v4.5.1
10:14:46 AM: buildbot version: 5284b4d1b8b4cf691b29019968d8e4eb3089acdd
10:14:47 AM: Fetching cached dependencies
10:14:47 AM: Starting to download cache of 111.2MB
10:14:48 AM: Finished downloading cache in 1.356565392s
10:14:48 AM: Starting to extract cache
10:14:51 AM: Finished extracting cache in 3.386578635s
10:14:51 AM: Finished fetching cache in 4.779807493s
10:14:51 AM: Starting to prepare the repo for build
10:14:52 AM: Preparing Git Reference refs/heads/master
10:14:53 AM: Parsing package.json dependencies
10:14:53 AM: Different build command detected, going to use the one specified in the Netlify configuration file: 'rm -rf /opt/build/cache && hugo --gc --minify' versus 'hugo' in the Netlify UI
10:14:54 AM: Starting build script
10:14:54 AM: Installing dependencies
10:14:54 AM: Python version set to 2.7
10:14:54 AM: Started restoring cached node version
10:14:57 AM: Finished restoring cached node version
10:14:57 AM: v16.13.1 is already installed.
10:14:58 AM: Now using node v16.13.1 (npm v8.1.2)
10:14:58 AM: Started restoring cached build plugins
10:14:58 AM: Finished restoring cached build plugins
10:14:58 AM: Attempting ruby version 2.7.2, read from environment
10:15:01 AM: Using ruby version 2.7.2
10:15:01 AM: Using PHP version 8.0
10:15:01 AM: Installing Hugo 0.89.4
10:15:03 AM: hugo v0.89.4-AB01BA6E+extended linux/amd64 BuildDate=2021-11-17T08:24:09Z VendorInfo=gohugoio
10:15:03 AM: Started restoring cached go cache
10:15:03 AM: Finished restoring cached go cache
10:15:03 AM: go version go1.16.5 linux/amd64
10:15:03 AM: go version go1.16.5 linux/amd64
10:15:03 AM: Installing missing commands
10:15:03 AM: Verify run directory
10:15:05 AM: ​
10:15:05 AM: ────────────────────────────────────────────────────────────────
10:15:05 AM:   Netlify Build                                                 
10:15:05 AM: ────────────────────────────────────────────────────────────────
10:15:05 AM: ​
10:15:05 AM: ❯ Version
10:15:05 AM:   @netlify/build 20.3.1
10:15:05 AM: ​
10:15:05 AM: ❯ Flags
10:15:05 AM:   baseRelDir: true
10:15:05 AM:   buildId: 61b9b203e059df0008c59a9b
10:15:05 AM:   deployId: 61b9b203e059df0008c59a9d
10:15:05 AM: ​
10:15:05 AM: ❯ Current directory
10:15:05 AM:   /opt/build/repo
10:15:05 AM: ​
10:15:05 AM: ❯ Config file
10:15:05 AM:   /opt/build/repo/netlify.toml
10:15:05 AM: ​
10:15:05 AM: ❯ Context
10:15:05 AM:   production
10:15:05 AM: ​
10:15:05 AM: ❯ Installing plugins
10:15:05 AM:    - netlify-plugin-submit-sitemap@0.2.3
10:15:05 AM:    - @netlify/plugin-sitemap@0.8.1
10:15:10 AM: ​
10:15:10 AM: ❯ Loading plugins
10:15:10 AM:    - netlify-plugin-submit-sitemap@0.2.3 from netlify.toml
10:15:10 AM:    - @netlify/plugin-sitemap@0.8.1 from netlify.toml
10:15:10 AM: ​
10:15:10 AM: ────────────────────────────────────────────────────────────────
10:15:10 AM:   1. build.command from netlify.toml                            
10:15:10 AM: ────────────────────────────────────────────────────────────────
10:15:10 AM: ​
10:15:10 AM: $ rm -rf /opt/build/cache && hugo --gc --minify
10:15:11 AM: Start building sites …
10:15:11 AM: hugo v0.85.0-724D5DB5+extended linux/amd64 BuildDate=2021-07-05T10:46:28Z VendorInfo=gohugoio
10:20:22 AM: Canceling deploy

You can see it here:

10:15:01 AM: Installing Hugo 0.89.4
10:15:03 AM: hugo v0.89.4-AB01BA6E+extended linux/amd64 BuildDate=2021-11-17T08:24:09Z VendorInfo=gohugoio

However it then uses a different version to build:

10:15:10 AM: $ rm -rf /opt/build/cache && hugo --gc --minify
10:15:11 AM: Start building sites …
10:15:11 AM: hugo v0.85.0-724D5DB5+extended linux/amd64 BuildDate=2021-07-05T10:46:28Z VendorInfo=gohugoio
10:20:22 AM: Canceling deploy

While of course in the netlify.toml the correct version is specified:

[context.production.environment]
HUGO_VERSION = "0.89.4"
GO_VERSION = "1.17.3"
HUGO_ENV = "production"
HUGO_ENABLEGITINFO = "true"

I only have two plugins installed:

[[plugins]]
package = "@netlify/plugin-sitemap"

[[plugins]]
  package = "netlify-plugin-submit-sitemap"

And I had the very same issue even BEFORE when I had many plugins.
I went over in the last weeks and deleted all of them but these two.

Can you help us? It’s getting very annoying having to go to the pipeline and make sure it didn’t get stuck at some point again.

Hi, @champagnealexandre. I see that the plugin was removed from this site and that there were two successful build in a row, the first of which loaded a cache which was 162.4 MB in size. In other words, it looks like the issue is resolved.

If not, would you please trigger a new deploy that does hang and let us know what time that happened (or what the deploy id is)?

Hi, @alberto98fx. We would be happy to take a look at your site as well. However, you didn’t tell us which site that is. Would you please tell us the site subdomain or its API ID?

You can post that information publicly or you can private message (PM) that to one of our support staff. I’ve confirmed that PMs are enabled for your forum login. Please keep in mind that only one person can see the PM and this will likely mean a slower reply than posting the information publicly. Please feel free to reply to however you prefer though.

Hi @luke,
Thank you for your reply!

Here’s my site ID: 52a2dd86-b092-49c0-8ac5-1b493d5b4b09

Thank you

not at all, see cancelled deploy at Dec 13 at 8:33 PM

Well in that case, could any one of you (or more), share their repos? We would like to have a reproduction for this in case we were to escalate this to the engineers.

Hi @hrishikesh @luke , I share some deploys IDs that got stuck:

61ba1afa4937e1491f6fcb00
61ba1b41d9e13b3fa70a2635

Original:
61ba19b05791c8000743c890

Retries of c890 here ^ :

OK: 61ba1d528d5b4341e8aafd14
OK: 61ba1d96fae0db447c801590
NOT OK (Didn’t even start, stuck at Build Ready to start for 3 mins) : 61ba1db981f95742e78a50b7
NOT OK (Failed like above ^): 61ba1db981f95742e78a50b7
Cleared cache and retried, OK: 61ba1ec6272c30443a3d8dfc
OK: 61ba1eebe9ea254556f4541d

NOT OK, stuck at Hugo build like @champagnealexandre 61ba1f354937e153e86fc52d

This is the VERY SAME deployment.
Cleared cache, restarted many times and got issues most of the times

OK total: 4
NOT OK total: 3
Out of 7 builds 3 had issues.

This is annoying, please help us
Thanks!

@hrishikesh there you go

@hrishikesh you can compare with this repo, another hugo site I’m maintaining, which doesn’t have a similar problem

@hrishikesh I did clear the cache after installing the problem and am still experiencing the same issue:

https://app.netlify.com/sites/objective-lewin-eed8b3/deploys/61bb76fbdde16f00071be28b

Interesting, I tried that repo and the build works fine every time.

Check it out here:

https://app.netlify.com/sites/naughty-euler-4802f5/deploys

Was there a specific change after which you started noticing their behaviour?

Humm this is indeed weird! Some configuration in our netlify account got messed up or something then? If the repo works…

Have you tried modifying a file from the repo before rebuilding?

And no, no specific change at all…

I had not tried it, but now I did. I edited this file:

The site was built. However, I don’t see any changes on the site. Is that expected?

Could you link us to the first deploy which had this problem?

That’s expected. You’d have to change files in the content folder. But I’m guessing this is unrelated then.

Looking at the deploy log, I suppose problems started with this deploy: Netlify App

Just curious, since all of you’re using Hugo, does this problem exist with using a different Hugo version (possibly the latest v0.91.0)?

No idea, I’m new to Hugo — do you know how to update the version deployed on Netlify?