# werkzeug.exceptions.BadRequest: 400 Bad Request: The session cookie is too large.

- **ID:** `python/flask-session-cookie-too-large`
- **Domain:** python
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The session data stored in the client-side cookie exceeds the browser's size limit (typically 4KB).

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 2.x | active | — | — |
| 3.x | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   Use Flask-Session with Redis or a database backend.
   ```
2. **** (85% success)
   ```
   Remove unnecessary keys from `session`.
   ```

## Dead Ends

- **** — Browser limit is fixed; increasing server config doesn't help. (90% fail)
- **** — Flask's session is signed, not compressed; manual compression is complex. (70% fail)
