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

Reject high-cost requests instead of creating more OS threads when overloaded #639

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Feb 12, 2023

  1. Reject high-cost requests instead of creating more OS threads when ov…

    …erloaded
    
    We have been using a file removal semaphore with weight 5,000 (half of Go's
    default 10,000 maximum OS threads, beyond which Go will crash), in an attempt
    to avoid crashing when the filesystem/storage layer can't keep up with our
    requirements.
    
    This change renames that semaphore to `diskWaitSem` and also uses it for
    disk-write operations. When the semaphore cannot be acquired for disk-writes,
    we return HTTP 503 (service unavailable) or gRPC RESOURCE_EXHAUSTED error codes
    to the client.
    
    Relates to buchgr#638
    mostynb committed Feb 12, 2023
    Configuration menu
    Copy the full SHA
    6254fb9 View commit details
    Browse the repository at this point in the history