From 299c09207766c1ba53a8ba91d9fb2956bb2b8bbf Mon Sep 17 00:00:00 2001 From: Oran Agra Date: Tue, 18 Aug 2020 09:53:59 +0300 Subject: [PATCH] OOM Crash log include size of allocation attempt. (#7670) Since users often post just the crash log in github issues, the log print that's above it is missing. No reason not to include the size in the panic message itself. (cherry picked from commit 1b5cc94836d24b7b36cb6618644f9e2d60113c59) --- src/server.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/server.c b/src/server.c index d624cb434..38b35c9e1 100644 --- a/src/server.c +++ b/src/server.c @@ -4911,7 +4911,8 @@ void loadDataFromDisk(void) { void redisOutOfMemoryHandler(size_t allocation_size) { serverLog(LL_WARNING,"Out Of Memory allocating %zu bytes!", allocation_size); - serverPanic("Redis aborting for OUT OF MEMORY"); + serverPanic("Redis aborting for OUT OF MEMORY. Allocating %zu bytes!", + allocation_size); } void redisSetProcTitle(char *title) {