Skip to content

Implement maximum search queue length  #36

@clamprecht

Description

@clamprecht

To avoid situations where an index gets overloaded with searches (sometimes a slow search can cause this), I implemented an option called "max_search_queue", which sets a limit of the number of threads waiting to acquire the search semaphore in TrafficLimitingSearcher. If this limit is reached, it just rejects the search and throws InterruptedException instead of melting down. I've been running this in production and it seems to work well.

If this sounds good, I'll clean this up into a nice pull request, but here's the main code change:

clamprecht@1e766e2

The option name I chose in the indexengine_config is "max_search_queue".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions