[Support Guide] How can I optimize my Netlify build time?

What’s the best way to make this request? As a free account holder, I get blocked from submitting a question via the support form. Is here, in these public comments the place? We’re looking to enable this flag so we can keep the number of builds and build times down (id: f60aa81f-5573-4435-9c72-c50a7922aa52) Thanks!

hi bcg, yes, this is the place. What is your netlify name?

Hi @perry. Great. When you ask for “Netlify name” are you looking for owner name? If so, it’s customerservice-9qalqs. Cheers.

Thanks so much! I think I have that disabled for you - could you confirm if you see no automatic builds triggered for your next commit?

@fool Yup, I think you got it. Appreciate your and @perry’s help!

1 Like

Hi @fool could you disable the continuous integration for 65146f80-0dc6-46a2-a52d-24cb1c381e70? We would only like to build the website manually using the build hook. Thx!

hi there,

we switched off your continuous integration as requested. Let us know in a separate post if you need anything else!

Thanks!

Hmm, we started getting intermittent Bad Gateway 502 errors on the same date that you made the change. It happens during the CDN diffing step:

  • CDN diffing files…
    › Warning: TextHTTPError: 502
    › Warning:
    › TextHTTPError: Bad Gateway

    TextHTTPError: Bad Gateway
    at NetlifyAPI.createSiteDeploy (/app/landing/node_modules/netlify/src/open-api/index.js:173:13)
    at async module.exports (/app/landing/node_modules/netlify/src/deploy/index.js:77:16)
    at async NetlifyAPI.deploy (/app/landing/node_modules/netlify/src/index.js:108:12)
    at async DeployCommand.run (/app/landing/node_modules/netlify-cli/src/commands/deploy.js:158:17)
    at async DeployCommand._run (/app/landing/node_modules/@oclif/command/lib/command.js:44:20)
    at async Config.runCommand (/app/landing/node_modules/@oclif/config/lib/config.js:151:9)
    at async Main.run (/app/landing/node_modules/@oclif/command/lib/main.js:21:9)
    at async Main._run (/app/landing/node_modules/@oclif/command/lib/command.js:44:20)

Could it be related?

It looks like our team is bumping up against the threshold allotted for Open Source projects. We build and run e2e tests using CircleCI before accepting a pull request; is it possible, using the Netlify API, to publish a “Deploy Preview” from Circle CI?

The hope being that there’s no reason to build our application multiple times on different platforms and that this could save us some build minutes.

If not, CircleCI has a “Manual Approval” workflow that we use to gate expensive tasks. Is there a mechanism for kicking off a deploy preview manually from a GitHub status check?

@fool @perry Yikes, this 502 error is happening a lot, I don’t see it in the logs before Feb 10. Is there any reason that they could be connected?

@fool I’m sorry to bother, but our client actually wants the continuous integration enabled again for 65146f80-0dc6-46a2-a52d-24cb1c381e70. Could you manage to do that for us? Thanks in advance!

Doesn’t seem like 502’s would be related, no, @salmonax. 502 usually means that you have a very large site that isn’t being synced fast enough. You could try adding a --timeout 900 flag with your CLI usage to see if it helps.

heya @dannyrb , sure - you can publish from Circle but the most obvious path would be to use our cli to publish it directly, sending the already-built files from Circle. The default netlify deploy publishes in “draft” mode which is what some call a deploy preview (but the URL will be something like https://hash--yoursitename.netlify.com rather than the “usual” deploy-preview-xyz--sitename.netlify.com") - regardless, it is not published at your production URL automatically which is what I think you are after :slight_smile: You could also choose to trigger a build only via Circle - but it’d be for HEAD on whatever branch, rather than the specific commit that Circle built. You’d use that via an incoming build hook which we can configure to build even when the “usual” automatic commit-based deploys are turned off.

I’d use the second workflow to “gate” those deploys - only build on certain conditions, which you can check for at Circle.

Let me know what you think, and I can help reconfigure (either removing the repo link entirely so you MUST publish with the CLI, or deconfiguring automatic builds in favor of webhooks you configure).

1 Like

Sure, tis done, @marcveens !

1 Like

@fool Thanks for the help, timeout worked for the 502. We’re changing our pipeline a bit, though and I think we’d like to turn native CI back on. ^^; App ID was 325b803a-d3c8-4d2e-9b1c-5c6a34025923.

Done, automatic deploys have been re-enabled.

Please also disable CI on my site.
API ID: 0b970c7b-d015-4cad-bdc1-c7e76e11f371
Thank You.

Sure thing, @ougijun, tis done. You can still deploy via CLI or by pressing the “trigger deploy” button in our UI on your deploy listing page.

1 Like

Sorry to bother you again. Is there a way to manually trigger the build + deploy from Netlify’s UI? I want to build and deploy only at specific times, while disabling all automated build + deploy actions. Thanks!