-
-
Notifications
You must be signed in to change notification settings - Fork 77
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
httpx.ConnectError: All connection attempts failed #872
Comments
+1 on this - we're seeing this too |
On my side this is clearly happening when handling multiple queries in parallel. For me, this happens in two different scenarios.
I am used to having only one global Yet I am not satisfied and expected this kind of stuff to be handled natively, but the doc is quite brief so I might have missed stuff. Anyone has a workaround or optim using the codebase (like |
In the end what worked best for me was to perform requests sequentially using a queue management system. Test errorTo reproduce the error you can write an @pytest.mark.asyncio
async def test_get_all_big(self):
promises = [database.get_styles() for _ in range(100)]
await asyncio.gather(*promises) |
@Xmaster6y what database are you using? I can't replicate the issue with the snippet you shared running against PostgreSQL. |
An hosted instance of SQL Server. I can't say if it's due to SQL Server but I've never seen this using directly prisma in js. Also this passes (without my workaround): @pytest.mark.asyncio
async def test_get_all_big_sync(self):
results = [await database.get_styles() for _ in range(10)]
assert len(results) == 10 |
related to issue: encode/httpx#1171 (comment) |
@RobertCraigie I see this in a Postgres (Supabase), FastAPI, one global |
Bug description
This issue "httpx.ConnectError: All connection attempts failed", is occurring rarely, can't replicate it. Do not why this issue is coming.
How to reproduce
Expected behavior
Prisma information
Environment & setup
The text was updated successfully, but these errors were encountered: