diff --git a/include/zbxcacheconfig.h b/include/zbxcacheconfig.h
index ccc5564a6ea..bf4deccf8be 100644
--- a/include/zbxcacheconfig.h
+++ b/include/zbxcacheconfig.h
@@ -204,7 +204,7 @@ typedef struct
 	char			ssl_key_file_orig[ZBX_ITEM_SSL_KEY_FILE_LEN_MAX], *ssl_key_file;
 	char			ssl_key_password_orig[ZBX_ITEM_SSL_KEY_PASSWORD_LEN_MAX], *ssl_key_password;
 	zbx_vector_ptr_pair_t 	script_params;
-	char			*error;
+	char			error_hash[ZBX_SHA512_BINARY_LENGTH];
 	unsigned char		*formula_bin;
 	int			snmp_max_repetitions;
 	unsigned char		preprocessing;
@@ -233,7 +233,7 @@ typedef struct
 	zbx_uint64_t		valuemapid;
 	char			key_orig[ZBX_ITEM_KEY_LEN * ZBX_MAX_BYTES_IN_UTF8_CHAR + 1];
 	char			*units;
-	char			*error;
+	char			error_hash[ZBX_SHA512_BINARY_LENGTH];
 	char			*history_period, *trends_period;
 	int			mtime;
 	int			history_sec;
diff --git a/include/zbxcommon.h b/include/zbxcommon.h
index af19b0715f7..5caeff652cf 100644
--- a/include/zbxcommon.h
+++ b/include/zbxcommon.h
@@ -681,6 +681,8 @@ int	zbx_alarm_timed_out(void);
 #define ZBX_PREPROC_FAIL_SET_VALUE	2
 #define ZBX_PREPROC_FAIL_SET_ERROR	3
 
+#define ZBX_SHA512_BINARY_LENGTH 64
+
 /* includes terminating '\0' */
 #define CUID_LEN	26
 void	zbx_new_cuid(char *cuid);
diff --git a/include/zbxdbhigh.h b/include/zbxdbhigh.h
index 73a6b3ea769..93401b11a79 100644
--- a/include/zbxdbhigh.h
+++ b/include/zbxdbhigh.h
@@ -752,6 +752,7 @@ typedef struct
 	unsigned char	state;
 	int		mtime;
 	const char	*error;
+	char		error_hash[ZBX_SHA512_BINARY_LENGTH];
 
 	zbx_uint64_t	flags;
 #define ZBX_FLAGS_ITEM_DIFF_UNSET			__UINT64_C(0x0000)
diff --git a/src/libs/zbxcacheconfig/dbconfig.c b/src/libs/zbxcacheconfig/dbconfig.c
index 80ac081ff45..4c2349ca3ae 100644
--- a/src/libs/zbxcacheconfig/dbconfig.c
+++ b/src/libs/zbxcacheconfig/dbconfig.c
@@ -3737,7 +3737,7 @@ static void	DCsync_items(zbx_dbsync_t *sync, zbx_uint64_t revision, int flags, z
 			item->state = (unsigned char)atoi(row[12]);
 			ZBX_STR2UINT64(item->lastlogsize, row[20]);
 			item->mtime = atoi(row[21]);
-			dc_strpool_replace(found, &item->error, row[27]);
+			zbx_sha512_hash(row[27], item->error_hash);
 			item->data_expected_from = now;
 			item->location = ZBX_LOC_NOWHERE;
 			item->poller_type = ZBX_NO_POLLER;
@@ -4000,7 +4000,6 @@ static void	DCsync_items(zbx_dbsync_t *sync, zbx_uint64_t revision, int flags, z
 			zbx_binary_heap_remove_direct(&config->queues[item->poller_type], item->itemid);
 
 		dc_strpool_release(item->key);
-		dc_strpool_release(item->error);
 		dc_strpool_release(item->delay);
 		dc_strpool_release(item->history_period);
 
@@ -9693,10 +9692,7 @@ static void	DCget_item(zbx_dc_item_t *dst_item, const ZBX_DC_ITEM *src_item)
 
 	dst_item->delay = zbx_strdup(NULL, src_item->delay);	/* not used, should be initialized */
 
-	if ('\0' != *src_item->error)
-		dst_item->error = zbx_strdup(NULL, src_item->error);
-	else
-		dst_item->error = NULL;
+	memcpy(dst_item->error_hash, src_item->error_hash, sizeof(dst_item->error_hash));
 
 	switch (src_item->value_type)
 	{
@@ -9941,7 +9937,6 @@ void	zbx_dc_config_clean_items(zbx_dc_item_t *items, int *errcodes, size_t num)
 		}
 
 		zbx_free(items[i].delay);
-		zbx_free(items[i].error);
 	}
 }
 
@@ -14858,7 +14853,7 @@ void	zbx_dc_config_items_apply_changes(const zbx_vector_item_diff_ptr_t *item_di
 			dc_item->mtime = diff->mtime;
 
 		if (0 != (ZBX_FLAGS_ITEM_DIFF_UPDATE_ERROR & diff->flags))
-			dc_strpool_replace(1, &dc_item->error, diff->error);
+			memcpy(dc_item->error_hash, diff->error_hash, sizeof(dc_item->error_hash));
 
 		if (0 != (ZBX_FLAGS_ITEM_DIFF_UPDATE_STATE & diff->flags))
 			dc_item->state = diff->state;
diff --git a/src/libs/zbxcacheconfig/dbconfig.h b/src/libs/zbxcacheconfig/dbconfig.h
index b8369a4936f..afcb36feb68 100644
--- a/src/libs/zbxcacheconfig/dbconfig.h
+++ b/src/libs/zbxcacheconfig/dbconfig.h
@@ -286,7 +286,7 @@ typedef struct
 	zbx_uint64_t		valuemapid;
 	const char		*key;
 	const char		*port;
-	const char		*error;
+	char			error_hash[ZBX_SHA512_BINARY_LENGTH];
 	const char		*delay;
 	const char		*delay_ex;
 	const char		*history_period;
diff --git a/src/libs/zbxcacheconfig/dbconfig_dump.c b/src/libs/zbxcacheconfig/dbconfig_dump.c
index 5ab05a1a155..eeb2f543d59 100644
--- a/src/libs/zbxcacheconfig/dbconfig_dump.c
+++ b/src/libs/zbxcacheconfig/dbconfig_dump.c
@@ -630,7 +630,7 @@ static void	DCdump_items(void)
 				item->itemid, item->hostid, item->key, item->revision);
 		zabbix_log(LOG_LEVEL_TRACE, "  type:%u value_type:%u", item->type, item->value_type);
 		zabbix_log(LOG_LEVEL_TRACE, "  interfaceid:" ZBX_FS_UI64, item->interfaceid);
-		zabbix_log(LOG_LEVEL_TRACE, "  state:%u error:'%s'", item->state, item->error);
+		zabbix_log(LOG_LEVEL_TRACE, "  state:%u", item->state);
 		zabbix_log(LOG_LEVEL_TRACE, "  flags:%u status:%u", item->flags, item->status);
 		zabbix_log(LOG_LEVEL_TRACE, "  valuemapid:" ZBX_FS_UI64, item->valuemapid);
 		zabbix_log(LOG_LEVEL_TRACE, "  lastlogsize:" ZBX_FS_UI64 " mtime:%d", item->lastlogsize, item->mtime);
diff --git a/src/libs/zbxcacheconfig/dbhistoryconfig.c b/src/libs/zbxcacheconfig/dbhistoryconfig.c
index 29c86e77615..ed1285f33d6 100644
--- a/src/libs/zbxcacheconfig/dbhistoryconfig.c
+++ b/src/libs/zbxcacheconfig/dbhistoryconfig.c
@@ -65,10 +65,7 @@ static void	dc_get_history_sync_item(zbx_history_sync_item_t *dst_item, const ZB
 	dst_item->lastlogsize = src_item->lastlogsize;
 	dst_item->mtime = src_item->mtime;
 
-	if ('\0' != *src_item->error)
-		dst_item->error = zbx_strdup(NULL, src_item->error);
-	else
-		dst_item->error = NULL;
+	memcpy(dst_item->error_hash, src_item->error_hash, sizeof(dst_item->error_hash));
 
 	dst_item->inventory_link = src_item->inventory_link;
 	dst_item->valuemapid = src_item->valuemapid;
@@ -231,7 +228,6 @@ void	zbx_dc_config_clean_history_sync_items(zbx_history_sync_item_t *items, int
 		if (ITEM_VALUE_TYPE_FLOAT == items[i].value_type || ITEM_VALUE_TYPE_UINT64 == items[i].value_type)
 			zbx_free(items[i].units);
 
-		zbx_free(items[i].error);
 		zbx_free(items[i].history_period);
 		zbx_free(items[i].trends_period);
 	}
diff --git a/src/zabbix_proxy/cachehistory/cachehistory_proxy.c b/src/zabbix_proxy/cachehistory/cachehistory_proxy.c
index 859eb60733c..0594100418c 100644
--- a/src/zabbix_proxy/cachehistory/cachehistory_proxy.c
+++ b/src/zabbix_proxy/cachehistory/cachehistory_proxy.c
@@ -25,6 +25,7 @@
 #include "zbxstr.h"
 #include "zbx_item_constants.h"
 #include "zbxproxybuffer.h"
+#include "zbxhash.h"
 
 static char	*sql = NULL;
 static size_t	sql_alloc = 4 * ZBX_KIBIBYTE;
@@ -306,12 +307,17 @@ static void	proxy_prepare_history(zbx_dc_history_t *history, int history_num, zb
 			diff->state = h->state;
 			diff->error = (ITEM_STATE_NOTSUPPORTED == h->state ? h->value.err : "");
 			diff->flags |= ZBX_FLAGS_ITEM_DIFF_UPDATE_STATE | ZBX_FLAGS_ITEM_DIFF_UPDATE_ERROR;
+			zbx_sha512_hash(diff->error, diff->error_hash);
 		}
-		else if (ITEM_STATE_NOTSUPPORTED == h->state &&
-				0 != strcmp(ZBX_NULL2EMPTY_STR(items[i].error), h->value.err))
+		else if (ITEM_STATE_NOTSUPPORTED == h->state)
 		{
-			diff->error = h->value.err;
-			diff->flags |= ZBX_FLAGS_ITEM_DIFF_UPDATE_ERROR;
+			zbx_sha512_hash(h->value.err, diff->error_hash);
+
+			if (0 != memcmp(items[i].error_hash, diff->error_hash, sizeof(items[i].error_hash)))
+			{
+				diff->error = h->value.err;
+				diff->flags |= ZBX_FLAGS_ITEM_DIFF_UPDATE_ERROR;
+			}
 		}
 
 		if (0 != (ZBX_DC_FLAG_META & history[i].flags))
diff --git a/src/zabbix_server/cachehistory/cachehistory_server.c b/src/zabbix_server/cachehistory/cachehistory_server.c
index f32bee0453c..574cc6ea146 100644
--- a/src/zabbix_server/cachehistory/cachehistory_server.c
+++ b/src/zabbix_server/cachehistory/cachehistory_server.c
@@ -36,6 +36,7 @@
 #include "zbxstr.h"
 #include "zbxvariant.h"
 #include "zbxescalations.h"
+#include "zbxhash.h"
 
 /******************************************************************************
  *                                                                            *
@@ -592,6 +593,7 @@ static zbx_item_diff_t	*calculate_item_update(zbx_history_sync_item_t *item, con
 {
 	zbx_uint64_t	flags = 0;
 	const char	*item_error = NULL;
+	char		error_hash[ZBX_SHA512_BINARY_LENGTH];
 	zbx_item_diff_t	*diff;
 
 	if (0 != (ZBX_DC_FLAG_META & h->flags))
@@ -618,7 +620,9 @@ static zbx_item_diff_t	*calculate_item_update(zbx_history_sync_item_t *item, con
 						NULL, NULL, NULL, 0, 0, NULL, 0, NULL, 0, NULL, NULL, h->value.err);
 			}
 
-			if (0 != strcmp(ZBX_NULL2EMPTY_STR(item->error), h->value.err))
+			zbx_sha512_hash(h->value.err, error_hash);
+
+			if (0 != memcmp(item->error_hash, error_hash, sizeof(error_hash)))
 				item_error = h->value.err;
 		}
 		else
@@ -635,14 +639,19 @@ static zbx_item_diff_t	*calculate_item_update(zbx_history_sync_item_t *item, con
 			}
 
 			item_error = "";
+			zbx_sha512_hash(item_error, error_hash);
 		}
 	}
-	else if (ITEM_STATE_NOTSUPPORTED == h->state && 0 != strcmp(ZBX_NULL2EMPTY_STR(item->error), h->value.err))
+	else if (ITEM_STATE_NOTSUPPORTED == h->state)
 	{
-		zabbix_log(LOG_LEVEL_WARNING, "error reason for \"%s:%s\" changed: %s", item->host.host,
-				item->key_orig, h->value.err);
+		zbx_sha512_hash(h->value.err, error_hash);
+		if (0 != memcmp(item->error_hash, error_hash, sizeof(item->error_hash)))
+		{
+			zabbix_log(LOG_LEVEL_WARNING, "error reason for \"%s:%s\" changed: %s", item->host.host,
+					item->key_orig, h->value.err);
 
-		item_error = h->value.err;
+			item_error = h->value.err;
+		}
 	}
 
 	if (NULL != item_error)
@@ -668,7 +677,10 @@ static zbx_item_diff_t	*calculate_item_update(zbx_history_sync_item_t *item, con
 	}
 
 	if (0 != (ZBX_FLAGS_ITEM_DIFF_UPDATE_ERROR & flags))
+	{
 		diff->error = item_error;
+		memcpy(diff->error_hash, error_hash, sizeof(diff->error_hash));
+	}
 
 	return diff;
 }
diff --git a/src/zabbix_server/lld/lld_worker.c b/src/zabbix_server/lld/lld_worker.c
index 4b2fd2c5ec5..e147a0f50d0 100644
--- a/src/zabbix_server/lld/lld_worker.c
+++ b/src/zabbix_server/lld/lld_worker.c
@@ -28,6 +28,7 @@
 #include "zbxalgo.h"
 #include "zbxcacheconfig.h"
 #include "zbxdbhigh.h"
+#include "zbxhash.h"
 
 /******************************************************************************
  *                                                                            *
@@ -116,10 +117,15 @@ static void	lld_process_task(const zbx_ipc_message_t *message)
 		}
 
 		/* with successful LLD processing LLD error will be set to empty string */
-		if (NULL != error && 0 != strcmp(error, ZBX_NULL2EMPTY_STR(item.error)))
+		if (NULL != error)
 		{
-			diff.error = error;
-			diff.flags |= ZBX_FLAGS_ITEM_DIFF_UPDATE_ERROR;
+			zbx_sha512_hash(error, diff.error_hash);
+
+			if (0 != memcmp(item.error_hash, diff.error_hash, sizeof(item.error_hash)))
+			{
+				diff.error = error;
+				diff.flags |= ZBX_FLAGS_ITEM_DIFF_UPDATE_ERROR;
+			}
 		}
 	}
 
