databendlabs/databend · error
{e}
Error message
{e} What it means
The jeprof debug dump HTTP handler converts any error returned by dump_profile into an internal-server Error whose message is the underlying error's Display output ("{e}") with a 500 status. It signals that collecting/writing the jemalloc profile (jeprof) failed on the server side.
Solutions
- Inspect the interpolated message {e} to see the underlying dump_profile failure cause.
- Verify jeprof and required tooling are installed in the image and jemalloc profiling is enabled.
- Ensure the temp directory (where the .prof tempfile is created) is writable.
- Re-run the dump endpoint after fixing the environment; if the cause is code-level, open an issue with the full error string.
Defensive patterns
Strategy: try-catch
Try / catch
match resp.status() {
StatusCode::OK => parse_profile(resp),
status => log::error!("jeprof dump failed: {}", resp.text().unwrap_or_default()),
} Prevention
- Verify jeprof/perf tooling is present in the deployment image before profiling.
- Ensure the temp directory is writable in containers.
- Read the returned error body for the underlying dump_profile cause.
When it happens
Trigger: Calling the debug jeprof dump endpoint when dump_profile fails — e.g. the temporary .prof file cannot be used, the jeprof binary is missing, or the profile dump command exits non-zero.
Common situations: Profiling a deployment where jemalloc profiling is disabled at build/runtime, jeprof/perf tooling absent in the container image, or the temp directory is not writable.
Understand the failure class
Background: "API error: {status}" and "HTTP 401/403/404/429/5xx" errors: non-2xx HTTP responses explained — this error's family across 27 libraries.
Related errors
- login_handler expect session id in ctx
- Unsupported format for
- Unsupported source type. Expected path, pandas.DataFrame…
- Access denied: is outside allowed directories
- ContextVar has no value
AI-assisted analysis of databendlabs/databend@288d84d76e (2026-09-11).
Data as JSON: /api/errors/73c74088b2450d0b.
Report an issue: GitHub.
Appendix: source
Thrown at src/common/http/src/debug/jeprof.rs:36
use poem::Error;
use poem::error::InternalServerError;
use poem::web::IntoResponse;
use poem::web::Query;
use tempfile::Builder;
#[poem::handler]
pub async fn debug_jeprof_dump_handler(
_req: Option<Query<String>>,
) -> poem::Result<impl IntoResponse> {
let tmp_file = Builder::new()
.prefix("heap_dump_")
.suffix(".prof")
.tempfile()
.map_err(InternalServerError)?;
let path = tmp_file.path();
let body = dump_profile(&path.to_string_lossy()).map_err(|e| {
Error::new(
ErrorCode::from(e.to_string().as_str()),
StatusCode::INTERNAL_SERVER_ERROR,
)
})?;
let body_len = body.len();
Ok(body.with_header("content-length", body_len).with_header(
"Content-Disposition",
format!("attachment; filename=\"{}\"", &path.to_string_lossy()),
))
}
View on GitHub (pinned to 288d84d76e)