Deployment of react app gets stuck because of lingering process

I’ve started a react app using create-react-app which I’ve deployed to netlify when I push to Bitbucket which worked great, until it didn’t. The following message occurs before timeout:

7:01:14 PM: ** WARNING **
7:01:14 PM: There are some lingering processes even after the build process finished:
7:01:14 PM: USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
7:01:14 PM: buildbot    1283 27.3  2.4 1317828 754316 ?      Sl   17:58   0:41 /opt/buildhome/.nvm/versions/node/v10.18.1/bin/node --max-old-space-size=2048 /opt/build/repo/node_modules/fork-ts-checker-webpack-plugin/lib/service.js
7:01:14 PM: Our builds do not kill your processes automatically, so please make sure
7:01:14 PM: that nothing is running after your build finishes, or it will be marked as
7:01:14 PM: failed since something is still running.
7:01:14 PM: 

I searched my project for fork-ts-checker-webpack-plugin, it only appears in package-lock.json as a requirement for react-dev-utils. I have not installed any new libraries between a commit that ended up being deployed and now, when it just doesn’t work.

The only thing, my app may grew in size as I added sone geojson files. I’m only mentioning this because I say this --max-old-space-size=2048

I don’t even know where to start to fix this …

hi there, welcome.
can you give this a read through and see if its helpful before we start debugging?

I did have a look at this post before but it seems unrelated to my issue as I’m not using Gatsby. Furthermore, the linked article in the second post is dead …

thanks for pointing out the broken link! we’ll take a look. it’s tough to stay on top of so many different docs and pieces of info :tired_face:

ok back to the issue at hand - can you share a link to your full deploy log please? I still think it has something to do with this issue. are you using a different ssg, if not gatsby?

here is my log
https://pastebin.com/7k61QXaY

I’m not using any ssg. It’s a react app created with create-react-app, pretty standard stuff.

ah. On the last line of your log we have the actual culprit (although not necessarily an explanation. your build isn’t completing within the allotted 15 minute time limit.

8:07:52 PM: Build exceeded maximum allowed runtime

More on that here:

I do feel sure that this is due to the lingering processes that aren’t terminating, so the code cannot get completed and pushed out to the edge nodes on our cdn.

I’ll let another support engineer with a deeper understanding of what the root cause may be weigh in here, but if i were you i would try and see if there is anything you can think of that might be causing the process to never complete.

Those logs show the build running out of javascript heap memory. It looks very similar to the issue here:

Would you please try adding the following environment variable and letting us know if that resolves the issue or not?

--max-old-space-size=4096

After Perrys posts I noticed that the build process takes ages even on my local machine. I’ve bloated the app with GeoJSON files like a crazy person. No wonder it times out on your CI. Will be moving the data to be delivered by functions from a DB now.

While adding the env variable as suggested did not help in my case, it was the size of the build causing my troubles which is why I marked lukes post as the solution.

Thank you Netlify support! :slight_smile:

1 Like