Giter VIP home page Giter VIP logo

Comments (7)

erikhansen avatar erikhansen commented on May 31, 2024 1

@avra911 Since it doesn't happen consistently, then it's almost certainly not an issue with the capistrano-magento2 Gem, but rather something in your server configuration that is being triggered by the deployment process. I just saw the edit you made to the commend above and I agree with your assessment. I would recommend closing this issue.

from capistrano-magento2.

davidalger avatar davidalger commented on May 31, 2024 1

@avra911 I've added a setting so this argument can be configured. Details can be found in the readme and/or the above commit.

I opted to default to nil which leaves the default at whatever the default is for bin/magento as the --jobs setting is only actually available in Magento 2.1.1 and later. This allows me to issue a warning if someone tries to use the setting on an unsupported version of Magento, and also keeps the default in line with whatever the Magento platform sets it to in the future (although I don't see it changing).

The underlying bug you're running into is definitely a Magento core issue (so keep that Magento issue open!), but to workaround it in the meantime, you can now add the following to your config.rb:

set :magento_deploy_jobs, 1

from capistrano-magento2.

erikhansen avatar erikhansen commented on May 31, 2024

@avra911 A couple of things you might try:

  1. Try re-running the Capistrano deploy command to see if the issue is reproducible. The error is happening when cache data is being saved to Redis, so it could very well be a glitch that may not happen again if you try to re-deploy.
  2. If you are still getting the same error, when the error occurs, SSH into the environment, cd to the failed release directory (e.g. cd /var/www/magento/releases/20170221151910/) and run the exact setup:static-content:deploy command that Capistrano tried to run to see if you can reproduce the error. You can find the exact command in the log/capistrano.log file.

from capistrano-magento2.

avra911 avatar avra911 commented on May 31, 2024

Hi, @erikhansen

Thank you very much for the fast feedback on this.

  1. Re-running capistrano deploy gives errors most of the times, see: http://nimb.ws/dTZ5JQ. The error is random, but >80% of the times it fails in a particular project only, it did not happened in any other sites/projects. However what I discover is that sometimes is a different file from static-content which fails, it not always js-translation.json. The command which failed was bin/magento setup:static-content:deploy en_US, reproducible even outside capistrano, by running ssh [email protected] /usr/bin/env php -f /path_to_site/bin/magento -- setup:static-content:deploy en_US | stdbuf -o0 tr -d ..

  2. If I logged in to the server where the site is located, manually running the command which failed, it is always a success, it never fails, so it means it is only effecting while using remote command. I tried multiple times and it was always working directly from magento. I even created all the steps which deploys is doing, in order to reproduce it, but no luck.

Is a bit weird and I wanted some other feedback, tomorrow I will try to debug exactly that error (by adding some extra dump to the output) and get more details.

Best regards!

PS: I thought it might not be related to magento, because I discovered it while using capistrano, but now I doubt about that. Now I think it might not be related at all to capistrano.

from capistrano-magento2.

avra911 avatar avra911 commented on May 31, 2024

Sure, @erikhansen, thanks a lot!

from capistrano-magento2.

avra911 avatar avra911 commented on May 31, 2024

Hi, @erikhansen

I am reopening the issue because it seems a workaround might be to set the number of jobs for the static content deploy to 1, by using --jobs (-j) which, from magento docs it means: Enable parallel processing using the specified number of jobs. The default is 4. To cause the task to run in one process (for example, if your system does not support process forking), use --jobs 1.

Would be nice to have the option to set that in deploy.rb parameters, with a default: 1 (for example named magento_deploy_jobs).

from capistrano-magento2.

PascalBrouwers avatar PascalBrouwers commented on May 31, 2024

Actually it's an issue running Magento with Redis cache. See also: magento/magento2#8643 where the same solution is provided (-j 1)

from capistrano-magento2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.