phalcon/cphalcon · error · Phalcon\Queue\Exceptions\Exception
BAD_FORMAT
Error message
BAD_FORMAT
What it means
The Beanstalk server replied with the sentinel BAD_FORMAT, re-thrown as an exception. The server could not parse the command line — usually malformed numeric arguments, missing CRLF terminators, or an incorrectly serialized command sent by the caller.
Solutions
- Check arguments passed to put()/other commands for non-numeric or negative values where integers are required
- Ensure job data does not corrupt the CRLF framing expected by the protocol
- Upgrade/reinstall the client to rule out serialization bugs
- Retry with a fresh connection in case the stream is desynchronized
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at phalcon/Queue/Adapter/Beanstalk/BeanstalkConnection.zep:237 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/745cb71e46f177ab.
Report an issue: GitHub.
Appendix: source
Thrown at phalcon/Queue/Adapter/Beanstalk/BeanstalkConnection.zep:237
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;
}
/**
* Reads the latest status line and splits it into tokens.
*
* @phpstan-return queue_beanstalk_status
*/
public function readStatus() -> array
{
var status;
View on GitHub (pinned to b7419de9cd)