diff --git a/examples/server/server.cpp b/examples/server/server.cpp index 3951507aa..bfa87cac0 100644 --- a/examples/server/server.cpp +++ b/examples/server/server.cpp @@ -2033,6 +2033,8 @@ struct server_context { if (n_batch == 1 || ret < 0) { // if you get here, it means the KV cache is full - try increasing it via the context size LOG_TEE("%s : failed to decode the batch, n_batch = %d, ret = %d\n", __func__, n_batch, ret); + LOG_ERROR("KV cache is full - try increasing it via the context size", {{"ctx-size", params.n_ctx}}); + kv_cache_clear(); return false; }