Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to yarn start without sudo because of Error: EMFILE: too many open files #15750

Closed
SimonBrandner opened this issue Nov 16, 2020 · 2 comments
Labels

Comments

@SimonBrandner
Copy link
Contributor

Description

I've been attempting to run yarn start, but most of the time it failed with errors. It works only some time after boot. Though I have been able to run sudo yarn start without a problem. The README.md mentions inotify limits and ulimits. I am not experienced with these things but I followed the instructions. But I wasn't able to fix this.

Steps to reproduce

I was not able to reproduce this on my laptop. But this is what I had done on my PC:

git clone https://github.com/matrix-org/matrix-js-sdk.git
pushd matrix-js-sdk
yarn link
yarn install
popd
git clone https://github.com/matrix-org/matrix-react-sdk.git
pushd matrix-react-sdk
yarn link
yarn link matrix-js-sdk
yarn install
popd
git clone https://github.com/vector-im/element-web.git
cd element-web
yarn link matrix-js-sdk
yarn link matrix-react-sdk
yarn install
yarn start

Info

I am on Debian 11 Bullseye. This is the output of a few commands that could be useful.

As a regular user:

> uname -a
Linux Simon-s-PC 5.8.0-3-amd64 #1 SMP Debian 5.8.14-1 (2020-10-10) x86_64 GNU/Linux
> sudo sysctl fs.inotify.max_user_watches
fs.inotify.max_user_watches = 524288
> ulimit -a
-t: cpu time (seconds)              unlimited
-f: file size (blocks)              unlimited
-d: data seg size (kbytes)          unlimited
-s: stack size (kbytes)             8192
-c: core file size (blocks)         0
-m: resident set size (kbytes)      unlimited
-u: processes                       46482
-n: file descriptors                8192
-l: locked-in-memory size (kbytes)  unlimited
-v: address space (kbytes)          unlimited
-x: file locks                      unlimited
-i: pending signals                 63664
-q: bytes in POSIX msg queues       819200
-e: max nice                        0
-r: max rt priority                 95
-N 15:                              unlimited
> yarn --version
1.22.5

With sudo su:

> sysctl fs.inotify.max_user_watches
fs.inotify.max_user_watches = 524288
> ulimit -a
-t: cpu time (seconds)              unlimited
-f: file size (blocks)              unlimited
-d: data seg size (kbytes)          unlimited
-s: stack size (kbytes)             8192
-c: core file size (blocks)         0
-m: resident set size (kbytes)      unlimited
-u: processes                       63664
-n: file descriptors                1024
-l: locked-in-memory size (kbytes)  2043392
-v: address space (kbytes)          unlimited
-x: file locks                      unlimited
-i: pending signals                 63664
-q: bytes in POSIX msg queues       819200
-e: max nice                        0
-r: max rt priority                 0
-N 15:                              unlimited
@SimonBrandner
Copy link
Contributor Author

I am closing this as it doesn't seem to be an element-web problem. I have the same problem with bibviz.

@SimonBrandner
Copy link
Contributor Author

I think I've solved the problem. Here's the answer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant