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

Random Test Failures Due to OpenAI Rate Limit #212

Closed
Ashesh3 opened this issue Jul 12, 2023 · 0 comments · Fixed by #216
Closed

Random Test Failures Due to OpenAI Rate Limit #212

Ashesh3 opened this issue Jul 12, 2023 · 0 comments · Fixed by #216
Assignees
Labels
bug Something isn't working

Comments

@Ashesh3
Copy link
Member

Ashesh3 commented Jul 12, 2023

During our routine tests, we've been noticing that at least one question fails in each test run, reducing the overall average. The issue seems to be occurring randomly and is not reproducible in local environments, leading to the suspicion that it may be related to issues on deployment or OpenAI's side.

Details:

From analysis of the celeryworker.log and the information available in the admin panel, it seems that the failures might be due to hitting the rate limit set by OpenAI. The error message reads: "Rate limit reached for 10KTPM-200RPM in organization org-xxxxx tokens per min. Limit: 10000 / min"

Currently, langchain already has a retry mechanism in place, where it retries a failed request in 2^x seconds intervals if it's a rate limit issue. However, this doesn't seem to be sufficient to handle the current situation.

Proposed Solution:

Considering we don't need test results urgently, we could increase the maximum wait time for retries, say up to 3 minutes. This should provide a larger buffer to avoid hitting the rate limit and might potentially resolve the issue.

Next Steps:

  1. Investigate if the current langchain configuration allows to modify the maximum wait time for retries.
  2. If possible, adjust the maximum wait time to 3 minutes and monitor if this reduces or eliminates the random test failures.
@Ashesh3 Ashesh3 added the bug Something isn't working label Jul 12, 2023
@Ashesh3 Ashesh3 self-assigned this Jul 12, 2023
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

Successfully merging a pull request may close this issue.

1 participant