Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with puma concurrency #89

Closed
canuc opened this issue Feb 18, 2015 · 4 comments
Closed

Issue with puma concurrency #89

canuc opened this issue Feb 18, 2015 · 4 comments

Comments

@canuc
Copy link

canuc commented Feb 18, 2015

When developing get the error:

16:16:33  file changed styles/main.less
16:16:33  file changed styles/main.less
16:16:36  EEXIST, file already exists '/Users/{user}/data/{project}/tmp/ember-cli-477a1ffb-8359-4e3f-a1ec-86741c388c36/apps/dashboard/assets/vendor.map'

Workaround:

Found that reducing the max concurrent workers to 1 fixed the issue.

@juliogarciag
Copy link

I think the problem is that Ember-cli-rails is creating N ember instances for each worket. While debugging other problem i had i found that we shouldn't have more than 1 ember watch running over the same directory at a time. Ember CLI seems to be using tmp as a place to store some cache-related data. The result is like accessing the same no-threadsafe data set with two threads: a race condition.

I don't know too much of the code to know if there is some way to run one global ember process per folder (in a way similar to how zeus uses a .zeus.sock file) instead of one ember process per rails process (worker). It could be a better solution than the workaround.

@rwz
Copy link
Collaborator

rwz commented Feb 26, 2015

I think the problem is that Ember-cli-rails is creating N ember instances for each worket.

That is correct.

Honestly, I don't know how to detect multiple worker situation properly and consistently. The assumption was that this should only happen in development environment and people usually don't run multiple workers in development environment. Apparently it's false :)

@juliogarciag
Copy link

I think the problem is that, sometimes, it's easiest to just put gem "puma" and gem "unicorn-rails" in the main body of the Gemfile and making things without thinking of different environments. For example, we simply could make:

gem :webrick, :group => :development
gem :puma, :group => :production

But anyway, there is no assumption of just one worker and maybe in the future there could be a server which uses many workers everywhere and it could help to just have covered the situation of accidentally creating many embers.

Why do you think of using an empty file to detect if the ember process was already running?

@rwz
Copy link
Collaborator

rwz commented Mar 3, 2015

I've created a new issue to consolidate these two #94. Let's all move there.

@rwz rwz closed this as completed Mar 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants