diff --git a/include/common.h b/include/common.h
index a276efbcdf6..502f04d749b 100644
--- a/include/common.h
+++ b/include/common.h
@@ -1690,6 +1690,8 @@ char	*zbx_expression_extract_constant(const char *src, const zbx_strloc_t *loc);
 #define ZBX_RETRIEVE_MODE_HEADERS	1
 #define ZBX_RETRIEVE_MODE_BOTH		2
 
+#define ZBX_SHA512_BINARY_LENGTH 64
+
 zbx_log_value_t	*zbx_log_value_dup(const zbx_log_value_t *src);
 
 int	zbx_validate_value_dbl(double value, int dbl_precision);
diff --git a/include/db.h b/include/db.h
index 15cd325fb72..702955ea0a6 100644
--- a/include/db.h
+++ b/include/db.h
@@ -818,6 +818,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/include/dbcache.h b/include/dbcache.h
index b56d16cc487..40c7902ee40 100644
--- a/include/dbcache.h
+++ b/include/dbcache.h
@@ -186,7 +186,7 @@ typedef struct
 	char			ssl_key_file_orig[ITEM_SSL_KEY_FILE_LEN_MAX], *ssl_key_file;
 	char			ssl_key_password_orig[ITEM_SSL_KEY_PASSWORD_LEN_MAX], *ssl_key_password;
 	char			*script_params;
-	char			*error;
+	char			error_hash[ZBX_SHA512_BINARY_LENGTH];
 	unsigned char		*formula_bin;
 }
 DC_ITEM;
@@ -210,7 +210,7 @@ typedef struct
 	zbx_uint64_t		valuemapid;
 	char			key_orig[ITEM_KEY_LEN * ZBX_MAX_BYTES_IN_UTF8_CHAR + 1];
 	char			*units;
-	char			*error;
+	char			error_hash[ZBX_SHA512_BINARY_LENGTH];
 	int			mtime;
 	int			history_sec;
 	int			trends_sec;
diff --git a/src/libs/zbxdbcache/dbcache.c b/src/libs/zbxdbcache/dbcache.c
index 776b9c935df..555e9e7d504 100644
--- a/src/libs/zbxdbcache/dbcache.c
+++ b/src/libs/zbxdbcache/dbcache.c
@@ -33,6 +33,7 @@
 #include "zbxavailability.h"
 #include "zbxtrends.h"
 #include "../zbxalgo/vectorimpl.h"
+#include "sha512crypt.h"
 
 static zbx_mem_info_t	*hc_index_mem = NULL;
 static zbx_mem_info_t	*hc_mem = NULL;
@@ -1954,6 +1955,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))
@@ -1977,7 +1979,9 @@ static zbx_item_diff_t	*calculate_item_update(zbx_history_sync_item_t *item, con
 			zbx_add_event(EVENT_SOURCE_INTERNAL, EVENT_OBJECT_ITEM, item->itemid, &h->ts, h->state, 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
@@ -1991,14 +1995,19 @@ 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, NULL);
 
 			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)
@@ -2024,7 +2033,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/libs/zbxdbcache/dbconfig.c b/src/libs/zbxdbcache/dbconfig.c
index d1c26a42f9e..3ce541ba300 100644
--- a/src/libs/zbxdbcache/dbconfig.c
+++ b/src/libs/zbxdbcache/dbconfig.c
@@ -33,6 +33,7 @@
 #include "zbxtrends.h"
 #include "zbxvault.h"
 #include "zbxserialize.h"
+#include "sha512crypt.h"
 
 int	sync_in_progress = 0;
 
@@ -2821,7 +2822,7 @@ static void	DCsync_items(zbx_dbsync_t *sync, int flags)
 			item->state = (unsigned char)atoi(row[12]);
 			ZBX_STR2UINT64(item->lastlogsize, row[20]);
 			item->mtime = atoi(row[21]);
-			DCstrpool_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;
@@ -3497,7 +3498,6 @@ static void	DCsync_items(zbx_dbsync_t *sync, int flags)
 			zbx_binary_heap_remove_direct(&config->queues[item->poller_type], item->itemid);
 
 		zbx_strpool_release(item->key);
-		zbx_strpool_release(item->error);
 		zbx_strpool_release(item->delay);
 
 		if (NULL != item->triggers)
@@ -7663,10 +7663,7 @@ static void	DCget_item(DC_ITEM *dst_item, const ZBX_DC_ITEM *src_item)
 
 	dst_item->delay = zbx_strdup(NULL, src_item->delay);
 
-	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)
 	{
@@ -7968,7 +7965,6 @@ void	DCconfig_clean_items(DC_ITEM *items, int *errcodes, size_t num)
 		}
 
 		zbx_free(items[i].delay);
-		zbx_free(items[i].error);
 	}
 }
 
@@ -12749,7 +12745,7 @@ void	DCconfig_items_apply_changes(const zbx_vector_ptr_t *item_diff)
 			dc_item->mtime = diff->mtime;
 
 		if (0 != (ZBX_FLAGS_ITEM_DIFF_UPDATE_ERROR & diff->flags))
-			DCstrpool_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/zbxdbcache/dbconfig.h b/src/libs/zbxdbcache/dbconfig.h
index ceba5dbdf79..9588a9b4ca4 100644
--- a/src/libs/zbxdbcache/dbconfig.h
+++ b/src/libs/zbxdbcache/dbconfig.h
@@ -95,7 +95,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;
 	ZBX_DC_TRIGGER		**triggers;
 	int			nextcheck;
diff --git a/src/libs/zbxdbcache/dbconfig_dump.c b/src/libs/zbxdbcache/dbconfig_dump.c
index 59cc4c7d42f..3c20de4ddd4 100644
--- a/src/libs/zbxdbcache/dbconfig_dump.c
+++ b/src/libs/zbxdbcache/dbconfig_dump.c
@@ -642,7 +642,7 @@ static void	DCdump_items(void)
 				item->itemid, item->hostid, item->key);
 		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/zbxdbcache/dbhistoryconfig.c b/src/libs/zbxdbcache/dbhistoryconfig.c
index 590499e80f1..16cc0d507f3 100644
--- a/src/libs/zbxdbcache/dbhistoryconfig.c
+++ b/src/libs/zbxdbcache/dbhistoryconfig.c
@@ -60,10 +60,7 @@ static void	dc_get_history_sync_item(zbx_history_sync_item_t *dst_item, const ZB
 	dst_item->mtime = src_item->mtime;
 	dst_item->flags = src_item->flags;
 
-	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;
@@ -158,8 +155,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);
 	}
 }
 
diff --git a/src/zabbix_server/lld/lld_worker.c b/src/zabbix_server/lld/lld_worker.c
index 5d1bb8ebf0d..8f57af54707 100644
--- a/src/zabbix_server/lld/lld_worker.c
+++ b/src/zabbix_server/lld/lld_worker.c
@@ -26,6 +26,7 @@
 #include "proxy.h"
 #include "../events.h"
 #include "lld_protocol.h"
+#include "sha512crypt.h"
 
 extern ZBX_THREAD_LOCAL unsigned char	process_type;
 extern unsigned char			program_type;
@@ -113,10 +114,15 @@ static void	lld_process_task(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;
+			}
 		}
 	}
 
