T
TanStack3w ago
ambitious-aqua

Best practices on keeping multiple electric connections active

Hey there I was planning on having everything sync'd at login by having a Provider that calls all liveQueries so that it will always have a sync connection. That being said, my normal requests weren't going out. I removed the provider and the normal REST requests started going out again. Is this a limitation on android? Should I not have a provider wrapped around my app? I'm not concerned about server bandwidth for having 5 active request per open app, but it seems normal rest API requests are being prevented from firing PS- I'm using this w/ React Native
No description
3 Replies
eager-peach
eager-peach3w ago
sounds like the 6 connection http 1.1 limitation — https://electric-sql.com/docs/guides/troubleshooting#local-development
Troubleshooting - Guide | ElectricSQL
Tips and FAQs on how to run Electric successfully.
ambitious-aqua
ambitious-aquaOP3w ago
Thank you. I'll give this a shot! From what I'm finding it's an issue with androids OkHttp 5 req limit. I'm using ngrok cause I kept hitting issues with caddy and the issue persists. Will write an update here if I end up fixing it. Suprised no one hit this yet
eager-peach
eager-peach3w ago
this is what RN uses? apparently you can up the limit https://stackoverflow.com/questions/42299791/okhttpclient-limit-number-of-connections weirdly low default limit

Did you find this page helpful?