Flaky system test: test_99b's second server hits 'too many clients' on the shared test database
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 64/100
Research direction
Start with hindsight-system-tests/tests/test_99b_custom_llm_provider.py and the fixture that starts its second server; trace how it configures the HINDSIGHT_API_DB_POOL_* settings and compare with the pool defaults behind #4754. Reproduce the startup failure against the shared pg0://hindsight-systest database, then choose a way to keep both servers within its connection limit. Done when the test passes reliably without exhausting database connections.
Written by the indexing model from the issue text.
Description
What happens
tests/test_99b_custom_llm_provider.py::test_every_model_call_goes_through_the_custom_provider sometimes errors at setup. Its server exits during startup with:
asyncpg.exceptions.TooManyConnectionsError: sorry, too many clients already
Seen on PR #7224 (run 47091395339, job test-system (blackbox)). A rerun of that job passed, and the PR touched nothing in this path.
Why (likely)
The test starts a second hindsight-api against the same embedded Postgres instance (pg0://hindsight-systest) that the suite's main server is already using. The two connection pools together can go over the instance's max_connections. #4754 was the same collision for a single server: its default pool max equalled the embedded Postgres limit.
What should happen
A story that starts an extra server should fit inside the database's connection limit. Options:
- Give the extra server a small pool (
HINDSIGHT_API_DB_POOL_*). - Raise the system-test instance's
max_connections. - Run the extra server against its own pg0 instance.
Where
hindsight-system-tests/tests/test_99b_custom_llm_provider.py, and the fixture that starts its server.- The pool defaults behind #4754.
- Dominant language
- Python
- Stars
- 45.2k
- Forks
- 5.9k
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from vectorize-io/hindsight
-
core
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
vectorize-io/hindsight#7254 ·
-
Control Plane shows different calendar dates for the same occurrence in Constellation and TimelineOpencore
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
vectorize-io/hindsight#7240 · 1 comment ·
-
core
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vectorize-io/hindsight#7233 ·
-
core
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
vectorize-io/hindsight#7231 ·
-
core
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
vectorize-io/hindsight#7228 · 1 comment ·
All issues in vectorize-io/hindsight
Similar issues
-
Test: to_hijri() accepts datetime.datetime and uses only the date partPossibly taken A pull request linked to this issue is open or already merged. Opengood first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
omarelshamy25x/shamy-hijri#63 · 3 comments ·
Maintainers usually reply within 1 day
-
polish
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
521xueweihan/HelloGitHub#4729 ·
-
[Bug]: Score parser reads parts of scientific notation as valid scoresPossibly taken @AshutoshSingh840 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
UKGovernmentBEIS/control-arena#992 ·
Maintainers usually reply within 3 days
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
mvalentsev/awesome-free-ai-coding#70 ·
Maintainers usually reply within 1 day