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

fix(agents-api): Fix cozo query retry logic #913

Merged
merged 1 commit into from
Nov 29, 2024
Merged

Conversation

creatorrr
Copy link
Contributor

@creatorrr creatorrr commented Nov 29, 2024

Important

Improves Cozo query retry logic and adjusts Gunicorn worker configuration.

  • Retry Logic:
    • In utils.py, updated retry logic in cozo_query and cozo_query_async to handle ConnectionError, Timeout, TimeoutException, NetworkError, and RequestError.
    • Increased retry attempts from 4 to 6 and adjusted exponential backoff parameters.
  • Gunicorn Configuration:
    • Changed worker count calculation in gunicorn_conf.py to use half of CPU count instead of CPU count minus one.

This description was created by Ellipsis for 1cb5932. It will automatically update as commits are pushed.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Reviewed everything up to 1cb5932 in 11 seconds

More details
  • Looked at 88 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. agents-api/gunicorn_conf.py:7
  • Draft comment:
    Reducing workers from (multiprocessing.cpu_count() - 1) to (multiprocessing.cpu_count() // 2) may impact performance on systems with fewer cores. Ensure this change aligns with expected load and performance requirements.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The change in the number of workers from (cpu_count() - 1) to (cpu_count() // 2) might affect performance, especially on systems with fewer cores. This change should be justified based on the expected load and performance characteristics.

Workflow ID: wflow_DgUHgFMb5aYrmAAk


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link
Contributor

@standard-input standard-input bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues flagged.
Standard Input can make mistakes. Check important info.

@creatorrr creatorrr merged commit a390974 into dev Nov 29, 2024
10 of 14 checks passed
@creatorrr creatorrr deleted the x/fix-cozo-retry branch November 29, 2024 14:58
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

Successfully merging this pull request may close these issues.

1 participant