Deploy error: Command did not finish within the time limit

I need advice to debug deploy https://app.netlify.com/sites/zealous-lamarr-09041b/deploys/5e4d353ed8c95100090b6860

What could be the issue, the line it points to is below code, how can i fix it Please advise:

const maxNumber = 120; 

  const arrayNumber = [];  

  for (let i=0; i<12;i++){ 

  const randomNumber = Math.floor((Math.random() * maxNumber) + 1);       

  if(arrayNumber.indexOf(randomNumber)===-1){

    arrayNumber.push ( randomNumber )

  }

  }

hi there! Does this work locally? That would be the first thing to check.

We generally do not have the ability to help you debug your code like this - we focus on assisting customers with issues relating to the netlify platform.

Hi Perry, thank you for your reply. I disabled the code where I was getting error and retry the deploy it’s not deployed and there is no build error as well can you please advise what should I do.

https://app.netlify.com/sites/zealous-lamarr-09041b/deploys/5e4d591b054830fd2595b221

Hi Perry, can you please check. I am waiting for your response. I need to get it deployed today.

Hello @perry I tried to redeploy but it failed during stage ‘building site’: Command did not finish within the time limit I have tried to build locally both times its buidling without any error. Can you allot more time for building. I would appreciate if you can check this as I have to report its deployment. I hope you understand. https://app.netlify.com/teams/expatguideturkey-official/builds/5e4e46c52fbc0400086f5f92

I compared my local build time below is the screenshot:

image

But If I see the Netlify Deploy Log it takes more than double time, what could be the reason

1:04:23 PM: info Done building in 970.147 sec

Hi there, thanks for sharing all this info. Based on the size and number of files in your build, it looks like the deploy is not able to complete in 15 minutes, which is the deploy time cutoff for our free product. There’s a bit more information in this response:

Some things you could look into would be:

  • storing your large files externally (like an S3 bucket) and linking to them in your site so your site doesn’t have to incorporate them into every build and deploy
  • checking out Netlify Large Media

Want to take a look and let us know what questions you have?

Thank you for your reply. As you mentioned that 15min is a deploy cutoff time for your free product. If I purchase your pro package how much would be the deploy cutoff time as it’s not mentioned on your pricing page. Can you please clarify this and once I purchase your pro package will it solve this issue.

@jen I am trying to push the already build site from github so that server does not have to work to generate content, images or build html files. But unfortunately, again the build exceeded maximum allowed runtime below is the link to my recent deploy log. Can you please advise, why its trying to rebuild when its already build with all the content.

https://app.netlify.com/sites/zealous-lamarr-09041b/deploys/5e4f9ef1094ed70007e160b2

In this circumstance, we can give you an additional 15 minutes of build time but you will need to add a payment method in case you go beyond 30 minutes per build. Please take a look at this Build Minutes FAQ and note how you are charged for build minutes:

And note this part in particular: “the time spent on failed builds may still be applied to your total build minutes.”

If you’d like to learn more about optimizing your build times, have a look at these:

You can add a payment method in the Netlify UI here:
https://app.netlify.com/teams/expatguideturkey-official/billing/general#billing-details

Please let us know when you’ve completed that and we’ll apply the build minutes to your account.

Thank you for your reply @jen I have updated my payment method. Can you please add 30 minutes cutoff time for the per build and also please suggest which option is better. The way I was doing before https://app.netlify.com/sites/zealous-lamarr-09041b/deploys/5e4d591b054830fd2595b221 which took 17 minutes or the way I did in my last build https://app.netlify.com/teams/expatguideturkey-official/builds/5e4e46c52fbc0400086f5f92 as the time is not mentioned here. I can not decide which option would be better.

Hi, we’ve made the change to your “zealous-lamarr-09041b” site that should now allow your builds to run up to 30 minutes. Can you test to see if that gets your builds succeeding? Regarding how you are building, it’s really up to you as long as it completes within the build time limit (which is now 30 minutes). Let us know how it goes.

Than you so much @Dennis I have successfuly deployed the site. I was checking my build status from past three days it shows 255 min used whereas I have deployed my site twice after this but it doesn’t show the realtime status of build mins that I have already used. Can you please check this.

Hi, @expatguideturkey.off, the Build Insights data does update only once per day.

@jen @Dennis - is it possible to increase the timeout limit on both eatclub-website and crave-website to 30 minutes? I am experiencing a similar problem.

Yes, we can do that @sjl! As I mentioned above, please add a payment method in case you go beyond 30 minutes per build and take a look at the Build Minutes FAQ I linked up there. You can add a payment method in the Netlify UI here:
https://app.netlify.com/teams/YOUR-TEAM/billing/general#billing-details

Could you also please link full site names so we’re sure to apply to this time limit increase to the right sites?

Hey @jen, sure thing, thank you for helping:

https://eatclub-website.netlify.com/
https://crave-website.netlify.com/

We’ve gone ahead and made that change for both sites. Please let us know if you run into any issues :slight_smile: