Issues when deploying static content on EFS

Submitted by Eric on Wed, 04/24/2019 - 17:29
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:

This issue might be caused by this:
And the function for the timeout:
All points to const DEFAULT_MAX_EXEC_TIME = 400;

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:
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! 





JimmyPof (not verified)

Sun, 06/02/2019 - 08:29

Привет всем участникам! прикольный у вас сайт!
Нашел топ базу кино: смотреть лучшие мелодрамы 2018 новинки уже вышедшие
Здесь: смотреть лучшие семейные фильмы список 2019
Тут: сериал бесплатно в хорошем качестве палач рейтинг 2019
Тут: лучшие триллеры онлайн бесплатно Смотреть лучшие триллеры рейтинг 2018
Здесь: Смотреть Напролом / 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

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 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 -

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 список 2018
Здесь: ольга новый сериал смотреть в хорошем качестве список 2018
Здесь: смотреть триллеры ужасы в хорошем качестве рейтинг 2018
Здесь: Смотреть Битва за Москву (Серии 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:… - affiliate marketing
It works! Checked. Good luck to all!

This best earnings in 2019 is available in all countries! These articles will help you: fastest way to earn money
Бинарные опционы развод
Start Now!

TommyPhync (not verified)

Mon, 06/10/2019 - 17:58

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

RoccoAccer (not verified)

Tue, 06/11/2019 - 08:47

Всем привет! прикольный у вас сайт!
Нашел сериальную базу кино: кино ужасы смотреть онлайн бесплатно в хорошем
Тут: фильмы онлайн смотреть бесплатно в хорошем фантастика рейтинг 2018
Здесь: лучшие комедии 2018 2019 смотреть бесплатно список 2019
Здесь: мелодрама смотреть односерийные в хорошем качестве список 2019
Здесь: «Полный дом» возвращается на ТВ
Тут: Киану Ривз пригласит домой двух девчонок

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 -

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 neuroma, [URL=]cialis canada[/URL] [URL=]generic levitra[/URL] [URL=]ohio cash advance[/URL] [URL=]bad credit loans online[/URL] [URL=]essay for you[/URL] [URL=]essay writing services[/URL] [URL=]viagra[/URL] [URL=]accutane lawsuits appeal[/URL] [URL=]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 cheapest cialis dosage 20mg price levitra 20mg best price guaranteed payday loans guaranteed payday loans quick cash leadership essays illustration essay accutane generic descriptive essays talking, secure, tinge.

ixoiwdc (not verified)

Sun, 06/16/2019 - 00:38

Alvarado flow, irritable, [URL=]cash advance[/URL] [URL=]the great gatsby essays[/URL] [URL=]legit payday loans online[/URL] [URL=]writing a profile essay[/URL] [URL=]accutane[/URL] [URL=]payday loans[/URL] [URL=]loan without interest[/URL] [URL=]payday loans[/URL] [URL=]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 payday loans no credit check causes of the great depression essay payday loans direct lender essay accutane… payday loans no credit check no fees fast cash no credit bad credit loans loans with bad credit… 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.