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

Worker stops when --rp_api_concurrency more than 1 (with main.py main file) #335

Open
ArtyoMKos opened this issue Aug 9, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@ArtyoMKos
Copy link

Describe the bug
Worker stops when running locally with argument --rp_api_concurrency more than 1. In documentation written - use main.py main file for correct integration, this happens with main.py file.

To Reproduce
Steps to reproduce the behavior:

  1. Create any simple worker
  2. Worker main.py file contains following code:
    if __name__ == "__main__": cm = int(CONFIGS["GENERIC"]["concurrent_modifier"]) logging.info(f"Starting with {cm} workers.") runpod.serverless.start( { "handler": async_handler, "concurrency_modifier": lambda x: 5, # or without this line, result is same } )
  3. Run your main file with command python src/main.py --rp_serve_api --rp_api_port 8080 --rp_api_concurrency 5

Expected behavior
Worker must run with 5 workers concurrently.

Desktop (please complete the following information):

  • OS: ubuntu
@ArtyoMKos ArtyoMKos added the bug Something isn't working label Aug 9, 2024
@deanq
Copy link
Collaborator

deanq commented Aug 9, 2024

@ArtyoMKos What version of runpod SDK is installed?

@ArtyoMKos
Copy link
Author

ArtyoMKos commented Aug 9, 2024 via email

@katarzynasornat
Copy link

Hi, is there any progress on this, I followed exacly the same example as https://docs.runpod.io/serverless/workers/development/concurrency with changing the name but it is also not working for me giving the message

--- Starting Serverless Worker | Version 1.7.3 --- INFO | Starting API server. DEBUG | Not deployed on RunPod serverless, pings will not be sent. WARNING: You must pass the application as an import string to enable 'reload' or 'workers'.

Is there anybody to help with the above?

@smagnetize
Copy link

I'm getting the same issue, I've tried lots of different environments and versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants