deployphp / deployer

The PHP deployment tool with support for popular frameworks out of the box
https://deployer.org
MIT License
10.64k stars 1.49k forks source link

Deployer cannot handle magento 2 static content deploy with multiple jobs #3898

Closed arditza closed 2 months ago

arditza commented 2 months ago

Discussed in https://github.com/deployphp/deployer/discussions/3897

Originally posted by **arditza** September 17, 2024 ### Deployer Version v7.3.3 ### Target OS CentOS Linux 7 (Core) ### Which PHP version are you using? PHP 8.1 ### Content of deploy.php or deploy.yaml ```php 'true', 'DO_NOT_SHOW_BANNER' => 'true', ]); // Project name set('application', 'deployer-magento2'); // Increase the default timeout of 10000 set('default_timeout', 10000); // Deploy without setting maintenance mode if possible set('enable_zerodowntime', false); // reindex if necessary set('enable_reindex', false); // deploy static content per separate language set('separate_content_language_deploy', false); // always run setup upgrade as this seems to not work properly set('database_upgrade_needed', true); // Use composer installed by Synoa set('bin/composer', "{{bin/php}} ~/bin/composer"); set('writable_use_sudo', false); set('keep_releases', 3); add('shared_files', [ 'auth.json' ]); // deploy.php set('static_content_locales', 'de_DE en_US en_GB fr_FR it_IT pl_PL es_ES'); set('separate_content_language_deploy', false); set('bin/php', 'php -d allow_url_fopen=on -d memory_limit=8G'); set('static_content_jobs', '3 -vv'); host('prd') ->set('hostname', $hostPrd) ->set('remote_user', $userPrd) ->set('branch', $branchPrd) ->set('deploy_path', "/home/$userPrd/magento2") ->set('static_content_jobs', 3) ->set('repository', $repo); ``` ### Steps to reproduce Magento version: 2.4.5-p5 php: 8.1 Applied magento patch for the static content deployment https://github.com/magento/magento2/commit/12a9eacaf57baf1dbd71b22cbd9ada32f3ffa479 When deploying a magento project with the magento2 recipe, the static content deployment `magento:deploy:assets` fails when using multiple jobs `php -d allow_url_fopen=on -d memory_limit=8G bin/magento setup:static-content:deploy --content-version=123456789 de_DE -j 3 --exclude-theme Magento/luma` with the following error message: **exit code 141 (Write to pipe with no one reading)** . Everything works ok when removing the jobs parameter `-j 3`. Also the above command `php -d allow_url_fopen=on -d memory_limit=8G bin/magento setup:static-content:deploy --content-version=123456789 de_DE -j 3 --exclude-theme Magento/luma` works properly when running it directly on the server when connected via ssh. To me it looks like the deployer recipe for some reason cannot handle multiple jobs on the static content deployment or i am missing some sort of configuration which i cannot figure out. Any feedback would be very much appreciated

Upvote & Fund

Fund with Polar

github-actions[bot] commented 2 months ago

This issue has been automatically closed. Please, open a discussion for bug reports and feature requests.

Read more: https://github.com/deployphp/deployer/discussions/3888