Commit b4666fc
Expand troubleshooting guide to cover HMR and dev server slowness (#3804)
## Summary
Improved the troubleshooting docs to help developers discover why their
*entire* dev environment feels slow when using Electric—not just shape
loading, but HMR and dev server responsiveness too.
**User impact:** Developers experiencing slow HMR or unresponsive dev
servers will now find this section when searching for those symptoms,
understanding that it's the same HTTP/1.1 connection limit issue.
## Root Cause (of the documentation gap)
The existing docs explained the HTTP/1.1 6-connection limit well, but
only in the context of "slow shapes." Developers experiencing slow HMR
often didn't realize the connection: Electric shapes holding open
connections starve the dev server's HMR websocket and asset requests.
## Approach
1. **Broadened the section title** to include the symptoms developers
actually search for:
- Before: "Slow shapes"
- After: "Slow shapes / slow HMR / slow dev server"
2. **Added the missing connection** between shapes and dev server
performance:
```
This also affects your development server (Vite, webpack, etc.) because
the browser's TCP connection limit is shared across all requests to your
dev server — including HMR updates, asset loading, and shape sync.
```
## Key Invariants
- The solution (Caddy with HTTP/2) remains the same—just improving
discoverability
- No changes to the actual technical recommendation
## Non-goals
- Not adding new solutions or workarounds
- Not restructuring the troubleshooting guide
## Trade-offs
**Alternative considered:** Create a separate section for HMR issues.
Rejected because:
- It's the same root cause and same solution
- Would create redundant documentation
- Better to have one authoritative section that covers all
manifestations
## Verification
```bash
pnpm --filter @electric-sql/docs dev
# Navigate to /docs/guides/troubleshooting
# Verify the section now mentions HMR and dev server in the title and body
```
## Files Changed
| File | Change |
|------|--------|
| `website/docs/guides/troubleshooting.md` | Expanded title and added
paragraph explaining how HTTP/1.1 limits affect HMR/dev server |
Co-authored-by: Claude <noreply@anthropic.com>1 parent 7fa05c1 commit b4666fc
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| |||
0 commit comments