# ERR unknown command 'FORK'

- **ID:** `redis/err-unknown-command-fork`
- **Domain:** redis
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 95%

## Root Cause

A client sent a command that does not exist in the Redis command table, often due to a typo or using a command from a different database (e.g., PostgreSQL FORK).

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Redis 7.2.0 | active | — | — |
| Redis 6.2.14 | active | — | — |
| redis-py 5.0.1 | active | — | — |

## Workarounds

1. **Check the application code for the exact command string and replace it with the correct Redis command. For example, change `FORK` to `BGSAVE` if the intent was to fork a background save.** (95% success)
   ```
   Check the application code for the exact command string and replace it with the correct Redis command. For example, change `FORK` to `BGSAVE` if the intent was to fork a background save.
   ```
2. **Use Redis' `COMMAND INFO` to verify the command exists: `redis-cli COMMAND INFO FORK` returns empty if unknown.** (90% success)
   ```
   Use Redis' `COMMAND INFO` to verify the command exists: `redis-cli COMMAND INFO FORK` returns empty if unknown.
   ```
3. **If the command is from a third-party library, update the library to use Redis-compatible commands. Example in Python: `r.execute_command('BGSAVE')` instead of `r.execute_command('FORK')`.** (85% success)
   ```
   If the command is from a third-party library, update the library to use Redis-compatible commands. Example in Python: `r.execute_command('BGSAVE')` instead of `r.execute_command('FORK')`.
   ```

## Dead Ends

- **** — The command name is still not recognized as a built-in Redis command. (90% fail)
- **** — Redis command set is fixed and not configurable. (99% fail)
