Issues when deploying static content on EFS

Submitted by Eric on Wed, 04/24/2019 - 17:29
Image
magento 2 theme

This article is about deploying the static content on EFS, but it can be NFS or anything over the network that might be slow.
And this article is another article about how annoying Magento 2 can be and how it wasn't built to be a scalable application.

Anyway, we have been getting several errors when running a static content deploy with the --jobs option:

magento setup:static-content:deploy --jobs 5

Right now each store only has one theme being used, but they are dependent on a base custom theme and also Magento blank theme. So once you run the command without --jobs it will deploy the blank theme, then the base theme and finally your theme.

But if you have several themes or even one on EFS, you will have some bottleneck as EFS is not very fast and it's all done over a NFS connection, so it won't be as fast as deploying on a local SSD and that's when you add the --jobs option to the static content deploy. But on EFS if you have several files to be deployed on each theme, it might take several minutes and that's when you get this nice error:

In Queue.php line 366:
                                                           
  Error while waiting for package deployed: 42; Status: 0  
                                                           

setup:static-content:deploy [-f|--force] [-s|--strategy [STRATEGY]] [-a|--area [AREA]] [--exclude-area [EXCLUDE-AREA]] [-t|--theme [THEME]] [--exclude-theme [EXCLUDE-THEME]] [-l|--language [LANGUAGE]] [--exclude-language [EXCLUDE-LANGUAGE]] [-j|--jobs [JOBS]] [--symlink-locale] [--content-version CONTENT-VERSION] [--refresh-content-version-only] [--no-javascript] [--no-css] [--no-less] [--no-images] [--no-fonts] [--no-html] [--no-misc] [--no-html-minify] [--] [<languages>...]

There is an issue open on Magento 2 repository and I even added a comment there: https://github.com/magento/magento2/issues/21852

This issue might be caused by this: https://github.com/magento/magento2/blob/2.3-develop/app/code/Magento/Deploy/Process/Queue.php#L391
And the function for the timeout: https://github.com/magento/magento2/blob/2.3-develop/app/code/Magento/Deploy/Process/Queue.php#L372
All points to const DEFAULT_MAX_EXEC_TIME = 400;
https://github.com/magento/magento2/blob/2.3-develop/app/code/Magento/Deploy/Process/Queue.php#L32

So it looks like if the static code deploy runs for over 400 seconds, it will fail. But Magento has fixed their ECE tool to add an option to increase the timeout: https://github.com/magento/ece-tools/pull/418
But for now this is not fixed on the Magento Open Source or Commerce edition.

So what can you do? Well, for now what we are going to do is to store the theme information for a store somewhere and when a code is deployed we get the theme and deploy only the theme assigned to a store. So for example if MageBR/mytheme is assigned to my store, I will run:

magento setup:static-content:deploy --theme MageBR/mytheme

It will speed things up and not fail as we can see below:

Deploy using quick strategy
frontend/Magento/blank/en_US            2456/2456           ============================ 100% %  1 min               
frontend/MageBR/base/en_US                 2765/2765           ============================ 100% %  2 mins              
frontend/MageBR/mytheme/en_US           2765/2765           ============================ 100% %  2 mins

Execution time: 483.77401208878

But it would still be great to run that command with jobs to speed up the process even more. We should be safe to run the static content deploy with the theme and jobs option if it doesn't take too long, but it would be nice to have an option to increase the timeout directly in the command line.

I hope you liked this article and please leave your comment and don't forget to share! 

 

 


FacebookTwitterGoogle+Share

Comments

JimmyPof (not verified)

Sun, 06/02/2019 - 08:29

Привет всем участникам! прикольный у вас сайт!
Нашел топ базу кино: смотреть лучшие мелодрамы 2018 новинки уже вышедшие http://kinovalenok.tv/
Здесь: смотреть лучшие семейные фильмы http://kinovalenok.tv/semeynyy/ список 2019
Тут: сериал бесплатно в хорошем качестве палач http://kinovalenok.tv/serialy/ рейтинг 2019
Тут: лучшие триллеры онлайн бесплатно Смотреть лучшие триллеры рейтинг 2018
Здесь: http://kinovalenok.tv/10100-naprolom-lockout-2011.html Смотреть Напролом / Lockout (2011) онлайн бесплатно
Здесь: Смотреть Жестокие игры 2: Манчестерская подготовка / Cruel Intentions 2 (2000) онлайн бесплатно Жестокие игры 2: Манчестерская подготовка / Cruel Intentions 2 (2000)

Janet (not verified)

Tue, 06/04/2019 - 07:33

Today, I went to the beachfront with my kids. I found a sea
shell and gave it to my 4 year old daughter and said "You can hear the ocean if you put this to your ear." She put the shell to her ear and
screamed. There was a hermit crab inside and it pinched her ear.
She never wants to go back! LoL I know this is completely off topic but I had to tell someone!

Also visit my website https://londonpoker77.com/

Ellie (not verified)

Tue, 06/04/2019 - 17:56

My coder is trying to persuade me to move to .net from PHP.

I have always disliked the idea because of the expenses.
But he's tryiong none the less. I've been using Movable-type on a number of websites for
about a year and am nervous about switching to another platform.
I have heard great things about blogengine.net. Is there a way I can import all my wordpress content into it?
Any help would be really appreciated!

Feel free to visit my blog - www.maxbetdomino.info

http://canadia… (not verified)

Wed, 06/05/2019 - 14:42

I do not know whether it's just me or if perhaps everybody else experiencing problems with your site. It appears as if some of the written text in your posts are running off the screen. Can someone else please comment and let me know if this is happening to them as well? This could be a problem with my browser because I've had this happen previously. Appreciate it

http://canadia… (not verified)

Wed, 06/05/2019 - 14:53

An outstanding share! I've just forwarded this onto a friend who has been conducting a little research on this. And he in fact bought me lunch due to the fact that I stumbled upon it for him... lol. So let me reword this.... Thank YOU for the meal!! But yeah, thanx for spending time to discuss this topic here on your web page.

AngelSanda (not verified)

Fri, 06/07/2019 - 08:20

Привет всем участникам форума! класный у вас сайт!
Нашел сериальную базу кино: сериал друзья смотреть в хорошем качестве hd
Тут: семейные фильмы 2018 http://inspacefilm.ru/semeynyy/ список 2018
Здесь: ольга новый сериал смотреть в хорошем качестве http://inspacefilm.ru/serialy/ список 2018
Здесь: смотреть триллеры ужасы в хорошем качестве http://inspacefilm.ru/triller/ рейтинг 2018
Здесь: http://inspacefilm.ru/5438-bitva-za-moskvu-serii-1-65-2007.html Смотреть Битва за Москву (Серии 1-65) (2007) онлайн бесплатно
Тут: Дуэйн Джонсон побил рекорд по количеству селфи Дуэйн Джонсон побил рекорд по количеству селфи

RobertSeamn (not verified)

Mon, 06/10/2019 - 17:58

Hi, tired of sitting with no money?
I was just a poor student, and now i make 900$ - 1000$ every day here: http://9binaryoptions.net/uploads/reviews/how-i-can-make-money-online.h… - affiliate marketing
It works! Checked. Good luck to all!

This best earnings in 2019 is available in all countries! These articles will help you:
http://9binaryoptions.net/uploads/reviews/fastest-way-to-earn-money.htm fastest way to earn money
Бинарные опционы развод http://9binaryoptions.net/binarnye-opciony-razvod.html
Start Now!

TommyPhync (not verified)

Mon, 06/10/2019 - 17:58

Привет всем участникам форума! класный у вас сайт!
Нашел интересную инфу: средства усиливающие потенцию
Тут: фильм где девушка соблазнила парня соблазнить девушку бесплатно
Здесь: чай Чанг Шу как быстро похудеть и убрать живот чай Чанг Шу таблетки для быстрого похудения
Тут: hot shapers отзывы реальные бриджи бриджи hot shapers отзывы покупателей реальные

RoccoAccer (not verified)

Tue, 06/11/2019 - 08:47

Всем привет! прикольный у вас сайт!
Нашел сериальную базу кино: кино ужасы смотреть онлайн бесплатно в хорошем
Тут: фильмы онлайн смотреть бесплатно в хорошем фантастика http://kinoserialtv.net/fantastika/ рейтинг 2018
Здесь: лучшие комедии 2018 2019 смотреть бесплатно http://kinoserialtv.net/komediya/ список 2019
Здесь: мелодрама смотреть односерийные в хорошем качестве http://kinoserialtv.net/melodrama/ список 2019
Здесь: http://kinoserialtv.net/3759-polnyy-dom-vozvraschaetsya-na-tv.html «Полный дом» возвращается на ТВ
Тут: Киану Ривз пригласит домой двух девчонок

Houston (not verified)

Wed, 06/12/2019 - 12:46

Howdy! I know this is somewhat off topic but I was wondering if you knew
where I could get a captcha plugin for my
comment form? I'm using the same blog platform as yours and I'm
having difficulty finding one? Thanks a lot!

Here is my website - is.gd

Zac (not verified)

Thu, 06/13/2019 - 01:59

We're a group of volunteers and starting a brand new scheme
in our community. Your site offered us with useful information to work on. You've done an impressive process and our whole
group might be thankful to you.

Visit my blog post ... Elden

orexonatteeg (not verified)

Sat, 06/15/2019 - 18:54

ijzalebe (not verified)

Sat, 06/15/2019 - 19:03

ajigixequnez (not verified)

Sat, 06/15/2019 - 19:03

enayiwezoyava (not verified)

Sat, 06/15/2019 - 20:25

oebubuwjjoega (not verified)

Sat, 06/15/2019 - 20:26

ijazubedeta (not verified)

Sat, 06/15/2019 - 20:26

ezujome (not verified)

Sat, 06/15/2019 - 21:27

inituwmaemeju (not verified)

Sat, 06/15/2019 - 22:10

nulobekiz (not verified)

Sat, 06/15/2019 - 22:15

iluraguyu (not verified)

Sun, 06/16/2019 - 00:23

itiwatov (not verified)

Sun, 06/16/2019 - 00:34

Perform uab.zvhq.magebr.com.mre.vm neuroma, [URL=http://celebsize.com/cialis-lowest-price/]cialis canada[/URL] [URL=http://ezhandui.com/buy-levitra-online/]generic levitra[/URL] [URL=http://puresportsnetwork.com/loans-with-bad-credit/]ohio cash advance[/URL] [URL=http://myquickrecipes.com/bad-credit-loans/]bad credit loans online[/URL] [URL=http://timtheme.com/compare-and-contrast-essay/]essay for you[/URL] [URL=http://dive-courses-bali.com/argument-essay/]essay writing services[/URL] [URL=http://alwaseetgulf.com/viagra-buy-in-canada/]viagra[/URL] [URL=http://celebsize.com/buy-accutane/]accutane lawsuits appeal[/URL] [URL=http://dive-courses-bali.com/essay-writer/]essay help[/URL] metastasize jerks 20mg generic cialis levitra on line loans with bad credit no credit check payday loans academic essay illustration essay viagra adverse effects accutane cost contrast essay carotenaemia, prism http://celebsize.com/cialis-lowest-price/#tadalafil-20-mg-best-price cheapest cialis dosage 20mg price http://ezhandui.com/buy-levitra-online/#levitra.com levitra 20mg best price http://puresportsnetwork.com/loans-with-bad-credit/#payday-loans guaranteed payday loans guaranteed payday loans http://myquickrecipes.com/bad-credit-loans/#personal-loans-online quick cash http://timtheme.com/compare-and-contrast-essay/#academic-essay leadership essays http://dive-courses-bali.com/argument-essay/#custom-writings illustration essay http://alwaseetgulf.com/viagra-buy-in-canada/#viagra-online-best-price cheapviagra.com http://celebsize.com/buy-accutane/#buy-accutane accutane generic http://dive-courses-bali.com/essay-writer/#contrast-essay descriptive essays talking, secure, tinge.

ixoiwdc (not verified)

Sun, 06/16/2019 - 00:38

Alvarado hgl.sxgp.magebr.com.sht.yd flow, irritable, [URL=http://circulateindia.com/payday-loans-no-credit-check/]cash advance[/URL] [URL=http://thegrizzlygrowler.com/essay-writer/]the great gatsby essays[/URL] [URL=http://puresportsnetwork.com/personal-loans/]legit payday loans online[/URL] [URL=http://appseem.com/cause-and-effect-essay/]writing a profile essay[/URL] [URL=http://alwaseetgulf.com/accutane-online/]accutane[/URL] [URL=http://puresportsnetwork.com/payday-loans-direct-lenders/]payday loans[/URL] [URL=http://myquickrecipes.com/payday-loan/]loan without interest[/URL] [URL=http://casatheodoro.com/loans-with-bad-credit/]payday loans[/URL] [URL=http://allwallsmn.com/walmart-viagra-100mg-price/]viagra generic[/URL] hypercapnia, destabilized cortical payday loans online payday loan lenders write my college essay guaranty loans online help with writing an essay buy accutane online generic accutane online lenders 500 cash loan short term loan loans with bad credit buy viagra online novo, extradural http://circulateindia.com/payday-loans-no-credit-check/#get-a-loan-today payday loans no credit check http://thegrizzlygrowler.com/essay-writer/#essay-writer causes of the great depression essay http://puresportsnetwork.com/personal-loans/#quick-money payday loans direct lender http://appseem.com/cause-and-effect-essay/#essay-on-romeo-and-juliet essay http://alwaseetgulf.com/accutane-online/#accutane-cost accutane http://puresportsnetwork.com/payday-loans-direct-lenders/#1000-dollar-l… payday loans no credit check no fees http://myquickrecipes.com/payday-loan/#easy-loans fast cash no credit bad credit loans http://casatheodoro.com/loans-with-bad-credit/#payday-loans loans with bad credit http://allwallsmn.com/walmart-viagra-100mg-price/#walmart-viagra-100mg-… viagra pills ice, meningococcus communicate.

aegogedonnumo (not verified)

Sun, 06/16/2019 - 01:12

owecejamo (not verified)

Sun, 06/16/2019 - 01:12

ogeedamini (not verified)

Sun, 06/16/2019 - 01:19

uxiwukoa (not verified)

Sun, 06/16/2019 - 01:19

atyiduhaf (not verified)

Sun, 06/16/2019 - 01:20

axumreyuh (not verified)

Sun, 06/16/2019 - 01:20

evuhenequodwo (not verified)

Sun, 06/16/2019 - 01:24

uyecafetivuca (not verified)

Sun, 06/16/2019 - 01:26

oqkopay (not verified)

Sun, 06/16/2019 - 01:26

oeeonode (not verified)

Sun, 06/16/2019 - 01:26

Add new comment

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
Category