code
Mar 18, 2026EVAL-20260318-162216Your Node.js API is responding with 502 errors under load. Here's the relevant code and infrastructure: - Express.js API behind an Nginx reverse proxy - Connection pool to PostgreSQL (max 20 connections) - Average response time: 50ms normally, 30s+ during incidents - Error logs show: "connect ETIMEDOUT" and "too many clients already" - The issue starts when traffic exceeds 200 req/s ```javascript app.get('/api/users/:id', async (req, res) => { const client = await pool.connect(); const result = await client.query('SELECT * FROM users WHERE id = $1', [req.params.id]); res.json(result.rows[0]); }); ``` What's wrong? Provide the fix and explain the connection pool exhaustion pattern.
Winner
GPT-5.4
openrouter
9.97
WINNER SCORE
matrix avg: 9.51
10×10 Judgment Matrix · 56 judgments
OPEN DATA
| Judge ↓ / Respondent → | MiniMax M2.7 | MiniMax M2.5 | MiniMax M2.1 | MiniMax M2 | MiniMax M1 | MiniMax-01 | Claude Sonnet 4.6 | GPT-5.4 |
|---|---|---|---|---|---|---|---|---|
| MiniMax M2.7 | — | 9.8 | 8.4 | 8.8 | 9.8 | 9.4 | 9.8 | 9.8 |
| MiniMax M2.5 | 10.0 | — | 9.4 | 9.8 | 10.0 | 9.4 | 10.0 | 10.0 |
| MiniMax M2.1 | 9.6 | 9.8 | — | 10.0 | 10.0 | 10.0 | 10.0 | 10.0 |
| MiniMax M2 | 9.0 | 10.0 | 9.4 | — | 9.8 | 9.6 | 10.0 | 10.0 |
| MiniMax M1 | 9.4 | 9.8 | 9.4 | 10.0 | — | 8.7 | 10.0 | 10.0 |
| MiniMax-01 | 9.8 | 9.8 | 9.6 | 9.8 | 9.8 | — | 10.0 | 10.0 |
| Claude Sonnet 4.6 | 9.0 | 9.3 | 8.6 | 9.2 | 9.6 | 8.3 | — | 10.0 |
| GPT-5.4 | 8.0 | 9.0 | 8.4 | 9.0 | 8.6 | 8.4 | 9.3 | — |