system.errors

Contains error codes with the number of times they have been triggered.

Columns:

  • name (String) — name of the error (errorCodeToName).
  • code (Int32) — code number of the error.
  • value (UInt64) — the number of times this error has been happened.
  • last_error_time (DateTime) — time when the last error happened.
  • last_error_message (String) — message for the last error.
  • last_error_trace (Array(UInt64)) — A stack trace which represents a list of physical addresses where the called methods are stored.
  • remote (UInt8) — remote exception (i.e. received during one of the distributed query).

Example

  1. SELECT name, code, value
  2. FROM system.errors
  3. WHERE value > 0
  4. ORDER BY code ASC
  5. LIMIT 1
  6. ┌─name─────────────┬─code─┬─value─┐
  7. CANNOT_OPEN_FILE 76 1
  8. └──────────────────┴──────┴───────┘
  1. WITH arrayMap(x -> demangle(addressToSymbol(x)), last_error_trace) AS all
  2. SELECT name, arrayStringConcat(all, '\n') AS res
  3. FROM system.errors
  4. LIMIT 1
  5. SETTINGS allow_introspection_functions=1\G