Crashing my local Nginx instance

I’m running:

Bedrock
Sage 9 with Webpack
MacOS 10.13
Yarn 1.2.1
Nginx 1.12.1

Once I run yarn run start, it launches the browser window fine and loads on local host. After 5-10 seconds, without making any changes, the page tries to refresh then starts consuming memory until my Nginx server finally crashes or simply won’t load a page. The error in my logs is:

accept() failed (24: Too many open files)

It would seem that something in this build is continually opening connections without closing them but I have no idea why or where to look. Any ideas would be most helpful!

I am very experience with Nginx and sysadmin but not with Webpack.

Thanks,

Joe

1 Like

I have something similar. Again with MacOS and Sage9 with Webpack, but without nginx and usingnpm instead of yarn. If compile the assets and view the page on localhost it seems to be fine, but with npm run dev it quickly starts producing errors which seem to have as source failed to open stream: Too many open files in system. I’ve tried increasing the number of files ulimit -n 2048 but that merely puts off the moment of crash by a minute or 2.

I have essentially the same code running on a Sage 8 environment (i.e. with gulp) and that’s fine, but that no longer works with modern versions of node so I am trying to upgrade.

All suggestions for how to debug welcome

Hm, I had lots of issues with PHP-FPM in Docker on Windows. After updating to PHP7.4 (even when it isn’t used on production yet), fixed the issue for me. But this probably another issue.