I’m also getting this same error.
I too just restarted my system hoping it may fix this issue, as if there was a DB lock going on. I imagine that is the issue though: two instances trying to open the DB and the main instance has it locked in read-only mode.
| Key |
Value |
| .NET |
Yes (6.0.13) |
| AppData Directory |
C:\ProgramData\Sonarr |
| Database |
Sqlite 3.36.0 |
| Database Migration |
217 |
| Mode |
Service |
| Startup Directory |
C:\ProgramData\Sonarr\bin |
| Version |
4.0.14.2939 |
I was getting nowhere searching for the following when I try to do an interactive search:
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.
My logs show that they haven’t been rotated since Mar 14 2025. Normally they have multiple entries per day.
My downloads folder shows I downloaded 4.0.13.2932 on 2/17/2025.
The in-app update never seems to work for me, or do anything? Maybe recent errors were part of the reason why too. Normally it tries and never actually changes.
Nothing odd in my sonarr.txt:
2024-12-27 02:55:41.6|Info|Bootstrap|Starting Sonarr - C:\ProgramData\Sonarr\bin\Sonarr.Console.exe - Version 4.0.11.2680
2024-12-27 02:55:42.8|Info|UtilityModeRouter|Application mode: UninstallService
2024-12-27 02:55:42.8|Info|ConsoleApp|Exiting main.
2025-02-17 08:59:22.4|Info|Bootstrap|Starting Sonarr - C:\ProgramData\Sonarr\bin\Sonarr.Console.exe - Version 4.0.13.2932
2025-02-17 08:59:23.6|Info|UtilityModeRouter|Application mode: UninstallService
2025-02-17 08:59:23.6|Info|ConsoleApp|Exiting main.
2025-02-17 08:59:23.8|Info|Bootstrap|Starting Sonarr - C:\ProgramData\Sonarr\bin\Sonarr.Console.exe - Version 4.0.13.2932
2025-02-17 08:59:24.0|Info|UtilityModeRouter|Application mode: InstallService
2025-02-17 08:59:24.2|Info|ServiceProvider|Installing service 'Sonarr'
2025-02-17 08:59:24.2|Info|ServiceProvider|create Sonarr DisplayName= "Sonarr" binpath= "C:\ProgramData\Sonarr\bin\Sonarr.Console.exe" start= auto depend= EventLog/Tcpip/http obj= "NT AUTHORITY\LocalService"
2025-02-17 08:59:24.2|Info|ServiceProvider|[SC] CreateService SUCCESS
2025-02-17 08:59:24.2|Info|ServiceProvider|[SC] ChangeServiceConfig2 SUCCESS
2025-02-17 08:59:24.2|Info|ServiceProvider|Service Has installed successfully.
2025-02-17 08:59:24.2|Info|ConsoleApp|Exiting main.
2025-03-23 00:47:53.6|Info|Bootstrap|Starting Sonarr - C:\ProgramData\Sonarr\bin\Sonarr.Console.exe - Version 4.0.14.2939
2025-03-23 00:47:55.0|Info|UtilityModeRouter|Application mode: UninstallService
2025-03-23 00:47:55.0|Info|ServiceProvider|Uninstalling Sonarr service
2025-03-23 00:47:55.0|Info|ServiceProvider|Stopping Sonarr Service...
2025-03-23 00:47:55.0|Info|ServiceProvider|Service is currently Stopped
2025-03-23 00:47:55.0|Warn|ServiceProvider|Service Sonarr is already in stopped state.
2025-03-23 00:47:55.0|Info|ServiceProvider|[SC] DeleteService SUCCESS
2025-03-23 00:47:55.0|Info|ServiceProvider|Sonarr successfully uninstalled
2025-03-23 00:47:55.0|Info|ConsoleApp|Exiting main.
2025-03-23 00:47:55.3|Info|Bootstrap|Starting Sonarr - C:\ProgramData\Sonarr\bin\Sonarr.Console.exe - Version 4.0.14.2939
2025-03-23 00:47:55.5|Info|UtilityModeRouter|Application mode: InstallService
2025-03-23 00:47:55.6|Info|ServiceProvider|Installing service 'Sonarr'
2025-03-23 00:47:55.6|Info|ServiceProvider|create Sonarr DisplayName= "Sonarr" binpath= "C:\ProgramData\Sonarr\bin\Sonarr.Console.exe" start= auto depend= EventLog/Tcpip/http obj= "NT AUTHORITY\LocalService"
2025-03-23 00:47:55.6|Info|ServiceProvider|[SC] CreateService SUCCESS
2025-03-23 00:47:55.6|Info|ServiceProvider|[SC] ChangeServiceConfig2 SUCCESS
2025-03-23 00:47:55.6|Info|ServiceProvider|Service Has installed successfully.
2025-03-23 00:47:55.6|Info|ConsoleApp|Exiting main.
My events tab shows nothing since March 14th as well.
Here’s my sonar.debug.txt from March 14th when things went sideways.
I’m wondering if there was a Windows update that caused this potentially?
It seems like an access denied issue with processes? Is it trying to start/kill itself but doesn’t have permission [anymore]?
2025-03-14 03:29:15.2|Debug|AggregateLanguages|Language couldn't be parsed from release, fallback to series original language: English
2025-03-14 03:29:15.2|Debug|AggregateLanguages|Selected languages: English
2025-03-14 03:34:27.7|Debug|ProcessProvider|Found 1 processes with the name: Sonarr.Console
2025-03-14 03:34:27.7|Debug|ProcessProvider| - [7372] Sonarr.Console
2025-03-14 03:34:27.7|Warn|ProcessProvider|Couldn't get process info for Sonarr.Console
[v4.0.13.2932] System.ComponentModel.Win32Exception (5): Access is denied.
at System.Diagnostics.ProcessManager.OpenProcess(Int32 processId, Int32 access, Boolean throwIfExited)
at System.Diagnostics.NtProcessManager.GetModules(Int32 processId, Boolean firstModuleOnly)
at System.Diagnostics.NtProcessManager.GetFirstModule(Int32 processId)
at System.Diagnostics.Process.get_MainModule()
at NzbDrone.Common.Processes.ProcessProvider.ConvertToProcessInfo(Process process) in ./Sonarr.Common/Processes/ProcessProvider.cs:line 316
2025-03-14 03:34:27.7|Debug|ProcessProvider|Found 1 processes with the name: Sonarr
2025-03-14 03:34:27.7|Debug|ProcessProvider| - [34144] Sonarr
2025-03-14 03:34:27.7|Info|SingleInstancePolicy|1 instance(s) of Sonarr are running
2025-03-14 03:34:27.7|Warn|SingleInstancePolicy|Another instance of Sonarr is already running.
2025-03-14 03:34:27.7|Info|BrowserService|Starting default browser. http://localhost:8989
2025-03-14 03:34:27.7|Info|ProcessProvider|Opening URL [http://localhost:8989]
2025-03-14 03:34:27.8|Fatal|Microsoft.AspNetCore.Hosting.Diagnostics|Application startup exception
[v4.0.13.2932] NzbDrone.Host.TerminateApplicationException: Application is being terminated. Reason : Another instance is already running
at NzbDrone.Host.SingleInstancePolicy.PreventStartIfAlreadyRunning() in ./Sonarr.Host/SingleInstancePolicy.cs:line 37
at NzbDrone.Host.Startup.EnsureSingleInstance(Boolean isService, IStartupContext startupContext, ISingleInstancePolicy instancePolicy) in ./Sonarr.Host/Startup.cs:line 309
at NzbDrone.Host.Startup.Configure(IApplicationBuilder app, IContainer container, IStartupContext startupContext, Lazy`1 mainDatabaseFactory, Lazy`1 logDatabaseFactory, DatabaseTarget dbTarget, ISingleInstancePolicy singleInstancePolicy, InitializeLogger initializeLogger, ReconfigureLogging reconfigureLogging, IAppFolderFactory appFolderFactory, IProvidePidFile pidFileProvider, IConfigFileProvider configFileProvider, IRuntimeInfo runtimeInfo, IFirewallAdapter firewallAdapter, IEventAggregator eventAggregator, SonarrErrorPipeline errorHandler) in ./Sonarr.Host/Startup.cs:line 222
at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.AspNetCore.Hosting.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder)
at Microsoft.AspNetCore.Hosting.ConfigureBuilder.<>c__DisplayClass4_0.<Build>b__0(IApplicationBuilder builder)
at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass15_0.<UseStartup>b__1(IApplicationBuilder app)
at Microsoft.AspNetCore.Mvc.Filters.MiddlewareFilterBuilderStartupFilter.<>c__DisplayClass0_0.<Configure>g__MiddlewareFilterBuilder|0(IApplicationBuilder builder)
at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)
2025-03-14 03:34:27.8|Info|Bootstrap|Application is being terminated. Reason : Another instance is already running
Why are there all these Google Chrome instances nested under Sonarr.exe in th Startup apps?
Why is Sonarr under Startup Apps if it’s installed as a service? I’ll try to disable it here in Startup Apps.
Edit:
I think the startup item is for the system tray icon maybe? I think that’s a thing?
It didn’t solve my problem by trying to disable it and restart.
I think the error is what you commonly see when you try to start Sonarr from the start/search, it will open up a browser and throw that error in the logs.
Can confirm this is the log I got when opening from the start menu:
2025-03-24 01:42:16.7|Debug|ProcessProvider|Found 1 processes with the name: Sonarr.Console
2025-03-24 01:42:16.7|Debug|ProcessProvider| - [8996] Sonarr.Console
2025-03-24 01:42:16.7|Warn|ProcessProvider|Couldn't get process info for Sonarr.Console
[v4.0.14.2939] System.ComponentModel.Win32Exception (5): Access is denied.
at System.Diagnostics.ProcessManager.OpenProcess(Int32 processId, Int32 access, Boolean throwIfExited)
at System.Diagnostics.NtProcessManager.GetModules(Int32 processId, Boolean firstModuleOnly)
at System.Diagnostics.NtProcessManager.GetFirstModule(Int32 processId)
at System.Diagnostics.Process.get_MainModule()
at NzbDrone.Common.Processes.ProcessProvider.ConvertToProcessInfo(Process process) in ./Sonarr.Common/Processes/ProcessProvider.cs:line 316
2025-03-24 01:42:16.7|Debug|ProcessProvider|Found 1 processes with the name: Sonarr
2025-03-24 01:42:16.7|Debug|ProcessProvider| - [40592] Sonarr
2025-03-24 01:42:16.8|Info|SingleInstancePolicy|1 instance(s) of Sonarr are running
2025-03-24 01:42:16.8|Warn|SingleInstancePolicy|Another instance of Sonarr is already running.
2025-03-24 01:42:16.8|Info|BrowserService|Starting default browser. http://localhost:8989
2025-03-24 01:42:16.8|Info|ProcessProvider|Opening URL [http://localhost:8989]
2025-03-24 01:42:16.8|Fatal|Microsoft.AspNetCore.Hosting.Diagnostics|Application startup exception
[v4.0.14.2939] NzbDrone.Host.TerminateApplicationException: Application is being terminated. Reason : Another instance is already running
at NzbDrone.Host.SingleInstancePolicy.PreventStartIfAlreadyRunning() in ./Sonarr.Host/SingleInstancePolicy.cs:line 37
at NzbDrone.Host.Startup.EnsureSingleInstance(Boolean isService, IStartupContext startupContext, ISingleInstancePolicy instancePolicy) in ./Sonarr.Host/Startup.cs:line 309
at NzbDrone.Host.Startup.Configure(IApplicationBuilder app, IContainer container, IStartupContext startupContext, Lazy`1 mainDatabaseFactory, Lazy`1 logDatabaseFactory, DatabaseTarget dbTarget, ISingleInstancePolicy singleInstancePolicy, InitializeLogger initializeLogger, ReconfigureLogging reconfigureLogging, IAppFolderFactory appFolderFactory, IProvidePidFile pidFileProvider, IConfigFileProvider configFileProvider, IRuntimeInfo runtimeInfo, IFirewallAdapter firewallAdapter, IEventAggregator eventAggregator, SonarrErrorPipeline errorHandler) in ./Sonarr.Host/Startup.cs:line 222
at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.AspNetCore.Hosting.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder)
at Microsoft.AspNetCore.Hosting.ConfigureBuilder.<>c__DisplayClass4_0.<Build>b__0(IApplicationBuilder builder)
at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass15_0.<UseStartup>b__1(IApplicationBuilder app)
at Microsoft.AspNetCore.Mvc.Filters.MiddlewareFilterBuilderStartupFilter.<>c__DisplayClass0_0.<Configure>g__MiddlewareFilterBuilder|0(IApplicationBuilder builder)
at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)
2025-03-24 01:42:16.8|Info|Bootstrap|Application is being terminated. Reason : Another instance is already running
Meanwhile I cannot seem to find anything in the logs about the DB lock error I get when trying to do an interactive search… 
If I intercept the network call this is what I get:
{
"message": "attempt to write a readonly database\r\nattempt to write a readonly database",
"description": "NzbDrone.Core.Exceptions.NzbDroneClientException: attempt to write a readonly database\r\nattempt to write a readonly database\r\n at Sonarr.Api.V3.Indexers.ReleaseController.GetEpisodeReleases(Int32 episodeId) in ./Sonarr.Api.V3/Indexers/ReleaseController.cs:line 204\r\n at Sonarr.Api.V3.Indexers.ReleaseController.GetReleases(Nullable\u00601 seriesId, Nullable\u00601 episodeId, Nullable\u00601 seasonNumber) in ./Sonarr.Api.V3/Indexers/ReleaseController.cs:line 177\r\n at lambda_method173(Closure , Object )\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.\u003CInvokeActionMethodAsync\u003Eg__Awaited|12_0(ControllerActionInvoker invoker, ValueTask\u00601 actionResultValueTask)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.\u003CInvokeNextActionFilterAsync\u003Eg__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State\u0026 next, Scope\u0026 scope, Object\u0026 state, Boolean\u0026 isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.\u003CInvokeInnerFilterAsync\u003Eg__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\u003CInvokeFilterPipelineAsync\u003Eg__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\u003CInvokeAsync\u003Eg__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\u003CInvokeAsync\u003Eg__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)\r\n at Microsoft.AspNetCore.Routing.EndpointMiddleware.\u003CInvoke\u003Eg__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)\r\n at Sonarr.Http.Middleware.BufferingMiddleware.InvokeAsync(HttpContext context) in ./Sonarr.Http/Middleware/BufferingMiddleware.cs:line 28\r\n at Sonarr.Http.Middleware.IfModifiedMiddleware.InvokeAsync(HttpContext context) in ./Sonarr.Http/Middleware/IfModifiedMiddleware.cs:line 41\r\n at Sonarr.Http.Middleware.CacheHeaderMiddleware.InvokeAsync(HttpContext context) in ./Sonarr.Http/Middleware/CacheHeaderMiddleware.cs:line 33\r\n at Sonarr.Http.Middleware.StartingUpMiddleware.InvokeAsync(HttpContext context) in ./Sonarr.Http/Middleware/StartingUpMiddleware.cs:line 38\r\n at Sonarr.Http.Middleware.UrlBaseMiddleware.InvokeAsync(HttpContext context) in ./Sonarr.Http/Middleware/UrlBaseMiddleware.cs:line 29\r\n at Sonarr.Http.Middleware.VersionMiddleware.InvokeAsync(HttpContext context) in ./Sonarr.Http/Middleware/VersionMiddleware.cs:line 29\r\n at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)\r\n at Microsoft.AspNetCore.Authorization.Policy.AuthorizationMiddlewareResultHandler.HandleAsync(RequestDelegate next, HttpContext context, AuthorizationPolicy policy, PolicyAuthorizationResult authorizeResult)\r\n at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)\r\n at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)\r\n at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.\u003CInvoke\u003Eg__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)"
}
Prettified:
NzbDrone.Core.Exceptions.NzbDroneClientException: attempt to write a readonly database
attempt to write a readonly database
at Sonarr.Api.V3.Indexers.ReleaseController.GetEpisodeReleases(Int32 episodeId) in ./Sonarr.Api.V3/Indexers/ReleaseController.cs:line 204
at Sonarr.Api.V3.Indexers.ReleaseController.GetReleases(Nullable\u00601 seriesId, Nullable\u00601 episodeId, Nullable\u00601 seasonNumber) in ./Sonarr.Api.V3/Indexers/ReleaseController.cs:line 177
at lambda_method173(Closure , Object )
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.\u003CInvokeActionMethodAsync\u003Eg__Awaited|12_0(ControllerActionInvoker invoker, ValueTask\u00601 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.\u003CInvokeNextActionFilterAsync\u003Eg__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State\u0026 next, Scope\u0026 scope, Object\u0026 state, Boolean\u0026 isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.\u003CInvokeInnerFilterAsync\u003Eg__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\u003CInvokeFilterPipelineAsync\u003Eg__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\u003CInvokeAsync\u003Eg__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\u003CInvokeAsync\u003Eg__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.\u003CInvoke\u003Eg__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Sonarr.Http.Middleware.BufferingMiddleware.InvokeAsync(HttpContext context) in ./Sonarr.Http/Middleware/BufferingMiddleware.cs:line 28
at Sonarr.Http.Middleware.IfModifiedMiddleware.InvokeAsync(HttpContext context) in ./Sonarr.Http/Middleware/IfModifiedMiddleware.cs:line 41
at Sonarr.Http.Middleware.CacheHeaderMiddleware.InvokeAsync(HttpContext context) in ./Sonarr.Http/Middleware/CacheHeaderMiddleware.cs:line 33
at Sonarr.Http.Middleware.StartingUpMiddleware.InvokeAsync(HttpContext context) in ./Sonarr.Http/Middleware/StartingUpMiddleware.cs:line 38
at Sonarr.Http.Middleware.UrlBaseMiddleware.InvokeAsync(HttpContext context) in ./Sonarr.Http/Middleware/UrlBaseMiddleware.cs:line 29
at Sonarr.Http.Middleware.VersionMiddleware.InvokeAsync(HttpContext context) in ./Sonarr.Http/Middleware/VersionMiddleware.cs:line 29
at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
at Microsoft.AspNetCore.Authorization.Policy.AuthorizationMiddlewareResultHandler.HandleAsync(RequestDelegate next, HttpContext context, AuthorizationPolicy policy, PolicyAuthorizationResult authorizeResult)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.\u003CInvoke\u003Eg__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)
I’ve tried to turn on trace logs but it seems nothing is logged. Like this instance has a lock on the logs as well, but doesn’t log the errors going on?