litellm icon indicating copy to clipboard operation
litellm copied to clipboard

fix(proxy): allow background health check interval to be any number

Open fgreinacher opened this issue 1 year ago • 3 comments

Title

Allow background health check interval to be any number

At the moment the code will only work when the interval is a float, otherwise it will perform health check requests in a tight loop.

Relevant issues

n/a

Type

🐛 Bug Fix

Changes

Parse the value to a float instead of checking it's type.

[REQUIRED] Testing - Attach a screenshot of any new tests passing locally

Error case:

INFO:     Started server process [86041]
INFO:     Waiting for application startup.
...
10:44:07 - LiteLLM Proxy:ERROR: proxy_server.py:1347 - Not running background health checks due to invalid health_check_interval abc.

:hammer_and_pick: with :heart: by Siemens

fgreinacher avatar Oct 22 '24 08:10 fgreinacher

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
litellm ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 28, 2024 8:27pm

vercel[bot] avatar Oct 22 '24 08:10 vercel[bot]

The lint error seems to be unrelated to the changes in this PR. Please let me know otherwise 🙇

fgreinacher avatar Oct 22 '24 09:10 fgreinacher

@ishaan-jaff Could you have a look at this? I'm not sure what to do about the lint failures. Thanks a ton 🙇

fgreinacher avatar Oct 23 '24 06:10 fgreinacher

@ishaan-jaff @krrishdholakia Would be really awesome to have this in. It's causing quite some unnecessary load on our systems. Let me know if I can do anything to make your review easier.

fgreinacher avatar Oct 28 '24 20:10 fgreinacher

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Apr 22 '25 22:04 CLAassistant

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

github-actions[bot] avatar Jul 22 '25 00:07 github-actions[bot]