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

[Bug]: Too many open files @ rb_sysopen #394

Open
peter-albrecht opened this issue Apr 27, 2023 · 6 comments · Fixed by #396
Open

[Bug]: Too many open files @ rb_sysopen #394

peter-albrecht opened this issue Apr 27, 2023 · 6 comments · Fixed by #396
Assignees
Labels
bug Something isn't working

Comments

@peter-albrecht
Copy link

Feature id and version

ghcr.io/devcontainers-contrib/features/mysql-homebrew:1

Devcontainer base Image

mcr.microsoft.com/devcontainers/typescript-node:0-18

What happened?

When trying to launch a Dev Container with MySQL i get a "Too many files open" error.

Relevant log output

#0 340.8 ==> Pouring mysql--8.0.32.x86_64_linux.bottle.tar.gz

#0 355.5 Error: Too many open files @ rb_sysopen - /home/linuxbrew/.linuxbrew/Cellar/mysql/8.0.32/lib/plugin/libtest_sql_stmt.so

#0 355.8 Traceback (most recent call last):
#0 355.8   File "<string>", line 1, in <module>
#0 355.8   File "nanolayer.__main__", line 50, in main
#0 355.8   File "typer.main", line 328, in __call__
#0 355.8   File "typer.main", line 311, in __call__
[2023-04-27T18:14:21.315Z] #0 355.8   File "click.core", line 1130, in __call__
#0 355.8   File "typer.core", line 778, in main
#0 355.8   File "typer.core", line 216, in _main
[2023-04-27T18:14:21.316Z] #0 355.8   File "click.core", line 1657, in invoke
#0 355.8   File "click.core", line 1657, in invoke
#0 355.8   File "click.core", line 1404, in invoke
#0 355.8   File "click.core", line 760, in invoke
#0 355.8   File "typer.main", line 683, in wrapper
[2023-04-27T18:14:21.316Z] 
#0 355.8   File "nanolayer.cli.install", line 64, in install_devcontainer_feature
#0 355.8   File "nanolayer.installers.devcontainer_feature.oci_feature_installer", line 131, in install
#0 355.8   File "nanolayer.utils.invoker", line 56, in invoke
#0 355.8 nanolayer.utils.invoker.Invoker.InvokerException: The command 'cd /tmp/tmp0rj5i62t && chmod +x -R . && _REMOTE_USER="node" _REMOTE_USER_HOME="/home/node" PACKAGE="mysql" VERSION="latest" INSTALLATION_FLAGS="" NANOLAYER_VERBOSE="" NANOLAYER_FORCE_CLI_INSTALLATION="" NANOLAYER_PROPAGATE_CLI_LOCATION="1" NANOLAYER_CLI_LOCATION="/tmp/nanolayer-EwEMws8V9q/nanolayer" bash  -i  +H ./install.sh' failed. error: Return Code: 1. see logs for details.
#0 355.9 Sentry is attempting to send 2 pending error messages
#0 355.9 Waiting up to 2 seconds
#0 355.9 Press Ctrl-C to quit
[2023-04-27T18:14:21.316Z] #0 356.0 ERROR: Feature "MySQL (via Homebrew)" (ghcr.io/devcontainers-contrib/features/mysql-homebrew) failed to install! Look at the documentation at http://github.com/devcontainers-contrib/features/tree/main/src/mysql-homebrew for help troubleshooting this error.
@peter-albrecht peter-albrecht added the bug Something isn't working label Apr 27, 2023
@danielbraun89 danielbraun89 self-assigned this Apr 29, 2023
danielbraun89 added a commit that referenced this issue Apr 29, 2023
Fixes #394
@danielbraun89 danielbraun89 mentioned this issue Apr 29, 2023
@danielbraun89
Copy link
Member

danielbraun89 commented Apr 29, 2023

@peter-albrecht thanks for reporting!
The open file limit cannot be updated from the context of feature building (not privileged)
Therefore a workaround was to install mysql in two phases , first with --only-dependencies flag , and then the mysql package itself.
(This seems to solve mysql for now , but for other large packages like ffmpeg even this is not enough. will have to revisit this later)
please try latest version (`ghcr.io/devcontainers-contrib/features/mysql-homebrew:1.0.16) for the fix

danielbraun89 added a commit that referenced this issue Apr 29, 2023
@peter-albrecht
Copy link
Author

Thanks for the fast fix. It works 🚀

@lumeyisnotyou
Copy link

Hi! This bug seems to have returned, even while using the mentioned feature version, the same bug occurs.
Here's my building log:

[2023-06-14T01:16:28.535Z] ==> Installing mysql dependency: cyrus-sasl
[2023-06-14T01:16:28.774Z] ==> Pouring cyrus-sasl--2.1.28_1.x86_64_linux.bottle.tar.gz
[2023-06-14T01:16:31.362Z] Error: Too many open files @ rb_sysopen - /home/linuxbrew/.linuxbrew/Cellar/cyrus-sasl/2.1.28_1/sbin/saslauthd
[2023-06-14T01:16:31.602Z] Traceback (most recent call last):
[2023-06-14T01:16:31.602Z]   File "<string>", line 1, in <module>
[2023-06-14T01:16:31.602Z]   File "nanolayer.__main__", line 50, in main
[2023-06-14T01:16:31.602Z]   File "typer.main", line 328, in __call__
[2023-06-14T01:16:31.602Z]   File "typer.main", line 311, in __call__
  File "click.core", line 1130, in __call__
[2023-06-14T01:16:31.602Z] 
[2023-06-14T01:16:31.602Z]   File "typer.core", line 778, in main
  File "typer.core", line 216, in _main
[2023-06-14T01:16:31.602Z]   File "click.core", line 1657, in invoke
[2023-06-14T01:16:31.602Z]   File "click.core", line 1657, in invoke
[2023-06-14T01:16:31.602Z]   File "click.core", line 1404, in invoke
  File "click.core", line 760, in invoke
[2023-06-14T01:16:31.603Z]   File "typer.main", line 683, in wrapper
  File "nanolayer.cli.install", line 64, in install_devcontainer_feature
[2023-06-14T01:16:31.603Z]   File "nanolayer.installers.devcontainer_feature.oci_feature_installer", line 131, in install
  File "nanolayer.utils.invoker", line 56, in invoke
nanolayer.utils.invoker.Invoker.InvokerException: The command 'cd /tmp/tmppilbjpiu && chmod +x -R . && _REMOTE_USER="node" _REMOTE_USER_HOME="/home/node" PACKAGE="mysql" VERSION="latest" INSTALLATION_FLAGS="" NANOLAYER_VERBOSE="" NANOLAYER_FORCE_CLI_INSTALLATION="" NANOLAYER_PROPAGATE_CLI_LOCATION="1" NANOLAYER_CLI_LOCATION="/tmp/nanolayer-YIKcN33pAA/nanolayer" bash  -i  +H ./install.sh' failed. error: Return Code: 1. see logs for details.
[2023-06-14T01:16:31.703Z] Sentry is attempting to send 2 pending error messages
Waiting up to 2 seconds
Press Ctrl-C to quit
[2023-06-14T01:16:31.791Z] ERROR: Feature "MySQL (via Homebrew)" (ghcr.io/devcontainers-contrib/features/mysql-homebrew) failed to install! Look at the documentation at http://github.com/devcontainers-contrib/features/tree/main/src/mysql-homebrew for help troubleshooting this error.```

@danielbraun89
Copy link
Member

danielbraun89 commented Jun 14, 2023

@lumeyisnotyou thanks! reopening

@danielbraun89 danielbraun89 reopened this Jun 14, 2023
@danielbraun89 danielbraun89 changed the title [Bug]: [Bug]: Too many open files @ rb_sysopen Jun 14, 2023
@fvcoder
Copy link

fvcoder commented Nov 21, 2023

Did anyone find the solution?

I have the same problem.

or is there another way to do it?

@evilhamsterman
Copy link

This project is not associated with the devcontainer project and appears to have been abandoned #628 . The official project has removed all devcontainer-contrib features from their listing. devcontainers/devcontainers.github.io#451. There is a fork that is being worked on to update and maintain the features https://github.com/devcontainers-extra/features

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants