lando / drupal

The Official Drupal Lando plugin
https://docs.lando.dev/drupal
GNU General Public License v3.0
15 stars 16 forks source link

lando composer install is failing on Mac #104

Closed AdvaithRaj closed 4 months ago

AdvaithRaj commented 5 months ago

I am trying to run the lando composer install on mac and it is getting failed with the below exception.

Even i have increased the resource limit, ulimit -n 65535, but still getting the same error.

Could any one please help on the issue, i tried other version of lando installation but all failed with same issue when i run the lando composer install .

OS: SONOMA 14.4

Version details:

Composer version 2.7.2 2024-03-11 17:12:18 PHP version 8.1.27 (/usr/local/Cellar/php@8.1/8.1.27_1/bin/php) lando : v3.21.0 Docker Client: Cloud integration: v1.0.35+desktop.4 Version: 24.0.6 Server: Docker Desktop 4.23.0 (120376) Engine: Version: 24.0.6

Exception logs

28/29 [===========================>] 96% Failed to extract drupal/core: (50) '/usr/bin/unzip' -qq '/app/vendor/composer/tmp-1667549757f9a6b12959e9e06fbfeb78' -d '/app/vendor/composer/24728b4f'

error: cannot create /app/vendor/composer/24728b4f/drupal-core-8afcb23/modules/book/src/Cache/BookNavigationCacheContext.php Too many open files in system checkdir error: cannot create /app/vendor/composer/24728b4f/drupal-core-8afcb23/modules/menu_ui/config/install Too many open files in system unable to process drupal-core-8afcb23/modules/menu_ui/config/install/. error: cannot create /app/vendor/composer/24728b4f/drupal-core-8afcb23/modules/user/src/Controller/UserAuthenticationController.php Too many open files in system error: cannot create /app/vendor/composer/24728b4f/drupal-core-8afcb23/themes/olivero/templates/form/details.html.twig Too many open files in system

The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems)
Unzip with unzip command failed, falling back to ZipArchive class
Install of drupal/core failed

29/29 [============================] 100%

[RuntimeException]
The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems): ZipArchive::extractTo(/app/vendor/composer/24728b4f/drupal-core-8afcb23/modules/ckeditor5/css/media-alignment.css): Failed to open stream: Too many open files in system

[ErrorException]
ZipArchive::extractTo(/app/vendor/composer/24728b4f/drupal-core-8afcb23/modules/ckeditor5/css/media-alignment.css): Failed to open stream: Too many open files in system

reynoldsalec commented 5 months ago

@AdvaithRaj I think you'd need to increase the resource limit within the containerized environment, since composer is running within Docker.

Maybe try running lando ssh -c "ulimit -n 65535 && composer install"? Kind of strange I haven't heard about this before, but it could be that we need to take this into account with composer commands.

reynoldsalec commented 4 months ago

Going to close this out, but @AdvaithRaj definitely free to re-open or comment if you're still having this issue (see my last comment for some tips that might help).