Kavita icon indicating copy to clipboard operation
Kavita copied to clipboard

Again "There was an issue writing to the DB for Series XXXX" in 0.8.1.0

Open janaxhell opened this issue 1 month ago • 4 comments

What happened?

I had this problem in the past, but majora helped me sort it out on Discord, then it updated the 0.7.1 and apparently solved the issue, but now I'm on 0.8.1.0 and each monday morning I see tons of these errors and a lot of RAM used:

There was an issue writing to the DB for Series Skeeters

The database operation was expected to affect 1 row(s), but actually affected 0 row(s); data may have been modified or deleted since entities were loaded. See https://go.microsoft.com/fwlink/?LinkId=527962 for information on understanding and handling optimistic concurrency exceptions.

Restarting the service doesn't help.

What did you expect?

No errors.

Kavita Version Number - If you don not see your version number listed, please update Kavita and see if your issue still persists.

0.8.1 - Stable

What operating system is Kavita being hosted from?

Docker (Other)

If the issue is being seen on Desktop, what OS are you running where you see the issue?

None

If the issue is being seen in the UI, what browsers are you seeing the problem on?

Other (List in "Additional Notes" box)

If the issue is being seen on Mobile, what OS are you running where you see the issue?

Android

If the issue is being seen on the Mobile UI, what browsers are you seeing the problem on?

Chrome

Relevant log output

Most recent piece of log while scanning:

Microsoft.EntityFrameworkCore.DbUpdateConcurrencyException: The database operation was expected to affect 1 row(s), but actually affected 0 row(s); data may have been modified or deleted since entities were loaded. See https://go.microsoft.com/fwlink/?LinkId=527962 for information on understanding and handling optimistic concurrency exceptions.
   at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ThrowAggregateUpdateConcurrencyExceptionAsync(RelationalDataReader reader, Int32 commandIndex, Int32 expectedRowsAffected, Int32 rowsAffected, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeResultSetWithRowsAffectedOnlyAsync(Int32 commandIndex, RelationalDataReader reader, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at API.Data.UnitOfWork.CommitAsync() in /home/runner/work/Kavita/Kavita/API/Data/UnitOfWork.cs:line 92
   at API.Services.Tasks.Scanner.ProcessSeries.ProcessSeriesAsync(IList`1 parsedInfos, Library library, Boolean forceUpdate) in /home/runner/work/Kavita/Kavita/API/Services/Tasks/Scanner/ProcessSeries.cs:line 190
[Kavita] [2024-05-27 11:23:16.413 +02:00  274] [Information] API.Services.Tasks.Scanner.ProcessSeries [ScannerService] Beginning series update on Werewolf By Night: The Complete Collection, Forced: false
[Kavita] [2024-05-27 11:23:16.470 +02:00  274] [Information] API.Services.Tasks.Scanner.ProcessSeries [ScannerService] Processing series Werewolf By Night: The Complete Collection
[Kavita] [2024-05-27 11:23:16.470 +02:00  274] [Debug] API.Services.Tasks.Scanner.ProcessSeries [ScannerService] Updating 1 volumes on Werewolf By Night: The Complete Collection
[Kavita] [2024-05-27 11:23:16.470 +02:00  274] [Debug] API.Services.Tasks.Scanner.ProcessSeries [ScannerService] Parsing Werewolf By Night: The Complete Collection - Volume 2017
[Kavita] [2024-05-27 11:23:16.505 +02:00  274] [Debug] API.Services.Tasks.Scanner.ProcessSeries Updating Werewolf By Night: The Complete Collection FolderPath to /comics/Mylar/Marvel
[Kavita] [2024-05-27 11:23:16.505 +02:00  274] [Debug] API.Services.Tasks.Scanner.ProcessSeries Updating Werewolf By Night: The Complete Collection LowestFolderPath to /Marvel/Werewolf By Night The Complete Collection (2017)

Additional Notes

I'm running image: jvmilazz0/kavita:latest on OMV6/Docker, I have a library of about 200k comics + 10k books.

janaxhell avatar May 27 '24 09:05 janaxhell