BookLore icon indicating copy to clipboard operation
BookLore copied to clipboard

Multiple critical issues with library and shelf management (unshelving, disappearing books, incorrect duplicate handling)

Open matyig opened this issue 1 month ago • 3 comments

What happened?
Booklore is generally a very useful application, but the current behavior of the library and shelf management system is unreliable to the point where it becomes unsafe to use. Several issues appear to be related to how duplicates are detected and handled.

Below is a list of the major problems I encountered:

  1. Books placed on a shelf get automatically converted to “unshelved”

Books that I manually place on a shelf occasionally reappear under the Unshelved section without any action on my part. At the same time, they silently disappear from the shelf where they were originally placed.

  1. Books placed in a library randomly disappear

Books imported into a library sometimes vanish from that library entirely. I do not receive any notification or error message—they simply stop being listed there.

  1. Books are moved between libraries without user interaction

Some books unexpectedly move from one library to another, with no explanation provided and no user confirmation requested.

  1. Duplicate detection behaves incorrectly and lacks user choice

When Booklore detects duplicates, it only displays the path of the duplicate file, not the original. This makes it impossible to tell which copy should be kept. The application should ask the user which version to keep and which to remove/migrate instead of modifying or deleting files automatically.

These issues occurred after importing the same book into two different libraries under different filenames, then placing each copy on different shelves. Eventually, books began to show up in Unshelved, or disappeared from shelves and libraries entirely.

  1. Library file counts mismatch even after refresh

After importing a number of books into a library, the number of detected books shown in the UI does not always match the actual number of files in the directory associated with that library. Clicking the Refresh button does not update the count or resolve the discrepancy.

  1. The upload/bookdrop feature has multiple problems

Files larger than 100 MB cannot be uploaded via the web interface, even though many modern PDFs exceed this limit.

Uploaded PDFs are renamed automatically, and their file modification dates are changed. The user should at least be asked before modifying filenames or timestamps.

Why this is a serious issue

These behaviors make it very difficult to trust Booklore with a collection of books. Because the application moves, renames, or removes files without asking the user, I currently have to mark my entire books/ directory as read-only to prevent accidental data loss.

No application should modify or relocate files on the filesystem without explicit user permission.

Expected behavior
User explicitly approves any duplicate resolution action.

  • Books should never move between shelves or libraries unless the user requests it.
  • No file should be renamed, deleted, or relocated automatically.
  • Library counts should reliably reflect the actual number of files.
  • Upload feature should support files >100MB or provide a clear error.
  • Duplicate dialog should display both original and duplicate file paths and allow the user to choose what to do.

matyig avatar Nov 25 '25 09:11 matyig

Most of the file-related issues you’re seeing will be resolved in the next release, as I’m adding support for allowing duplicate files within and across libraries. This should fix most of the edge-case issues you’re experiencing.

Also, are your libraries stored on network or cloud-synced storage? That can cause unexpected file changes, so it would be helpful to know.

acx10 avatar Nov 25 '25 12:11 acx10

Most of the file-related issues you’re seeing will be resolved in the next release, as I’m adding support for allowing duplicate files within and across libraries. This should fix most of the edge-case issues you’re experiencing.

Also, are your libraries stored on network or cloud-synced storage? That can cause unexpected file changes, so it would be helpful to know.

I am running Booklore in a Docker container on my home Proxmox server. I copied all of my e-books (PDFs and EPUBs) to a partition and attached it to /books in the container.

Personally, I would consider user-friendly behavior to be that I can organize my e-book files according to my own directory structure. Booklore would then allow me to define how these books are arranged into collections, placed on virtual shelves, and tagged. There is no need for Booklore to modify the original PDF or EPUB files.

matyig avatar Nov 25 '25 13:11 matyig

I have import issues from booksdrop every time when I have 5-7+ books. It seems like that "duplicate" issue, and it doesn't seem like an edge case, because it happens way too reliably. I haven't seen the code itself, but won't allowing duplicates simply produce duplicated entries, or something like that?

I've tried running Booklore directly on NAS with db and books folders on HDDs in RAID, and on a single SSD, books import issues are the same.

ckozak avatar Nov 25 '25 18:11 ckozak

I have the same disappearing issue myself. My collection went from 982 books to 548 books overnight, and I cannot get them back for some reason. Like, I deleted the epub file and re-added it to the bookdrop folder, so that it could be ingested, and then after re-adding it, to book disappeared right again.

At the moment, that makes it quite difficult to trust Booklore as my bookserver.

dkuester avatar Dec 11 '25 08:12 dkuester

Hi,

Apologies for inconvenience, can you provide us logs, or any other information, so we could investigate? We made lot of improvements in regards to file/resource management in the past few releases, but yes there may be that there are some edge cases. Sadly, your comment in itself it not much to go on and investigate, if it's really Booklore problem, I would obviously want to get it fixed ASAP.

Thanks!

balazs-szucs avatar Dec 11 '25 10:12 balazs-szucs

@balazs-szucs I'm adding a book to the bookdrop:

2025-12-11T11:46:33.722+01:00  INFO 11 --- [booklore-api] [opFileProcessor] c.a.b.s.b.BookdropEventHandlerService    : Handling new bookdrop file: /bookdrop/Rage - Stephen King (2014).epub
2025-12-11T11:46:35.099+01:00  INFO 11 --- [booklore-api] [opFileProcessor] c.a.booklore.util.FileService            : Image saved successfully to: /app/data/bookdrop_temp/10.jpg
2025-12-11T11:46:35.120+01:00  INFO 11 --- [booklore-api] [opFileProcessor] c.a.b.s.m.parser.AmazonBookParser        : Amazon Query URL: https://www.amazon.de/s?k=Rage+Stephen+King
2025-12-11T11:46:35.287+01:00 ERROR 11 --- [booklore-api] [opFileProcessor] c.a.b.s.m.parser.AmazonBookParser        : Error parsing url: https://www.amazon.de/s?k=Rage+Stephen+King

org.jsoup.HttpStatusException: HTTP error fetching URL. Status=503, URL=[https://www.amazon.de/s?k=Rage+Stephen+King]
	at org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:913) ~[jsoup-1.21.2.jar!/:1.21.2]
	at org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:866) ~[jsoup-1.21.2.jar!/:1.21.2]
	at org.jsoup.helper.HttpConnection.execute(HttpConnection.java:365) ~[jsoup-1.21.2.jar!/:1.21.2]
	at com.adityachandel.booklore.service.metadata.parser.AmazonBookParser.fetchDocument(AmazonBookParser.java:841) ~[!/:0.0.1-SNAPSHOT]
	at com.adityachandel.booklore.service.metadata.parser.AmazonBookParser.getAmazonBookIds(AmazonBookParser.java:131) ~[!/:0.0.1-SNAPSHOT]
	at com.adityachandel.booklore.service.metadata.parser.AmazonBookParser.fetchTopMetadata(AmazonBookParser.java:86) ~[!/:0.0.1-SNAPSHOT]
	at com.adityachandel.booklore.service.metadata.MetadataRefreshService.fetchTopMetadataFromAProvider(MetadataRefreshService.java:373) ~[!/:0.0.1-SNAPSHOT]
	at com.adityachandel.booklore.service.metadata.MetadataRefreshService.lambda$fetchMetadataForBook$3(MetadataRefreshService.java:212) ~[!/:0.0.1-SNAPSHOT]
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) ~[na:na]
	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source) ~[na:na]
	at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source) ~[na:na]
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) ~[na:na]
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source) ~[na:na]
	at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source) ~[na:na]
	at java.base/java.util.stream.ReferencePipeline.collect(Unknown Source) ~[na:na]
	at com.adityachandel.booklore.service.metadata.MetadataRefreshService.fetchMetadataForBook(MetadataRefreshService.java:214) ~[!/:0.0.1-SNAPSHOT]
	at com.adityachandel.booklore.service.bookdrop.BookdropMetadataService.attachFetchedMetadata(BookdropMetadataService.java:79) ~[!/:0.0.1-SNAPSHOT]
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source) ~[na:na]
	at java.base/java.lang.reflect.Method.invoke(Unknown Source) ~[na:na]
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:360) ~[spring-aop-6.2.14.jar!/:6.2.14]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:196) ~[spring-aop-6.2.14.jar!/:6.2.14]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-6.2.14.jar!/:6.2.14]
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:380) ~[spring-tx-6.2.14.jar!/:6.2.14]
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119) ~[spring-tx-6.2.14.jar!/:6.2.14]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184) ~[spring-aop-6.2.14.jar!/:6.2.14]
	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:728) ~[spring-aop-6.2.14.jar!/:6.2.14]
	at com.adityachandel.booklore.service.bookdrop.BookdropMetadataService$$SpringCGLIB$$0.attachFetchedMetadata(<generated>) ~[!/:0.0.1-SNAPSHOT]
	at com.adityachandel.booklore.service.bookdrop.BookdropEventHandlerService.processFile(BookdropEventHandlerService.java:125) ~[!/:0.0.1-SNAPSHOT]
	at com.adityachandel.booklore.service.bookdrop.BookdropEventHandlerService.processQueue(BookdropEventHandlerService.java:66) ~[!/:0.0.1-SNAPSHOT]
	at java.base/java.lang.Thread.run(Unknown Source) ~[na:na]

2025-12-11T11:46:35.292+01:00 ERROR 11 --- [booklore-api] [opFileProcessor] c.a.b.s.m.parser.AmazonBookParser        : Failed to get asin: org.jsoup.HttpStatusException: HTTP error fetching URL. Status=503, URL=[https://www.amazon.de/s?k=Rage+Stephen+King]

java.lang.RuntimeException: org.jsoup.HttpStatusException: HTTP error fetching URL. Status=503, URL=[https://www.amazon.de/s?k=Rage+Stephen+King]
	at com.adityachandel.booklore.service.metadata.parser.AmazonBookParser.fetchDocument(AmazonBookParser.java:845) ~[!/:0.0.1-SNAPSHOT]
	at com.adityachandel.booklore.service.metadata.parser.AmazonBookParser.getAmazonBookIds(AmazonBookParser.java:131) ~[!/:0.0.1-SNAPSHOT]
	at com.adityachandel.booklore.service.metadata.parser.AmazonBookParser.fetchTopMetadata(AmazonBookParser.java:86) ~[!/:0.0.1-SNAPSHOT]
	at com.adityachandel.booklore.service.metadata.MetadataRefreshService.fetchTopMetadataFromAProvider(MetadataRefreshService.java:373) ~[!/:0.0.1-SNAPSHOT]
	at com.adityachandel.booklore.service.metadata.MetadataRefreshService.lambda$fetchMetadataForBook$3(MetadataRefreshService.java:212) ~[!/:0.0.1-SNAPSHOT]
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) ~[na:na]
	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source) ~[na:na]
	at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source) ~[na:na]
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) ~[na:na]
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source) ~[na:na]
	at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source) ~[na:na]
	at java.base/java.util.stream.ReferencePipeline.collect(Unknown Source) ~[na:na]
	at com.adityachandel.booklore.service.metadata.MetadataRefreshService.fetchMetadataForBook(MetadataRefreshService.java:214) ~[!/:0.0.1-SNAPSHOT]
	at com.adityachandel.booklore.service.bookdrop.BookdropMetadataService.attachFetchedMetadata(BookdropMetadataService.java:79) ~[!/:0.0.1-SNAPSHOT]
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source) ~[na:na]
	at java.base/java.lang.reflect.Method.invoke(Unknown Source) ~[na:na]
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:360) ~[spring-aop-6.2.14.jar!/:6.2.14]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:196) ~[spring-aop-6.2.14.jar!/:6.2.14]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-6.2.14.jar!/:6.2.14]
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:380) ~[spring-tx-6.2.14.jar!/:6.2.14]
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119) ~[spring-tx-6.2.14.jar!/:6.2.14]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184) ~[spring-aop-6.2.14.jar!/:6.2.14]
	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:728) ~[spring-aop-6.2.14.jar!/:6.2.14]
	at com.adityachandel.booklore.service.bookdrop.BookdropMetadataService$$SpringCGLIB$$0.attachFetchedMetadata(<generated>) ~[!/:0.0.1-SNAPSHOT]
	at com.adityachandel.booklore.service.bookdrop.BookdropEventHandlerService.processFile(BookdropEventHandlerService.java:125) ~[!/:0.0.1-SNAPSHOT]
	at com.adityachandel.booklore.service.bookdrop.BookdropEventHandlerService.processQueue(BookdropEventHandlerService.java:66) ~[!/:0.0.1-SNAPSHOT]
	at java.base/java.lang.Thread.run(Unknown Source) ~[na:na]
Caused by: org.jsoup.HttpStatusException: HTTP error fetching URL. Status=503, URL=[https://www.amazon.de/s?k=Rage+Stephen+King]
	at org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:913) ~[jsoup-1.21.2.jar!/:1.21.2]
	at org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:866) ~[jsoup-1.21.2.jar!/:1.21.2]
	at org.jsoup.helper.HttpConnection.execute(HttpConnection.java:365) ~[jsoup-1.21.2.jar!/:1.21.2]
	at com.adityachandel.booklore.service.metadata.parser.AmazonBookParser.fetchDocument(AmazonBookParser.java:841) ~[!/:0.0.1-SNAPSHOT]
	... 26 common frames omitted

2025-12-11T11:46:35.294+01:00  INFO 11 --- [booklore-api] [opFileProcessor] c.a.b.s.m.parser.AmazonBookParser        : Amazon: Found 0 book ids
2025-12-11T11:46:36.557+01:00  WARN 11 --- [booklore-api] [     virtual-33] o.m.jdbc.message.server.ErrorPacket      : Error: 1205-HY000: Lock wait timeout exceeded; try restarting transaction
2025-12-11T11:46:36.562+01:00  INFO 11 --- [booklore-api] [     virtual-33] org.hibernate.orm.jdbc.batch             : HHH100503: On release of batch it still contained JDBC statements
2025-12-11T11:46:36.565+01:00  WARN 11 --- [booklore-api] [     virtual-33] o.h.engine.jdbc.spi.SqlExceptionHelper   : SQL Error: 1205, SQLState: HY000
2025-12-11T11:46:36.567+01:00 ERROR 11 --- [booklore-api] [     virtual-33] o.h.engine.jdbc.spi.SqlExceptionHelper   : (conn=12777) Lock wait timeout exceeded; try restarting transaction

Amazon cannot find the book, which is correct. Now moving to the library:

025-12-11T11:49:20.405+01:00  INFO 11 --- [booklore-api] [nio-8080-exec-9] c.a.b.service.bookdrop.BookDropService   : Starting finalizeImport: selectAll=false, provided file count=1, defaultLibraryId=null, defaultPathId=null
2025-12-11T11:49:20.405+01:00  INFO 11 --- [booklore-api] [nio-8080-exec-9] c.a.b.service.bookdrop.BookDropService   : Processing 1 manually selected files in chunks of 100. File IDs: [10]
2025-12-11T11:49:20.412+01:00  INFO 11 --- [booklore-api] [nio-8080-exec-9] c.a.b.service.bookdrop.BookDropService   : Collected 1 unique libraries for monitoring unregistration: [1]
2025-12-11T11:49:20.900+01:00  INFO 11 --- [booklore-api] [nio-8080-exec-9] c.a.b.service.bookdrop.BookDropService   : Unregistered 1 libraries from monitoring
2025-12-11T11:49:20.901+01:00  INFO 11 --- [booklore-api] [nio-8080-exec-9] c.a.b.service.bookdrop.BookDropService   : Processing chunk 1/1 (1 files): IDs=[10]
2025-12-11T11:49:20.916+01:00  INFO 11 --- [booklore-api] [nio-8080-exec-9] c.a.b.service.bookdrop.BookDropService   : Moved file id=10, name=Rage - Stephen King (2014).epub from '/bookdrop/Rage - Stephen King (2014).epub' to '/books/Stephen King/Rage - Stephen King (2014).epub'
2025-12-11T11:50:11.823+01:00  WARN 11 --- [booklore-api] [nio-8080-exec-9] o.m.jdbc.message.server.ErrorPacket      : Error: 1205-HY000: Lock wait timeout exceeded; try restarting transaction
2025-12-11T11:50:11.824+01:00  WARN 11 --- [booklore-api] [nio-8080-exec-9] o.h.engine.jdbc.spi.SqlExceptionHelper   : SQL Error: 1205, SQLState: HY000
2025-12-11T11:50:11.824+01:00 ERROR 11 --- [booklore-api] [nio-8080-exec-9] o.h.engine.jdbc.spi.SqlExceptionHelper   : (conn=12793) Lock wait timeout exceeded; try restarting transaction
2025-12-11T11:50:11.829+01:00  INFO 11 --- [booklore-api] [nio-8080-exec-9] c.a.b.service.bookdrop.BookDropService   : Cleaned up target file '/books/Stephen King/Rage - Stephen King (2014).epub' after processing exception for file id=10
2025-12-11T11:50:11.830+01:00  WARN 11 --- [booklore-api] [nio-8080-exec-9] c.a.b.service.bookdrop.BookDropService   : Finalization failed (non-exception) for file id=10, name=Rage - Stephen King (2014).epub, message=Processing failed: could not execute statement [(conn=12793) Lock wait timeout exceeded; try restarting transaction] [update book set added_on=?,book_type=?,current_hash=?,deleted=?,deleted_at=?,file_name=?,file_size_kb=?,file_sub_path=?,library_id=?,library_path_id=?,metadata_match_score=?,similar_books_json=? where id=?]; SQL [update book set added_on=?,book_type=?,current_hash=?,deleted=?,deleted_at=?,file_name=?,file_size_kb=?,file_sub_path=?,library_id=?,library_path_id=?,metadata_match_score=?,similar_books_json=? where id=?]
2025-12-11T11:50:13.048+01:00  INFO 11 --- [booklore-api] [nio-8080-exec-9] c.a.b.service.bookdrop.BookDropService   : Re-registered 1 libraries for monitoring
2025-12-11T11:50:13.049+01:00  INFO 11 --- [booklore-api] [nio-8080-exec-9] c.a.b.service.bookdrop.BookDropService   : Finalization complete. Success: 0, Failed: 1, Total processed: 1
2025-12-11T11:50:13.050+01:00  INFO 11 --- [booklore-api] [nio-8080-exec-9] c.a.b.s.b.BookdropMonitoringService      : Bookdrop monitoring resumed.
2025-12-11T11:50:13.051+01:00  INFO 11 --- [booklore-api] [nio-8080-exec-9] c.a.b.service.bookdrop.BookDropService   : Bookdrop monitoring resumed

That's strange.

dkuester avatar Dec 11 '25 10:12 dkuester

What should be the correct permissions for the files / directories? Is 655 correct?

dkuester avatar Dec 11 '25 10:12 dkuester

Please disable the Amazon provider for the time being. It appears you are being rate-limited or blocked from accessing it.

Here is what is happening: The database is holding a lock during the failing Amazon metadata fetch, creating a 'zombie' transaction. While that transaction is hung, the manual finalization process attempts to update the database. Since the initial Amazon transaction never concluded, the new process hits a lock wait timeout and fails.

Amazon is generally the most unreliable metadata provider; other providers will likely give you data more reliably, and thereby solving your problem. Apologies this is sadly, partially indeed on us, that we generally only give this info about Amazon in comments etc, but have not made it into anything official or the frontend.

balazs-szucs avatar Dec 11 '25 11:12 balazs-szucs

@balazs-szucs I see, thank you. Yes, I should have provided my Amazon session cookie, but I deactivated it by now.

Are there any plans to add kobo as a metadata provider? In Calibre, I really do prefer them as they usually have much better data.

dkuester avatar Dec 11 '25 11:12 dkuester

@balazs-szucs It's still failing import. I've disabled amazon metadata and also restarted the docker image, but the error persists:

2025-12-11T12:24:39.383+01:00  INFO 11 --- [booklore-api] [nio-8080-exec-5] c.a.b.service.bookdrop.BookDropService   : Starting finalizeImport: selectAll=false, provided file count=1, defaultLibraryId=null, defaultPathId=null
2025-12-11T12:24:39.384+01:00  INFO 11 --- [booklore-api] [nio-8080-exec-5] c.a.b.service.bookdrop.BookDropService   : Processing 1 manually selected files in chunks of 100. File IDs: [10]
2025-12-11T12:24:39.400+01:00  INFO 11 --- [booklore-api] [nio-8080-exec-5] c.a.b.service.bookdrop.BookDropService   : Collected 1 unique libraries for monitoring unregistration: [1]
2025-12-11T12:24:40.137+01:00  INFO 11 --- [booklore-api] [nio-8080-exec-5] c.a.b.service.bookdrop.BookDropService   : Unregistered 1 libraries from monitoring
2025-12-11T12:24:40.138+01:00  INFO 11 --- [booklore-api] [nio-8080-exec-5] c.a.b.service.bookdrop.BookDropService   : Processing chunk 1/1 (1 files): IDs=[10]
2025-12-11T12:24:40.192+01:00  INFO 11 --- [booklore-api] [nio-8080-exec-5] c.a.b.service.bookdrop.BookDropService   : Moved file id=10, name=Rage - Stephen King (2014).epub from '/bookdrop/Rage - Stephen King (2014).epub' to '/books/Stephen King/Rage - Stephen King (2014).epub'
2025-12-11T12:25:30.797+01:00  WARN 11 --- [booklore-api] [nio-8080-exec-5] o.m.jdbc.message.server.ErrorPacket      : Error: 1205-HY000: Lock wait timeout exceeded; try restarting transaction
2025-12-11T12:25:30.803+01:00  WARN 11 --- [booklore-api] [nio-8080-exec-5] o.h.engine.jdbc.spi.SqlExceptionHelper   : SQL Error: 1205, SQLState: HY000
2025-12-11T12:25:30.806+01:00 ERROR 11 --- [booklore-api] [nio-8080-exec-5] o.h.engine.jdbc.spi.SqlExceptionHelper   : (conn=13) Lock wait timeout exceeded; try restarting transaction
2025-12-11T12:25:30.843+01:00  INFO 11 --- [booklore-api] [nio-8080-exec-5] c.a.b.service.bookdrop.BookDropService   : Cleaned up target file '/books/Stephen King/Rage - Stephen King (2014).epub' after processing exception for file id=10
2025-12-11T12:25:30.848+01:00  WARN 11 --- [booklore-api] [nio-8080-exec-5] c.a.b.service.bookdrop.BookDropService   : Finalization failed (non-exception) for file id=10, name=Rage - Stephen King (2014).epub, message=Processing failed: could not execute statement [(conn=13) Lock wait timeout exceeded; try restarting transaction] [update book set added_on=?,book_type=?,current_hash=?,deleted=?,deleted_at=?,file_name=?,file_size_kb=?,file_sub_path=?,library_id=?,library_path_id=?,metadata_match_score=?,similar_books_json=? where id=?]; SQL [update book set added_on=?,book_type=?,current_hash=?,deleted=?,deleted_at=?,file_name=?,file_size_kb=?,file_sub_path=?,library_id=?,library_path_id=?,metadata_match_score=?,similar_books_json=? where id=?]
2025-12-11T12:25:31.990+01:00  INFO 11 --- [booklore-api] [nio-8080-exec-5] c.a.b.service.bookdrop.BookDropService   : Re-registered 1 libraries for monitoring
2025-12-11T12:25:31.991+01:00  INFO 11 --- [booklore-api] [nio-8080-exec-5] c.a.b.service.bookdrop.BookDropService   : Finalization complete. Success: 0, Failed: 1, Total processed: 1

dkuester avatar Dec 11 '25 11:12 dkuester

I was able to narrow it down to this setting: Auto-Move Files on Metadata Update

I enabled it the day before yesterday and forgot about it. Turning it restarted the file processing and now my missing books are re-added.

dkuester avatar Dec 11 '25 12:12 dkuester