Database errors, explained
What the message means, why it happens and how to fix it, for the errors people search for most. Every one was reproduced on a real server, and the output on each page is what that server printed.
PostgreSQL
55- canceling statement due to conflict with recoveryA query on a read replica was cancelled because the primary removed rows it still needed, or took a lock it conflicts with, and the replica couldn’t wait any longer to apply that change. Retry the query; for long reports, raise max_standby_streaming_delay or turn on hot_standby_feedback, each with its own cost.
- canceling statement due to lock timeoutThe statement waited longer than lock_timeout for a lock another session holds, so it gave up before doing anything. Find the blocking session (often one left idle in a transaction), then retry.
- canceling statement due to statement timeoutThe statement ran longer than statement_timeout allows, so the server cancelled it and undid its work. Either the query is slow, it was stuck waiting for a lock, or the limit is too short for this job.
- cannot cast type toPostgreSQL has no cast between these two types, so :: or CAST can’t convert one into the other. Use a conversion function that says how (to_timestamp for epoch seconds, extract for the reverse), go through text when the text form is valid, or rethink the conversion.
- cannot drop because other objects depend on itSomething else is built on the object you’re dropping: a view on the table, a foreign key pointing at it, a column of that type. The DETAIL lines list them. Drop or change those first, or use CASCADE once you’ve read exactly what it will remove.
- cannot drop the currently open databaseYou ran DROP DATABASE while connected to that same database, and a session can’t remove the database it’s using. Connect to another database on the same server (postgres is always there) and drop it from there, or use dropdb, which does that for you.
- cannot execute INSERT in a read-only transactionThe transaction is read-only, so the server refuses any write. Either you’re connected to a read replica (a hot standby), or something turned on read-only mode: default_transaction_read_only for the session, role or database, or BEGIN READ ONLY. Connect to the primary, or turn it off on purpose.
- column cannot be cast automatically to typeALTER TABLE … ALTER COLUMN … TYPE needs to know how to convert the existing values, and there’s no automatic conversion between these two types. Add USING with an expression, usually the one in the HINT, after checking every value converts.
- column does not existPostgreSQL can’t find a column by that name in the tables your query can see. Most often a string was written in double quotes, which PostgreSQL reads as a column name; otherwise it’s a typo, a capitalised name, or an alias used where it doesn’t exist yet.
- column is of type but expression is of typeYou’re writing a value of one type into a column of another, and PostgreSQL won’t convert it on its own. Cast the value (::integer, ::jsonb), or fix where its type comes from: a text column in an INSERT … SELECT, or a driver that sends every parameter as varchar.
- column must appear in the GROUP BY clause or be used in an aggregate functionYour query groups rows, and one column in SELECT, HAVING or ORDER BY could have several different values within a group, so PostgreSQL won’t pick one for you. Add it to GROUP BY, wrap it in an aggregate, or group by the table’s primary key.
- column reference is ambiguousTwo tables in your query, or a table and a PL/pgSQL variable, have something with the same name, and you used it without saying which. Prefix it with the table or alias, such as c.id instead of id.
- Connection refused: Is the server running on that host and accepting TCP/IP connections?Your client reached the machine, but nothing there was listening on that port, so the operating system refused the connection. The server isn’t running, you have the wrong port, or it only listens on other addresses.
- connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such file or directoryWith no host given, psql connects through a Unix socket file, and that file isn’t there. Either no PostgreSQL server is running on this machine, it uses another port or socket folder, or it runs in Docker or on another machine. Start it, point at its socket, or use -h localhost.
- could not extend file: No space left on deviceThe disk (or volume, or tablespace) holding the database is full, so PostgreSQL can’t grow a table or write a temporary file. Free space or grow the volume. Find the cause first: a big table, old WAL kept by a replication slot, temporary files from a huge query, or logs. Never delete files in pg_wal yourself.
- could not resize shared memory segment: No space left on deviceA parallel query needed shared memory in /dev/shm and there wasn’t enough. This is almost always PostgreSQL in a container with a small /dev/shm (Docker’s default is 64 MB). Give the container a bigger --shm-size, or turn parallel query down.
- could not serialize access due to concurrent updateYour transaction runs at REPEATABLE READ or SERIALIZABLE, and another transaction changed data in a way that breaks that promise, so PostgreSQL cancelled yours. This is expected: roll back and run the whole transaction again.
- current transaction is aborted, commands ignored until end of transaction blockAn earlier statement in this transaction failed, and PostgreSQL refuses everything else until the transaction ends. Find that first error, run ROLLBACK, and start again.
- database does not existYou signed in, but the server has no database with exactly that name. Often the client used your user name because no database was given, or you’ve reached a different server than you meant.
- database is being accessed by other usersDROP DATABASE, ALTER DATABASE … RENAME and CREATE DATABASE … TEMPLATE need nobody else connected to that database, and someone is. The DETAIL says how many sessions. Find them in pg_stat_activity and close them, or on PostgreSQL 13 and later use DROP DATABASE … WITH (FORCE).
- date/time field value out of rangeA date or time string has a field that can’t be right: day 30 of February, month 13, hour 25, or the day and month the wrong way round for the DateStyle setting. Send ISO dates (2026-12-25), or parse with to_date and an explicit format.
- deadlock detectedTwo transactions were each waiting for a lock the other held, so PostgreSQL cancelled one of them. Retry the cancelled transaction, and make your code take locks in the same order everywhere so it doesn’t happen again.
- division by zeroSomething in the statement divided by zero, and PostgreSQL refuses rather than returning infinity or NULL. Wrap the divisor in NULLIF(divisor, 0) so the result is NULL instead, or decide what a zero should mean with CASE.
- duplicate key value violates unique constraintA row would give a primary key or unique column a value another row already has. If the clash is on an id you didn’t supply, the table’s sequence is behind the data (usually after an import) and needs moving past the highest id.
- extension is not availableCREATE EXTENSION looks for the extension’s files on the database server, and they aren’t there. Install the extension’s package on the machine (or image) that runs PostgreSQL, for the same major version; on a hosted service, use one it supports. Check the spelling too: it’s uuid-ossp, not uuid_ossp.
- fe_sendauth: no password suppliedThe server asked for a password and your client had none to give: nothing in the connection string, no PGPASSWORD, no matching line in ~/.pgpass, and no way to ask you. Supply the password in one of those places.
- function does not existPostgreSQL found no function with that name that accepts those argument types. Read the types in the message: usually an argument needs a cast, the function lives in an extension or schema you haven’t got on the path, or it’s another database’s function.
- insert or update on table violates foreign key constraintA foreign key says every value in a child column must exist in the parent table. Either you’re inserting or updating a child row whose parent isn’t there, or you’re deleting or changing a parent row that child rows still point at.
- integer out of rangeA value, or the result of arithmetic on integers, went past what the type holds: about ±2.1 billion for integer, ±32,767 for smallint. Do the arithmetic in bigint, or change the column (and its sequence) to bigint.
- invalid byte sequence for encoding "UTF8"PostgreSQL received bytes that aren’t valid UTF-8, usually a file saved in Latin-1 or Windows-1252 (é is 0xe9 there), or a NUL byte (0x00), which text can’t hold. Tell PostgreSQL the file’s real encoding, or convert the file, or strip the NULs.
- invalid input syntax for typePostgreSQL tried to turn a piece of text into a typed value (an integer, a uuid, a boolean, JSON) and the text isn’t in a form that type accepts. The quoted value in the message is exactly what it got, which usually shows the problem: an empty string, a comma, or a word like “undefined”.
- missing FROM-clause entry for tableA column is prefixed with a table name or alias (c.name, orders.id) that the query’s FROM clause doesn’t provide. Use the alias you gave the table, or add the table to FROM (UPDATE … FROM, DELETE … USING).
- more than one row returned by a subquery used as an expressionA subquery in brackets, used where a single value belongs, returned two or more rows. Decide which you want: test membership with IN or EXISTS, combine the rows with an aggregate, or choose one with ORDER BY … LIMIT 1.
- new row violates check constraintA row you inserted or updated breaks a CHECK rule on the table. The message names the constraint and DETAIL shows the whole row; look up the rule, then fix the value, or the rule if it’s wrong.
- no pg_hba.conf entry for hostNo line in the server’s pg_hba.conf matches your connection, so the server turns it away before it asks for a password. Add a rule for the host, user, database and encryption named in the message, or connect the way an existing rule expects (often with TLS).
- null value in column violates not-null constraintA row would have NULL in a column declared NOT NULL. Either the statement left the column out and it has no default, or something sent an explicit NULL, which PostgreSQL stores as NULL even when the column has a default.
- numeric field overflowA value has more digits before the decimal point than its numeric(p,s) column allows: numeric(5,2) stops at 999.99. The DETAIL gives the limit. Widen the column (raising the precision is cheap) or find the value that’s too big.
- ON CONFLICT DO UPDATE command cannot affect row a second timeOne upsert statement contains two or more rows with the same key, so it would update the same row twice. Remove the duplicates from the batch first (DISTINCT ON or GROUP BY), deciding which version wins.
- operator does not exist: integer = textYou’re comparing (or adding, or matching) two values of different types, and PostgreSQL has no operator for that pair and won’t convert one silently. Cast one side so both are the same type, or fix the column that has the wrong type.
- out of shared memory (max_locks_per_transaction)The server’s shared lock table is full: transactions are holding locks on more tables, indexes and partitions at once than it has room for. Raise max_locks_per_transaction (needs a restart), or touch fewer objects per transaction, for example fewer partitions per query.
- password authentication failed for userThe server asked for a password and didn’t accept the one it got. Either the password is wrong, or the user doesn’t exist: PostgreSQL deliberately gives the same message for both.
- permission denied for tableYour role lacks a privilege the statement needs on the object the message names: a table, a schema, a sequence or a database. Grant that privilege (and USAGE on the schema), or run the statement as a role that has it.
- prepared statement already existsThe session already has a prepared statement with that name. In your own SQL, DEALLOCATE it or use another name. From an application, it nearly always means a connection pooler in transaction mode is mixing different clients’ prepared statements on one server connection.
- relation already existsYou’re creating a table, index, view or sequence with a name that’s already taken in that schema. Tables, indexes, views and sequences share one set of names per schema, so the clash may be with a different kind of object. Find what holds the name, then skip, rename or drop it.
- relation does not existPostgreSQL found no table, view or sequence with that exact name in the schemas it searched. Usually the name was created with capitals in double quotes, the table is in a schema that isn’t on your search_path, or you’re connected to a different database.
- role does not existThe server has no role (user) with exactly that name. Usually the client sent a name you didn’t choose, such as your Mac user name or root, or the server’s first superuser isn’t called postgres.
- server closed the connection unexpectedlyThe connection to the server ended without a goodbye. Either the server process serving you died (often killed for using too much memory), the server restarted, or something on the network dropped an idle connection. The server log tells you which; reconnect, then fix that cause.
- server does not support SSL, but SSL was requiredYour client was told to require TLS (sslmode=require or stronger), and the server said it doesn’t do TLS, so the client stopped. Either connect without requiring it, which is fine on your own machine, or turn TLS on in the server.
- sorry, too many clients alreadyEvery connection slot on the server is in use, so it turns new ones away. Find which clients hold them, close the idle ones, and make your connection pools fit inside max_connections.
- syntax error at or nearPostgreSQL couldn’t parse the statement, and the quoted word is where it gave up. The mistake is usually right before that point: a reserved word used as a name, a missing or extra comma, MySQL-only syntax, or a quote or bracket that isn’t closed.
- terminating connection due to administrator commandThe server ended your session on purpose: someone or something called pg_terminate_backend() on it, or the server is shutting down or restarting. Your open transaction was rolled back. Reconnect and retry, then check the server log to see which it was.
- terminating connection due to idle-in-transaction timeoutYour session opened a transaction and then sat idle inside it for longer than idle_in_transaction_session_timeout, so the server closed the connection and rolled the transaction back. Find the code that leaves transactions open between statements; raise the limit only for sessions that need it.
- there is no unique or exclusion constraint matching the ON CONFLICT specificationAn upsert (INSERT … ON CONFLICT) names columns that no unique index or constraint covers exactly. Add a unique constraint on those columns, or write the ON CONFLICT target to match the index you have, including its WHERE clause or expressions.
- unterminated quoted string at or nearA single quote opened a string that never closed before the statement ended. Usually an apostrophe in the data (O’Brien) ended the string early: double it in the SQL, or better, pass the value as a parameter. For “unterminated dollar-quoted string”, a tool cut the statement at a semicolon inside $$ … $$.
- value too long for type character varyingA string is longer than its column allows: varchar(n) and char(n) hold at most n characters. The message doesn’t name the column, so match the n against your table’s columns, then widen the column (cheap) or shorten the value.
MySQL and MariaDB
45- ERROR 1040: Too many connectionsEvery connection slot the server allows (max_connections, 151 by default) is taken, so it turns new ones away. Usually an app holds more connections than it needs: leaked, idle or stuck behind slow queries. Find them first; raise the limit only if the load is real.
- ERROR 1044 (42000): Access denied for user to databaseThe server accepted your password, but the account it matched has no privileges on the database you named, or can’t create it. Check which account you are with CURRENT_USER() and SHOW GRANTS, then grant access or use the right database.
- ERROR 1045 (28000): Access denied for userThe server didn’t accept the user, password and client address you connected with. MySQL gives the same message for a wrong password, an unknown user and an account that only exists for another host.
- ERROR 1046 (3D000): No database selectedThe statement names a table without saying which database it’s in, and the connection has no default database. Connect with a database, run USE <database> first, or write database.table.
- ERROR 1048 (23000): Column cannot be nullAn INSERT or UPDATE put NULL into a column declared NOT NULL. Sending NULL explicitly doesn’t use the column’s default, so leave the column out (or write DEFAULT), send a real value, or make the column nullable.
- ERROR 1049 (42000): Unknown databaseThe server has no database with that exact name. Check the spelling and letter case against SHOW DATABASES, make sure you’re on the server you think, and create it if it was never made.
- ERROR 1052 (23000): Column in field list is ambiguousThe query joins tables that both have a column with that name, and one place in the query names it without saying which table. Prefix it with the table or its alias: o.id instead of id.
- ERROR 1054 (42S22): Unknown column in 'field list'The query names a column the server can’t find in the tables it’s reading. Often the column really is missing or misspelt; as often, it’s a string written without quotes, or a SELECT alias used in WHERE.
- ERROR 1055 (42000): Expression of SELECT list is not in GROUP BY clause (only_full_group_by)Your query groups rows but also selects a column that can have several values in a group, so MySQL can’t know which one to show. Add the column to GROUP BY, wrap it in an aggregate such as MAX(), or use ANY_VALUE() if any value will do.
- ERROR 1062 (23000): Duplicate entry for keyA row you inserted or updated has the same value as an existing row in a PRIMARY KEY or UNIQUE index, so the server refused it. The message gives the value and the index; the clash can be less obvious than it looks, because comparisons follow the column’s collation.
- ERROR 1064 (42000): You have an error in your SQL syntaxThe parser hit something it couldn’t make sense of. The text after “near” is where it gave up; the mistake is usually right before it. “near ''” means the statement ended too early.
- ERROR 1067 (42000): Invalid default value for 'created_at'A column’s DEFAULT isn’t a valid value for its type under the current SQL mode. Most often it’s a zero date (0000-00-00) on a DATETIME or TIMESTAMP column from an older schema, which MySQL 8 refuses; replace it with NULL or CURRENT_TIMESTAMP.
- ERROR 1071 (42000): Specified key was too long; max key length is 3072 bytesAn index can hold at most 3072 bytes per entry (767 with the older COMPACT and REDUNDANT row formats), and utf8mb4 counts 4 bytes for every character a column may hold. Index fewer characters, use a prefix index, or index a hash of the value.
- ERROR 1093 (HY000): You can't specify target table for update in FROM clauseMySQL won’t let an UPDATE or DELETE read the table it’s changing in a subquery. Wrap that subquery in a derived table, which MySQL materialises first, or rewrite the statement as a multi-table UPDATE or DELETE with a join. MariaDB 10.3 and later allow most of these statements.
- ERROR 1114 (HY000): The table is fullThe table can’t grow any more. For a MEMORY table, it has reached the size max_heap_table_size allowed when it was created; for an InnoDB table, the disk (or a fixed-size tablespace) is usually full. The table name in the message tells you which.
- ERROR 1118 (42000): Row size too large (> 8126)A row can’t fit InnoDB’s limits: all columns together may declare at most 65,535 bytes, and the part of a row kept on the page must stay under about 8 KB. Change the widest VARCHAR or CHAR columns to TEXT, or split the table.
- ERROR 1130 (HY000): Host is not allowed to connect to this MySQL serverThe server has no account at all whose host part matches the address you’re connecting from, so it refuses you before checking any password. Create an account for that address (or a range of them) and grant it what it needs.
- ERROR 1136 (21S01): Column count doesn't match value count at row 1An INSERT supplies a different number of values than the columns it fills: all the table’s columns when it names none. Name the columns explicitly and give exactly one value for each, in every row.
- ERROR 1142 (42000): SELECT command denied to user for tableYour account can use the database but doesn’t have the privilege the statement needs on that table: SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP… Check SHOW GRANTS and grant the missing privilege to the exact account.
- ERROR 1146 (42S02): Table doesn't existThe database named in the message has no table with exactly that name. Most often it’s letter case: macOS and Windows ignore it, Linux doesn’t. Otherwise you’re in the wrong database, or the table hasn’t been created.
- ERROR 1153 (08S01): Got a packet bigger than 'max_allowed_packet' bytesA single statement or value you sent was larger than the server’s max_allowed_packet, so it refused it and closed the connection. Raise max_allowed_packet on the server (and the client), or send smaller pieces: shorter multi-row INSERTs, files in chunks.
- ERROR 1175 (HY000): You are using safe update modeSafe updates is on for your session (MySQL Workbench and mysql --safe-updates turn it on), and the UPDATE or DELETE doesn’t limit itself by a key column or with LIMIT. Filter by the primary key or another indexed column, add LIMIT, or run SET SQL_SAFE_UPDATES = 0 when you mean to change every row.
- ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transactionYour statement waited too long for a lock another session holds, usually a transaction left open, and gave up. Find the blocking session and commit, roll back or kill it. Only the timed-out statement is undone; the rest of your transaction is still open.
- ERROR 1213 (40001): Deadlock found when trying to get lock; try restarting transactionTwo transactions each waited for a lock the other held, so InnoDB rolled one of them back, entirely. Retry that transaction; to make deadlocks rarer, take locks in the same order, keep transactions short, and avoid check-then-insert.
- ERROR 1215 (HY000): Cannot add foreign key constraintThe server refused to create a foreign key because the two columns don’t match exactly, the referenced column has no suitable index, or a table can’t have foreign keys. MySQL 8 names the cause in a specific error; MariaDB says “errno: 150” and puts the reason in SHOW WARNINGS.
- ERROR 1227 (42000): Access denied; you need (at least one of) the SUPER privilege(s) for this operationThe statement needs an administrative privilege your account doesn’t have; the message lists which would do. Most often it’s a dump being imported into a hosted database: remove the DEFINER clauses and the SQL_LOG_BIN and GTID_PURGED lines, or re-dump without them.
- ERROR 1242 (21000): Subquery returns more than 1 rowA subquery sits where only one value can go (after =, in the select list, in SET), but for at least one row it returned several. Decide which one you mean: use IN to accept them all, MAX() or MIN() for one, ORDER BY … LIMIT 1 for the latest, or a join.
- ERROR 1248 (42000): Every derived table must have its own aliasA subquery used as a table, in FROM or JOIN, has no name after its closing bracket. Add one: FROM (SELECT …) AS t. MariaDB reports the same mistake as a syntax error (1064).
- ERROR 1264 (22003): Out of range value for columnThe number is larger (or smaller) than the column’s type can hold: over 127 for TINYINT, over 2,147,483,647 for INT, a negative number in an UNSIGNED column, or too many digits for a DECIMAL. Widen the column, or store the value as text if it isn’t really a number.
- ERROR 1265 (01000): Data truncated for columnThe value can’t be stored in the column without losing part of it, so strict mode refuses it. Most often it’s a string that isn’t one of an ENUM’s values, or an ALTER TABLE that makes a column too small for the data already in it.
- ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statementThe server only reads and writes files for SELECT … INTO OUTFILE, LOAD DATA INFILE and LOAD_FILE() in the directory secure_file_priv names, and your path is outside it. Use a path in that directory (SELECT @@secure_file_priv), or move the file through the client instead.
- ERROR 1292 (22007): Incorrect datetime valueThe value isn’t a date and time MySQL accepts for that column: an empty string, 0000-00-00, a day that doesn’t exist, a format like 10/11/2026 or 2026-10-11T09:30:00Z, or a TIMESTAMP outside 1970–2038. Send YYYY-MM-DD HH:MM:SS (or NULL), or convert with STR_TO_DATE().
- ERROR 1364 (HY000): Field doesn't have a default valueThe INSERT didn’t give a value for a NOT NULL column that has no DEFAULT, so in strict mode the server refuses the row. Send a value for it, give the column a default, or let it be NULL.
- ERROR 1366 (HY000): Incorrect string value: '\xF0\x9F…' for columnThe text contains characters the column’s character set can’t store, most often an emoji going into a utf8 (really utf8mb3) or latin1 column, or a connection that isn’t utf8mb4. Convert the column to utf8mb4 and connect with utf8mb4.
- ERROR 1406 (22001): Data too long for columnA value is longer than its column’s declared size, so in strict mode the server rejects the row instead of cutting it short. Check the column’s size, then widen the column or shorten the value.
- ERROR 1418 (HY000): This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabledWith binary logging on, MySQL wants every stored function to declare what it does: DETERMINISTIC, NO SQL or READS SQL DATA. Add the one that’s true. If you then get 1419 (no SUPER privilege), an administrator has to set log_bin_trust_function_creators = 1.
- ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint failsOther rows still point at the row you tried to delete or whose key you tried to change. Delete or re-point those child rows first, or change the foreign key so the server does it for you with ON DELETE CASCADE or SET NULL.
- ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint failsYou inserted or updated a row whose foreign key points at a parent row that doesn’t exist. Insert the parent first, use NULL when there’s no parent, or find and fix the orphaned rows.
- ERROR 1524 (HY000): Plugin 'mysql_native_password' is not loadedMySQL 8.4 turns the old mysql_native_password sign-in method off by default, so accounts that still use it can’t sign in, and you can’t create new ones with it. Switch each account to caching_sha2_password with ALTER USER; enable the plugin only as a stopgap.
- ERROR 2002 (HY000): Can't connect to local MySQL server through socketYour client tried to reach a server on the same machine through a Unix socket file and nothing answered there. Either the server isn’t running, it uses a different socket path, or you meant to connect over TCP.
- ERROR 2003 (HY000): Can't connect to MySQL server on 'host'Your client couldn’t open a TCP connection to the server’s host and port. The number at the end says how: (111) or (61) means refused, nothing is listening there; (110) or (60) means timed out, something in between dropped it.
- ERROR 2006 (HY000): MySQL server has gone awayYour client sent a statement on a connection the server had already closed. Usually it sat idle longer than wait_timeout (8 hours by default); otherwise the statement was over max_allowed_packet, someone killed the connection, or the server restarted. Reconnect, and find out which.
- ERROR 2013 (HY000): Lost connection to MySQL server during queryThe connection closed while your client was waiting for an answer: the query was killed, a timeout or proxy cut it off, the server restarted, or the server closed an idle connection. “At reading initial communication packet” means it closed before sign-in, usually the wrong port or a broken tunnel.
- ERROR 2059 (HY000): Authentication plugin 'caching_sha2_password' cannot be loadedThe account signs in with an authentication method your client library doesn’t have: caching_sha2_password (MySQL 8’s default) with a client built for MySQL 5.7, or MariaDB’s ed25519 with a MySQL client. Update the client or driver; changing the account to another method is the fallback.
- ERROR 3819 (HY000): Check constraint is violatedThe row breaks a CHECK constraint on the table, a rule such as price > 0, so the server refused it. Look up the constraint’s expression, then send a value that satisfies it, or change the rule if it’s wrong. MariaDB reports the same thing as error 4025.
SQL Server and Azure SQL
42- A network-related or instance-specific error occurred while establishing a connection to SQL ServerYour client never reached a SQL Server that answered: the name didn’t resolve, nothing listened on the port, a firewall dropped it, or (for host\INSTANCE) SQL Server Browser didn’t say which port the instance uses. The provider and error number at the end of the message tell you which.
- ALTER TABLE DROP COLUMN failed because one or more objects access this columnSomething else uses the column: most often a default constraint with a generated name like DF__orders__status__25C68D63, or an index, key, CHECK constraint or schema-bound view. Each 5074 line names one; drop those first (look the default’s name up, it differs per database), then drop or alter the column.
- Ambiguous column name (SQL Server error 209)Two or more tables in the query have a column with that name, and you used it without saying which table you meant. Prefix it with the table’s alias (c.id, not id). In ORDER BY, giving the selected columns distinct aliases also works.
- An expression of non-boolean type specified in a context where a condition is expectedT-SQL has no true/false values you can use on their own, so WHERE, ON, HAVING, IF, WHILE and CASE WHEN need a comparison: active = 1, not active; email IS NOT NULL, not email; 1 = 1, not TRUE. The “near” part points right after the incomplete condition.
- Arithmetic overflow error converting expression to data type intA value didn’t fit its data type: an int total past 2,147,483,647, a decimal with too few digits, or an int IDENTITY that has used every value. Cast to bigint or a wider decimal before the calculation (SUM(CAST(x AS bigint)), COUNT_BIG), widen the column, or move the id to bigint.
- Cannot drop the table because it does not exist or you do not have permissionSQL Server couldn’t drop the object: either there’s nothing by that name where you’re looking (wrong database, wrong schema, already dropped) or you aren’t allowed to drop it, and the message doesn’t say which. Use DROP … IF EXISTS in scripts, and check the database and schema.
- Cannot find the user because it does not exist or you do not have permissionThe statement names a user, login, role or schema that SQL Server can’t find, or one you lack the permission to change, and the message deliberately doesn’t say which. Most often you granted to a login’s name in a database where that login has no user yet: create the user first.
- Cannot insert explicit value for identity column in table when IDENTITY_INSERT is set to OFFThe column is an IDENTITY, so SQL Server makes its values, and your INSERT supplied one. Leave the column out of the insert, or, when you really need those ids (copying or restoring rows), run SET IDENTITY_INSERT <table> ON and list the columns.
- Cannot insert the value NULL into column; column does not allow nulls. INSERT fails.The statement would put NULL in a column declared NOT NULL. Usually the INSERT leaves the column out and it has no default, or the code sends an explicit NULL, which a default doesn’t replace.
- Cannot open database requested by the login. The login failed. (Error 4060)Your login and password were accepted, but the database named in the connection string couldn’t be opened for that login: it doesn’t exist, isn’t online, or the login has no user in it. SQL Server then fails the whole sign-in with error 18456 as well.
- Column is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clauseA grouped query returns one row per group, so every column you select must be in the GROUP BY or inside an aggregate such as MAX or SUM. SQL Server doesn’t guess which row’s value you meant.
- Column is of a type that is invalid for use as a key column in an indexIndex keys, primary keys and UNIQUE constraints can’t use the (max) types (nvarchar(max), varchar(max), varbinary(max)) or the old text, ntext and image. Give the column a real length if the data allows, index a hash of it, or move it to the INCLUDE list.
- Conversion failed when converting the varchar value to data type intSQL Server tried to turn a string into a number and met a value that isn’t one. Often you didn’t ask for a conversion: comparing a text column with a number, or adding a number to a string, converts the text side.
- Could not drop object because it is referenced by a FOREIGN KEY constraintAnother table has a foreign key pointing at the one you’re dropping, so SQL Server won’t leave that key pointing at nothing. Find the referencing foreign keys in sys.foreign_keys, then drop the child tables first or drop the constraints. TRUNCATE TABLE refuses for the same reason (4712).
- Divide by zero error encounteredAn expression divided by zero (with / or %), so SQL Server stopped the statement. Write the division as x / NULLIF(y, 0) to get NULL for those rows instead, and COALESCE that if you need a number.
- Incorrect syntax nearSQL Server couldn’t parse the batch, so none of it ran. The quoted text is where the parser gave up, which is often right after the real mistake; most often it’s syntax from MySQL or PostgreSQL, or a batch separator problem.
- Incorrect syntax near the keywordSQL Server’s parser met a reserved word (FROM, WHERE, ORDER, KEY, IF…) where it can’t go, so none of the batch ran. The mistake is usually right before that word: a trailing comma, a missing ON or alias, a column named like a keyword, or syntax from another database.
- INSERT failed because the following SET options have incorrect settings: QUOTED_IDENTIFIERThe table has a filtered index, an index on a computed column or an indexed view, and those only work with the standard SET options. Your session, or the procedure you called, had one off, usually QUOTED_IDENTIFIER. Run sqlcmd with -I, and re-create procedures that were created with it off.
- Introducing FOREIGN KEY constraint may cause cycles or multiple cascade pathsSQL Server allows only one chain of cascading actions from one table to another, and none that loops back. The new foreign key’s ON DELETE or ON UPDATE action would make a second path or a cycle. Make it NO ACTION and delete or clear those rows yourself, in code or an INSTEAD OF trigger.
- Invalid column name (SQL Server error 207)SQL Server couldn’t find a column with that name in the tables your statement uses. Usually it’s a typo or the wrong table, but a string in double quotes, a SELECT alias used in WHERE, and a column added earlier in the same batch all give the same error.
- Invalid object name (SQL Server error 208)SQL Server couldn’t find a table or view with that name from where your statement ran. Usually you’re in the wrong database, or the table is in another schema than your default (dbo); temp tables out of scope and case-sensitive databases give the same error.
- Lock request time out period exceeded. (SQL Server error 1222)Your statement waited longer than its SET LOCK_TIMEOUT for a lock another session holds, so SQL Server cancelled that one statement. Your transaction is still open. Find the blocker with sys.dm_exec_requests and commit, roll back or end it.
- Login failed for user (Microsoft SQL Server, Error: 18456)SQL Server refused the sign-in and, on purpose, didn’t tell your client why: every client sees state 1. The real reason is in the server’s error log, as a state number and a “Reason:” line: 8 is a wrong password, 5 a login that doesn’t exist, 38 a database you can’t open.
- Only one expression can be specified in the select list when the subquery is not introduced with EXISTSA subquery used as a list of values (after IN) or as a single value (after =, or as a column) must return exactly one column, and yours returns several, or SELECT *. Select the one column you compare against, or rewrite it with EXISTS, a join or OUTER APPLY.
- Procedure or function expects parameter which was not suppliedThe procedure has a parameter with no default, and the call didn’t pass it: it was left out, misspelt, or (from .NET) its value was null, which means “use the default”. Pass every required parameter by name, send DBNull.Value for NULL, or give the parameter a default.
- Procedure or function has too many arguments specifiedYou passed more arguments than the procedure or function declares. Usually the code is newer than the procedure on this server (a migration hasn’t run there), or it calls another schema’s procedure of the same name. Compare the call with sys.parameters, then update one side.
- String or binary data would be truncated in table, column. Truncated valueA value is longer than its column allows, so SQL Server refused the whole statement. Error 2628 names the table, column and the start of the value; the older 8152 names nothing, and appears on databases at compatibility level 140 or lower.
- Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >=A subquery used as a single value (after =, in SET, as a column) found several rows. Decide which one you mean, or compare against the set with IN or EXISTS. In triggers, it usually means the code assumes one row at a time.
- The certificate chain was issued by an authority that is not trusted (SQL Server)Your client encrypted the connection and checked the server’s certificate, and nobody it trusts signed it: usually SQL Server’s own self-signed certificate. ODBC Driver 18 and Microsoft.Data.SqlClient 4.0 encrypt by default, so it often appears after an upgrade. Give the server a certificate the client can verify, or trust its CA; TrustServerCertificate only skips the check.
- The COMMIT TRANSACTION request has no corresponding BEGIN TRANSACTIONYou ran COMMIT (3902) or ROLLBACK (3903) with no transaction open. Usually something already ended it: an error with XACT_ABORT on, a deadlock, a procedure’s ROLLBACK, or an earlier ROLLBACK in your own code, so the work you meant to commit may be gone. Find that first error.
- The conversion of a varchar data type to a datetime data type resulted in an out-of-range valueSQL Server read your text as a date and got an impossible one (month 31, 30 February) or one outside the type’s range (datetime starts in 1753). Usually the day and month were swapped: the session’s language decides the order. Error 241 is the same problem when the text isn’t a date at all.
- The current transaction cannot be committed and cannot support operations that write to the log file. Roll back the transaction.An earlier error doomed your transaction: it can only be rolled back. Error 3930 means you tried to write or commit in it anyway; 3998 means a batch ended with it still open, so SQL Server rolled it back. In CATCH, check XACT_STATE() and roll back before doing anything else.
- The INSERT statement conflicted with the CHECK constraintThe row you inserted or updated makes a CHECK constraint’s condition false, so SQL Server refused the whole statement. Read the constraint’s definition, then fix the value, or the rule if the rule is wrong.
- The INSERT statement conflicted with the FOREIGN KEY constraintA foreign key says every value in a column must exist in another table. INSERT or UPDATE conflicted with the FOREIGN KEY constraint means the parent row isn’t there; DELETE conflicted with the REFERENCE constraint means other rows still point at the one you’re removing.
- The multi-part identifier could not be boundA name such as c.id or customers.name points at a table that isn’t in scope where you used it. Usually the table has an alias and you wrote its full name, the alias is misspelt, or the table isn’t in the statement’s FROM at all.
- The SELECT permission was denied on the object (SQL Server error 229)Your database user lacks the permission the statement needs on that table, view or procedure, or a DENY overrides a GRANT. Check what you have with fn_my_permissions, then have the owner grant it to a role you’re in. Dynamic SQL inside a procedure is a common surprise.
- The server principal is not able to access the database under the current security contextYour login is signed in to the server but has no way into that database: there’s no database user for it, its user was orphaned by a restore, or you’re running under EXECUTE AS USER, which is confined to one database. Add or re-map the user, or change how the procedure impersonates.
- The transaction log for database is full due to 'LOG_BACKUP'The log file can’t grow and none of its space can be reused yet. The reason in quotes says what’s holding it: LOG_BACKUP means the database is in FULL recovery and needs a log backup; ACTIVE_TRANSACTION means a long or forgotten transaction. Fix that, and writes work again.
- There is already an object named … in the databaseYou tried to create a table, view, procedure or constraint with a name that’s already taken in that schema. Find what holds the name in sys.objects, then drop it first, create only if it’s missing, or use CREATE OR ALTER. Named constraints on temp tables clash between sessions.
- Transaction (Process ID …) was deadlocked on lock resources with another process and has been chosen as the deadlock victimTwo sessions each held a lock the other needed, so SQL Server ended one of them, rolled back its whole transaction and sent it error 1205. Retry that transaction; to make deadlocks rarer, change rows and tables in the same order, keep transactions short, and index what you update.
- Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statementsA stored procedure ended with a different number of open transactions than it started with. “Previous count = 0, current count = 1” means it left one open; “Previous count = 1, current count = 0” means its ROLLBACK undid the caller’s transaction too. Commit or roll back on every path, and use a savepoint when called inside a transaction.
- Violation of PRIMARY KEY constraint. Cannot insert duplicate key in objectA row would give a primary key, UNIQUE constraint (2627) or unique index (2601) a value another row already has, so the statement fails and writes nothing. If the value is an id you didn’t supply, the IDENTITY or sequence is behind the data.
SQLite
22- ambiguous column nameMore than one table in the query has a column with that name, and you used it without saying which. Put the table name or alias in front of it: c.id instead of id.
- attempt to write a readonly databaseSQLite opened the database but can’t write to it. Either the process lacks write permission on the file, its folder or its -wal and -shm files, or the database was opened read-only on purpose.
- Cannot add a NOT NULL column with default value NULLALTER TABLE ADD COLUMN fills the new column in every existing row with its default, and with no default that’s NULL, which NOT NULL forbids. Give the column a constant default, or add it nullable and fill it.
- cannot start a transaction within a transactionYou ran BEGIN while a transaction was already open on the connection, often one your driver began for you. SQLite transactions don’t nest: commit the open one first, or use SAVEPOINT for an inner transaction.
- CHECK constraint failedThe row you inserted or updated breaks a CHECK rule on the table. The message gives the rule’s name, or its expression if it has no name; compare your values with it.
- database disk image is malformedSQLite read a page of the file that doesn’t make sense: the database is corrupt. Stop writing to it, work on a copy, run PRAGMA integrity_check to see what’s damaged, then rebuild an index or recover the data into a new file.
- database is lockedAnother connection holds a lock on the database file, and yours gave up instead of waiting. Set a busy timeout so it waits, switch to WAL so readers stop blocking the writer, and keep write transactions short.
- database or disk is fullA write needed more space than SQLite could get. Either the disk (or the temporary folder SQLite sorts and vacuums in) is full, or the database reached a page limit set with PRAGMA max_page_count.
- database table is lockedThe conflict is inside your own connection, or between connections sharing a cache: usually a DROP while a SELECT on the same connection is unfinished, or shared-cache mode. A busy timeout doesn’t help; finish the statement or stop using shared cache.
- datatype mismatchYou tried to store something other than a whole number in an INTEGER PRIMARY KEY column, which is the table’s rowid: a UUID, an empty string, a decimal, or a CSV header. STRICT tables give a related error for any column.
- disk I/O errorThe operating system reported an error when SQLite read, wrote or synced the database or one of its side files. It’s rarely SQLite itself: look at the drive, a network share, or a limit on file size.
- file is not a databaseThe file doesn’t start with an SQLite header, so SQLite won’t read it. Usually it isn’t an SQLite database at all (a CSV, a SQL dump, a compressed backup, a Git LFS pointer) or it’s encrypted.
- FOREIGN KEY constraint failedA row refers to a parent row that doesn’t exist, or you tried to delete or change a parent that other rows still refer to. SQLite checks this only when PRAGMA foreign_keys = ON, which is off on every new connection.
- near "…": syntax errorSQLite’s parser reached the quoted word and couldn’t fit it into any valid statement. The mistake is at that word or right before it: often a reserved word used as a name, a missing or extra comma, or syntax from another database.
- no such columnSQLite can’t find a column by that name in the tables your statement uses. Usually it’s a typo, a column your migrations haven’t added to this file, or text written in double quotes, which SQLite reads as a column name.
- no such functionThe statement calls a function this SQLite doesn’t have. Usually it’s a function from another database (NOW, DATE_FORMAT, LEFT), REGEXP, which SQLite leaves to the program, or a function added in a newer SQLite than yours.
- no such tableSQLite looked for the table in the database file you opened and didn’t find it. Most often it’s the wrong file: SQLite quietly creates an empty database when the path doesn’t exist.
- NOT NULL constraint failedThe row you inserted or updated has no value (NULL) in a column declared NOT NULL. The message names the table and column: supply a value, leave the column out if it has a default, or fill the NULLs first.
- table … already existsThe database already has a table, view or index by that name, so SQLite won’t create another. Use CREATE TABLE IF NOT EXISTS when that’s what you mean; otherwise find out why the table is there before you drop anything.
- too many SQL variablesThe statement has more bound parameters (?, :name) than this SQLite allows: 999 before 3.32.0, 32,766 by default since, more in some builds. Pass the list as one JSON value, or split the work into batches.
- unable to open database fileSQLite asked the operating system to open or create the file, and it refused. Most often the folder in the path doesn’t exist, or the process isn’t allowed to read the file or create one there.
- UNIQUE constraint failedThe row you inserted or updated has the same value as an existing row in a column (or set of columns) that must be unique. The message names the table and column; find the row that already has that value.
MongoDB
25- BSONError: input must be a 24 character hex string, 12 byte Uint8Array, or an integerYou passed something to ObjectId() that isn’t 24 hexadecimal characters, so the driver couldn’t build an id and nothing was sent to the server. Check the value with ObjectId.isValid before converting it, and answer a bad id with an error of your own.
- BSONObj size is invalid. Size must be between 0 and 16793600(16MB)A document can be at most 16 MB, and this write, update or pipeline would produce a bigger one. Find what grows (usually an array or an embedded file), move it into its own collection or GridFS, and keep $push and $group results small.
- Cannot apply $inc to a value of non-numeric typeThe field you’re incrementing holds something that isn’t a number in at least one document: a string such as “12”, null, or an array. Find those documents with $type, convert or reset the values, and make sure your code writes numbers.
- Cannot do exclusion on field in inclusion projectionYour projection both includes fields (1) and excludes fields (0), and MongoDB allows only one or the other; _id is the one exception. List only the fields you want, or only the fields you don’t.
- Cast to ObjectId failed for valueMongoose tried to turn a value into an ObjectId and couldn’t, because it isn’t 24 hex characters. Usually a route parameter such as “undefined”, “me” or a mistyped id; check it with isValidObjectId and answer 400 or 404.
- CursorNotFound: cursor id not foundYou were reading results in batches and the server no longer had the cursor when you asked for the next batch: it timed out while idle, its session expired, it was killed, or the request went to another server. Fetch faster, or page through the data by _id.
- Document failed validationThe collection has a validator, and the document your insert or update would produce breaks one of its rules. The error’s errInfo field says which rule and which field; fix the document, or change the rules if they’re wrong.
- E11000 duplicate key error collectionA unique index already holds the value your insert or update tried to write. The message names the collection, the index and the duplicate key; find the document that has it, then upsert, change the value or remove duplicates.
- Exceeded memory limit for $group, but didn't allow external sortA $group stage needed more than 100 MB of memory, and the aggregation wasn’t allowed to write temporary files. Filter before grouping, keep less in each group (especially with $push), or allow disk use (Atlas free and Flex clusters can’t).
- Index already exists with a different namecreateIndex asked for an index that clashes with one already on the collection: same keys under another name, or the same name with different keys or options (unique, TTL, sparse). Look at the existing index, then drop and recreate it, or change TTL with collMod.
- MaxTimeMSExpired: operation exceeded time limitThe operation ran longer than the time limit it was given (maxTimeMS, set by your code, driver, ODM or a server default) and the server stopped it. Make it faster (an index, less data) or find what it waited for; raise the limit only if the time is expected.
- MongoServerError: Authentication failedThe server didn’t accept the user name and password for the database the client authenticated against. Usually the password is wrong or authSource names a database where the user doesn’t exist; MongoDB gives the same message for both.
- MongoServerError: ns not foundThe command (dropIndex, renameCollection, collMod, validate, $collStats…) needs a collection that doesn’t exist in the database you’re using. Check the database and collection names, including case; queries and inserts never raise it.
- MongoServerSelectionError: connect ECONNREFUSEDYour driver couldn’t reach a usable MongoDB server before its timeout (30 seconds by default), so the query was never sent. The text after the colon says why: nothing listening, a name that doesn’t resolve, a blocked network, or a replica set that doesn’t match.
- MongoTopologyClosedError: Topology is closedYour code closed the MongoClient while an operation, or connect() itself, was still waiting for a server. Close the client once, when the app shuts down, after every operation has finished, and share one client instead of closing it per request.
- not authorized on db to execute commandYou signed in, but your user has no role that allows this command on this database. Check which roles the connection has, then grant the role it needs on the right database, or connect as a user that has it.
- Performing an update on the path '_id' would modify the immutable field '_id'A document’s _id can never change, and your update or replacement would change it, often only its type (a string instead of an ObjectId). Remove _id from the update; to really change an id, insert a copy with the new one and delete the old document.
- Sort exceeded memory limit of 104857600 bytes, but did not opt in to external sortingMongoDB had to sort the results in memory, the sort needed more than 100 MB, and the query wasn’t allowed to spill to disk. Give the sort an index, sort fewer or smaller documents, or allow disk use (Atlas free and Flex clusters can’t).
- text index required for $text queryA $text search only works on a collection with a text index, and this one has none. Create a text index on the fields to search (one per collection, covering all of them), or use $regex for simple pattern matches.
- The dollar ($) prefixed field is not valid for storageAn update put a name starting with $ where MongoDB expected a field name: an operator inside a replacement document, $set on a $-named field, or an aggregation expression in a classic update. Use the right update form, or $setField when the $ name is really data.
- Transaction numbers are only allowed on a replica set member or mongosYou started a transaction (or a retryable write) on a standalone mongod, and only replica sets and sharded clusters support them. Run the server as a replica set; a single-member set is enough for development.
- Unknown modifier: $… Expected a valid update modifier or pipeline-style updateA top-level key of your update document isn’t an update operator MongoDB knows: a typo ($sett), the wrong case ($addtoset), an aggregation operator ($concat), or a plain field mixed in with operators. Use a real update operator, or a pipeline update for expressions.
- unknown operator: $…Your query filter contains a $ name MongoDB doesn’t know as a query operator: a typo ($regx, $exist), the wrong case ($Lt), one from SQL or another database ($like, $contains), or an aggregation expression used without $expr.
- Updating the path would create a conflict atOne update document changes the same field twice, or a field and one of its parents: $set and $setOnInsert on the same field, $push and $pull on one array, $set on an object and on a path inside it. Give each field one operator, or split the work.
- WriteConflict: Please retry your operation or multi-document transactionTwo transactions changed the same document at the same time; the one that got there second is aborted with WriteConflict and the TransientTransactionError label. Retry the whole transaction (withTransaction does it for you) and keep transactions short.
Redis and Valkey
27- BUSY Redis is busy running a script. You can only call SCRIPT KILL or SHUTDOWN NOSAVE.A Lua script or function has held the server for longer than busy-reply-threshold (5 seconds by default), so Redis answers almost everything else with BUSY. Stop it with SCRIPT KILL (FUNCTION KILL for a function); if it has already written, only SHUTDOWN NOSAVE stops it.
- BUSYGROUP Consumer Group name already existsXGROUP CREATE asked for a consumer group that this stream already has, typically because your worker creates its group every time it starts. Nothing changed and the existing group is untouched. Ignore BUSYGROUP when creating groups at start-up, or check XINFO GROUPS first.
- CLUSTERDOWN The cluster is down (and Hash slot not served)Some hash slots have no working node: a primary failed with no replica to take over, or slots were never assigned. By default the whole cluster then refuses commands, even for keys on healthy nodes. Bring the node back or fail over, or assign the missing slots.
- Could not connect to Redis at 127.0.0.1:6379: Connection refusedYour client reached the machine, but nothing there accepted a connection on that port, so the operating system refused it. Redis isn’t running, the port is wrong or not published from Docker, or Redis listens only on other addresses.
- CROSSSLOT Keys in request don't hash to the same slotIn Redis Cluster, a command, transaction or script that names several keys only runs if they all fall in the same hash slot, even when both slots are on one node. Put related keys in one slot with a hash tag such as {user:1}, or send one command per key.
- ERR AUTH <password> called without any password configured for the default userYour client sent a password, but this server has none set: its default user signs in without one. Usually the client is configured for another server (production has a password, your local one doesn’t). Remove the password from the client, or set one on the server.
- ERR DB index is out of rangeYou asked for a database number this server doesn’t have: databases are numbered from 0, and there are 16 (0 to 15) unless the databases setting says otherwise. A cluster, Redis Cloud and some hosted services have database 0 only. Use a number that exists, or key prefixes instead.
- ERR max number of clients reachedRedis already has maxclients connections open (10,000 by default, fewer if the file descriptor limit is low), so it turns new ones away. Usually an application holds connections it doesn’t need. Find them with CLIENT LIST, fix the pool or leak, then raise the limit if the load is real.
- ERR syntax errorRedis didn’t understand the options after a command’s fixed arguments: often a value with spaces that wasn’t quoted, so its second word was read as an option, or two options that can’t go together (EX and PX, NX and XX). Nothing ran. Quote the value or fix the options.
- ERR This instance has cluster support disabledYou sent a CLUSTER command to a standalone Redis or Valkey server, usually because the client was set up as a cluster client (which starts by asking for the cluster’s slots). The server isn’t a cluster and can’t become one while it runs. Use a standalone client, or connect to a real cluster.
- ERR unknown command '…', with args beginning withThe server has no command by that name: it’s misspelt, newer than the server, part of a module that isn’t loaded (JSON.*, FT.*), or renamed or disabled by its configuration. Nothing ran. Check the name with COMMAND INFO and the version with INFO server.
- ERR user_script:1: Lua script errors in RedisA Lua script run with EVAL, EVALSHA or FCALL failed: user_script:1 is the line. Most often it used a global variable (Redis forbids them), did arithmetic on the false that redis.call returns for a missing key, or passed nil or a table to redis.call. Commands before the error stay done.
- ERR value is not an integer or out of rangeRedis needed a whole number, either the value stored in the key (for INCR, DECR, INCRBY) or an argument (a TTL, a count, an index), and got text, a decimal, or a number beyond 64 bits. Nothing changed. Check the stored value with GET and the arguments you send.
- ERR wrong number of arguments for '…' commandThe command got more or fewer arguments than it takes, so Redis refused it without running it. Usually a value went missing (an empty shell variable or list) or an odd number of field-value pairs was sent. Count what was actually sent; MONITOR shows it.
- EXECABORT Transaction discarded because of previous errors.A command you queued after MULTI was refused straight away (a typo, wrong arguments, no permission, no memory), so at EXEC Redis threw the whole transaction away and ran none of it. The real cause is the error that came before EXEC.
- LOADING Redis is loading the dataset in memoryThe server has started (or a replica is resyncing) and is still reading its data from disk into memory. Until it finishes, most commands get LOADING. Wait and retry: INFO persistence shows the progress. Then find out why it restarted.
- MASTERDOWN Link with MASTER is down and replica-serve-stale-data is set to 'no'You’re connected to a replica that isn’t in sync with its primary (the primary is down, unreachable, refuses its password, or the first sync is still running), and replica-serve-stale-data is no, so it refuses reads rather than return old data. Fix the link, or read from the primary.
- MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to diskRedis’s last background save (BGSAVE) failed, and with stop-writes-on-bgsave-error on (the default) it refuses writes until a save succeeds. The log says why: usually a full disk, a directory Redis can’t write to, or fork() failing for lack of memory.
- MOVED 3999 127.0.0.1:6381 (and ASK) in Redis ClusterYou sent a command to a Redis Cluster node that doesn’t hold that key’s slot; the reply names the slot and the node that does. Cluster-aware clients (redis-cli -c, cluster clients in each library) follow it; a client connected to one node shows it as an error.
- NOAUTH Authentication required.The server needs you to sign in, and your connection sent a command before it did. Give your client the password (and user name, for an ACL user), or send AUTH first.
- NOGROUP No such key or consumer groupXREADGROUP, XPENDING, XCLAIM or another group command named a stream that doesn’t exist or a consumer group it doesn’t have. Groups live inside the stream key, so deleting or expiring the stream deletes them too. Create the group with XGROUP CREATE … MKSTREAM before reading.
- NOPERM User reader has no permissions to run the 'set' commandYou’re signed in as an ACL user that isn’t allowed to run that command, or to use that key or channel, so the server refused it without running it. Check which user you are and what it may do, then sign in as another user or change its rules.
- NOSCRIPT No matching script. Please use EVAL.EVALSHA asked for a script by its SHA1, and this server’s script cache doesn’t have it: the cache empties on a restart, isn’t copied to replicas, and is separate on each cluster node. Load it again with SCRIPT LOAD (or send EVAL) and retry, or move the code into a function.
- OOM command not allowed when used memory > 'maxmemory'Redis has reached its own memory limit (maxmemory) and its eviction policy can’t or won’t free space, so it refuses commands that would add data. Reads and deletes still work. Free memory, choose an eviction policy that fits your data, or raise the limit.
- READONLY You can't write against a read only replicaThe server you sent the write to is a replica, and replicas refuse writes by default. Connect to the primary instead: check the endpoint you use, and reconnect after a failover, because the old primary becomes a replica and keeps your connection open.
- WRONGPASS invalid username-password pair or user is disabled.The server didn’t accept the user name and password you signed in with. Redis gives the same answer for a wrong password, a user that doesn’t exist and a user that’s turned off, so check all three.
- WRONGTYPE Operation against a key holding the wrong kind of valueYou ran a command for one data type on a key that holds another, such as GET on a hash. Nothing changed. Check the key with TYPE, then use that type’s commands or give the two kinds of data different key names.
Download Inlet
Signed and notarized by Apple. It keeps itself up to date, and asks before it checks.
Version 0.2.0 · macOS 26 Tahoe or later · Apple silicon and Intel