Search failed because its attempt to write a readonly database attempt to write a readonly database. Try refreshing the series info and verify the necessary information is present before searching again

Sonarr version (4.0.16.2944:
Mono version (if Sonarr is not running on Windows):
*Window 11:
Debug logs:

This issue is similar to the topic : “Cannot add new show or download anything” Feb 19
however it is closed. Sonarr is not updating files, nor am I able to select download files.
Recently, I had to download Sonarr, Radarr and Sabnzbd to a new computer. Restored config files with backups. After a day or two I had the issue with Sonarr, however Radarr works fine. Uninstalled and reinstalled Sonarr replaced config files with backups. That worked for a couple of days. Issue returned and no problem with Radarr. It there a possibility the issue could be a permission issue with the C:\Data\Media\TV file?
Log level was already set a debug.
I’m not clear if I can copy and the paste the Log file. Here it is:
2025-12-17 23:00:13.1|Error|TaskExtensions|Task Error

[v4.0.16.2944] code = ReadOnly (8), message = System.Data.SQLite.SQLiteException (0x800017FF): attempt to write a readonly database
attempt to write a readonly database
at System.Data.SQLite.SQLite3.Reset(SQLiteStatement stmt)
at System.Data.SQLite.SQLite3.Step(SQLiteStatement stmt)
at System.Data.SQLite.SQLiteDataReader.NextResult()
at System.Data.SQLite.SQLiteDataReader…ctor(SQLiteCommand cmd, CommandBehavior behave)
at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)
at Dapper.SqlMapper.ExecuteReaderWithFlagsFallback(IDbCommand cmd, Boolean wasClosed, CommandBehavior behavior) in //Dapper/SqlMapper.cs:line 1075
at Dapper.SqlMapper.QueryMultipleImpl(IDbConnection cnn, CommandDefinition& command) in /
/Dapper/SqlMapper.cs:line 1058
at NzbDrone.Core.Datastore.BasicRepository1.Insert(IDbConnection connection, IDbTransaction transaction, TModel model) in ./Sonarr.Core/Datastore/BasicRepository.cs:line 188 at NzbDrone.Core.Datastore.BasicRepository1.Insert(TModel model) in ./Sonarr.Core/Datastore/BasicRepository.cs:line 151
at NzbDrone.Core.Messaging.Commands.CommandQueueManager.Push[TCommand](TCommand command, CommandPriority priority, CommandTrigger trigger) in ./Sonarr.Core/Messaging/Commands/CommandQueueManager.cs:line 140
at NzbDrone.Core.Jobs.Scheduler.ExecuteCommands() in ./Sonarr.Core/Jobs/Scheduler.cs:line 42
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
— End of stack trace from previous location —
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)

Let me know if you need any additional info or clarification

The user running Sonarr doesn’t have write access to it’s database, either because you’ve changed how Sonarr is running (service vs tray/console) or the permissions on the file changed. You could try running Sonarr once as Admin to see if that help or failing that, manually set the permissions on the database, which by default n Windows is located at C:\ProgramData\Sonarr\sonarr.db

Thanks for the quick response!!! I’ll check into that.

I right clicked on the Sonarr app, selected “Run as Administrator”. It seemed to work. Closed Sonarr app and restarted it…worked perfectly! It must have re-initialized permissions. Thank you so much. I really appreciate your help! :grinning:

1 Like