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

Race condition on container and worker init causing container to fail #249

Open
sleelin opened this issue Jan 17, 2022 · 0 comments
Open
Assignees

Comments

@sleelin
Copy link

sleelin commented Jan 17, 2022

Environment details:

  • OS: MacOS 11.6.2 (Intel)
  • Nitric: @nitric/cli/0.2.0-rc.6b54497d darwin-x64 node-v14.17.4
  • Docker: version 20.10.11, build dea9396

Working locally, almost all of my entrypoint containers are starting up, then stopping shortly after with the following logs:

Registered Gateway Plugin
Starting Child Process
Waiting for active workers
Services listening on: 127.0.0.1:50051
Membrane Error: available workers below required minimum of 1, 0 available, timedout waiting for more workers, exiting

The output of nitric run reports that all function entrypoints are running.
We have defined our entrypoints as containers with a custom dockerfile, so I was able to work around this by adding ENV MIN_WORKERS=0 before the CMD line in the dockerfile.

After doing this the containers start properly with the following log:

Registered Gateway Plugin
Starting Child Process
Waiting for active workers
Starting Worker Supervisor
Services listening on: 127.0.0.1:50051
Starting Gateway, 0 workers currently available
Received init request from worker
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

2 participants