I have a Gatsby site uploading for over an hour

Using Gatsby Cloud to build - it took around 31 minutes to deploy to Netlify with an integration. Its now been trying to upload in the deploy for over 1 hr. Perhaps its timed out - there’s no message.

Is there a way i can let you know the project without posting it here as its not really for public consumption

here is our team name: rca-p3
i’ve checked a couple of sites we are actively sending builds to from GatsbyJS.com. They get sent to netlify ok, but are stuck on uploading for many hours. Some manage to upload, others are never ending. Any help would be fantastic.

Hey @amcc,

So, unfortunately, I think your site may be a bit on the larger site and thus is testing the capabilities of our Drop feature.

You may wish to check out this support guide on the topic! If you have any Qs, just ask :slight_smile:

Thanks for the reply - we aren’t directly using the drop feature, we are building with GatsbyJS.com - its linked to Netlify via an ‘Integration’ and it automatically deploys to Netlify, perhaps it does use this feature - but we do need to get it reliable if possible.

Since cancelling all the stuck deploys most now deploy ok, some get stuck.

The website is for a degree show for the Royal College of Art in the UK - its a big project (up to 1000 students uploading up to 100 files each, not all students are going to participate and most far fewer - also we’re using gatsby to optimise all the images). However its definitely a big site.

For now we are using a regular webhook request on gatsby to enable incremental builds and have the site building every 30 minutes while students upload so they can see a preview. The results are here: https://app.netlify.com/sites/rcapreview/deploys and its been working very well for a few hours - you can see a few failed deploys, these are where it got stuck and I cancelled them.

We will probably be using this site for the live version: https://app.netlify.com/sites/rca2020/overview and will be switching this to the live subdomain next week. Can you let us know whether using Netlify Enterprise will be necessary, we are strongly considering it, its primarily the support we wanted to do this for, but its vital that its reliable.

all the best


Appreciate you sharing the workflow and intentions. Out of curiosity, if you build directly on Netlify, do we encounter similar issues? Is this a potential workflow?

Dissecting the issue, I’m confident that the issue is the integration (which, unfortunately, I’m not too familiar with). I never want to offer advice which suggests that somebody should drastically alter their workflow or use our solution over somebody else’s however, at this stage, I think it’s worth at least testing (if possible) especially with a couple of buildtime-saving plugins like this.

P.S. It’s safe to assume that, if an upload doesn’t complete within 10 minutes, it’s timed out. However, as we don’t log a Drop build, it won’t appear in the console :clock10:.

Thanks for the reply - Netlify is failing to build our site. i’m getting this:
Build exceeded maximum allowed runtime

There’s also an error after that around processing a png - but i think thats because the time ran out before and it probably stopped half way through making a thumbnail.

The gatsby plugin will be very useful - however I doubt that is going to help the very first build as there’s no cache at that point - from then on it will definitely help.

Currently we’ve around 8000 remote files which create about 35,000 image thumbnails and 3500 pages. I’d like to give you the exact site that this is referring to, but its named in a way that gives the game away so i’d rather not put it in the forum.

We have a pro account and will be doing very little building here, but currently can’t get the site online - GatsbyJS.com builds it in about 25mins currently. But wont deploy it properly!

Interesting! Okay, the Build exceeded maximum allowed runtime error is something we can remediate. If you’re happy, we can bump your timeout to, say, 45 minutes in order to at least give the build a fighting chance.

If you can confirm the site name, I’ll get that upped for ya :+1:!

if you can do it to all sites in this team: “rca-p3” that would be very handy - we are only going to be using one site permanently for the site, but we’ve a test one we are trying things out on. We are only going to build one at a time i expect. If not I’ll give you individual site names

Hey @amcc, I’ve updated the team to a 45 minute timeout. Let me know how this goes :sunglasses:!

thats amazing - will try a build now

1 Like

if i want to show you a particular build that would be very useful - is there a way of doing it without mentioning the sitename in the forum. its a bit sensitive prior to release, can i show you an APP ID instead or is that dangerous. I want to show the output - its working and getting as far as this right now:

7:11:22 PM: success run page queries - 1407.944s - 3476/3476 2.47/s
7:11:22 PM: success write out requires - 0.279s
7:12:43 PM: success Building production JavaScript and CSS bundles - 81.278s
7:12:44 PM: success Rewriting compilation hashes - 0.003s

The build started at 6:43 so we are getting quite close to a limit perhaps. We still have people uploading to the site for the next 2 days, beyond that its capped, but there may be a 10-20% increase perhaps.

The build failed again for the same reason see below:
7:11:22 PM: success run page queries - 1407.944s - 3476/3476 2.47/s
7:11:22 PM: success write out requires - 0.279s
7:12:43 PM: success Building production JavaScript and CSS bundles - 81.278s
7:12:44 PM: success Rewriting compilation hashes - 0.003s
7:43:36 PM: Build exceeded maximum allowed runtime

Looks like its getting close. BTW we are able to build locally and upload via the CLI - this is occasionally running into the error below, but after a couple of attempts we managed to deploy:

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

⡀ CDN diffing files… TextHTTPError: Bad Gateway

In order of preference we’d like to do the following

  • build via gatsby and deploy to you (gatsby is doing a build in 20 mins
  • build via you and deploy - getting “Build exceeded maximum allowed runtime”
  • Use the CLI, but obviously not quite so convenient, and as this is getting some errors i feel we’re close to a limit here too

Hey there @amcc!

I can see the ‘test site’ in your team which you’re using to try and get this built. So, on Netlify, we’re still timing out at the Generating image thumbnails - 3315.531s stage. I don’t think this is hanging; I think it’s just taking its sweet time. We could up the limit again because I strongly believe that, once we get the site built and if we can cache this data, we’re rocking.

It’s been a while since I’ve messed with Gatsby but I’m sure there’s an option to stop this build stage or replace the images with thumbnails… I think this is it.

As for the CLI builds, the 502 is a known bug for larger sites (unfortunately :slightly_frowning_face:). It’s discussed here with a potential workaround in this comment.

we are still timing out!

i’m trying a few options with removing a lot of image processing just to get things working for now. These builds do work on GatsbyJS without issue, guessing there is something different going on there.

We can also successfully deploy via the CLI, but its a slow process

I can also appreciate that builds do work over at Gatsby. Like you say, their environment will be different to ours.

Timing out is just the worst. But, you’re not alone and, as such, we’ve got a blog post to outline some of the key things to try. I’ve got no issue upping the timeout if the optimisations don’t get us under 45 minutes.

i’ve done some optimisations and have had a deploy work. We are getting more uploads on this site for the next 24 hours - after that certain things are being frozen before launch. If you can up the timeout to whatever we can reasonably have as a max for a pro account that would be very useful. We have a week of trying to get various versions live for launch then its probably going to be dormant

1 Like

Hey @amcc,

I’m just seeking approval for a 1 hour timeout for you. If this needs upping again in future, I’d suggest that you reply to the Helpdesk ticket which we’ve ran parallel with this post.

On a similar note, if you have any further Qs (now we have a few different successful builds) if you could ask them in the Helpdesk ticket, it’ll be easier for the wider team to keep tabs :smile:!