phalcon/cphalcon · error · Phalcon\Queue\Exceptions\Exception
UNKNOWN_COMMAND
Error message
UNKNOWN_COMMAND
What it means
The Beanstalk server replied with the sentinel text UNKNOWN_COMMAND, which this client re-throws as an exception. It means the client sent a command line the beanstalkd protocol does not recognize — typically a client/server version mismatch or corrupted command framing.
Solutions
- Check beanstalkd version and client library compatibility
- Inspect the command being sent for corruption (e.g. embedded newlines in job data breaking framing)
- Retry with a fresh connection; stale sockets may be desynchronized
- Capture the raw traffic to identify the offending command
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at phalcon/Queue/Adapter/Beanstalk/BeanstalkConnection.zep:229 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of phalcon/cphalcon@b7419de9cd (2026-08-21).
Data as JSON: /api/errors/4257e851f93b9168.
Report an issue: GitHub.
Appendix: source
Thrown at phalcon/Queue/Adapter/Beanstalk/BeanstalkConnection.zep:229
}
if length {
if feof(connection) {
return false;
}
let data = rtrim(stream_get_line(connection, length + 2), "\r\n"),
meta = stream_get_meta_data(connection);
if meta["timed_out"] {
throw new Exception("Connection timed out");
}
} else {
let data = stream_get_line(connection, 16384, "\r\n");
}
if data === "UNKNOWN_COMMAND" {
throw new Exception("UNKNOWN_COMMAND");
}
if data === "JOB_TOO_BIG" {
throw new Exception("JOB_TOO_BIG");
}
if data === "BAD_FORMAT" {
throw new Exception("BAD_FORMAT");
}
if data === "OUT_OF_MEMORY" {
throw new Exception("OUT_OF_MEMORY");
}
return data;
}
/**View on GitHub (pinned to b7419de9cd)