Worker stops when --rp_api_concurrency more than 1 (with main.py main file)
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:
- Create any simple worker
- 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 } ) - 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 What version of runpod SDK is installed?
I used RunPod 1.6.2 and 1.7.0
On Fri, 9 Aug 2024 at 22:10 Dean Quiñanola @.***> wrote:
@ArtyoMKos https://github.com/ArtyoMKos What version of runpod SDK is installed?
— Reply to this email directly, view it on GitHub https://github.com/runpod/runpod-python/issues/335#issuecomment-2278483059, or unsubscribe https://github.com/notifications/unsubscribe-auth/BIH53RWR4JKY6AIY6SV3NTTZQUA3FAVCNFSM6AAAAABMH2C57CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZYGQ4DGMBVHE . You are receiving this because you were mentioned.Message ID: @.***>
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?
I'm getting the same issue, I've tried lots of different environments and versions.