Skip to content
This repository has been archived by the owner on Jan 10, 2019. It is now read-only.

settings forks per worker seems to be broken on windows #96

Open
eoliphan opened this issue Jul 17, 2015 · 2 comments
Open

settings forks per worker seems to be broken on windows #96

eoliphan opened this issue Jul 17, 2015 · 2 comments

Comments

@eoliphan
Copy link

I kept getting errors regarding calls to 'fork()' despite having set number_of_forks_per_worker to 0 per the documentation. I thought the issue was in start_activity_workers(runner.rb), because 'use_forking' isn't set when the local fork_count is 0, but it appears that the error is in the following code in runner.rb. It calls fork regardless of the setting

def self.spawn_and_start_workers(json_fragment, process_name, worker)
        workers = []
        num_of_workers = json_fragment['number_of_workers'] || FlowConstants::NUM_OF_WORKERS_DEFAULT
        should_register = true
        num_of_workers.times do
          workers << fork do
            set_process_name(process_name)
            worker.start(should_register)
          end
          should_register = false
        end
        workers
      end
@mjsteger
Copy link
Contributor

mjsteger commented Oct 5, 2015

So, as per the docs, it absolutely should work with number_of_forks_per_worker set to 0. I'll address that in my fork shortly. If this is currently a blocker for you (though given the latency I wouldn't be surprised if not), it is possible to use write/plug in a different executor, or simply have a ruby process which calls worker.start.

@SteveAlexander
Copy link

Did anything happen with this? I'm developing with aws-flow-ruby in a mixed windows/mac/linux environment, and disappointed that running workers / deciders on Windows doesn't work straightforwardly.

I'll look at using Cygwin, but would be great if there's a patch available to fix this.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants