More investigation
Posted: Sun Mar 12, 2023 9:05 am
So waiting until the next day, UMS shutdown takes a lot longer.
It turns out that LoggerFactory.getILoggerFactory().stop(); also closes stderr. So I reorganized net.pms.PMS.shutdown() to close logging last. I now see that most of the shutdown delay is in MediaDatabase.shutdown(). I also added Runtime.getRuntime().halt(0); This means UMS now exits with code 0, instead of 130.
I don't know if this is helpful.
I also see things like
and
It turns out that LoggerFactory.getILoggerFactory().stop(); also closes stderr. So I reorganized net.pms.PMS.shutdown() to close logging last. I now see that most of the shutdown delay is in MediaDatabase.shutdown(). I also added Runtime.getRuntime().halt(0); This means UMS now exits with code 0, instead of 130.
I don't know if this is helpful.
I also see things like
Code: Select all
WARN 15:50:53.045 [Library Scanner] Unhandled exception while resolving DSCN6654: Task net.pms.util.APIUtils$$Lambda$258/0x0000000800f94770@66736c63 rejected from java.util.concurrent.ThreadPoolExecutor@54def6d2[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 7278]
WARN 15:51:00.539 [Library Scanner] Unhandled exception while resolving DSCN6663: Task net.pms.util.APIUtils$$Lambda$258/0x0000000800f94770@29b8633c rejected from java.util.concurrent.ThreadPoolExecutor@54def6d2[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 7278]
Code: Select all
INFO 15:57:59.517 [File watcher] Exception in thread "File watcher" java.nio.file.ClosedWatchServiceException
INFO 15:57:59.518 [File watcher] at java.base/sun.nio.fs.AbstractWatchService.checkOpen(Unknown Source)
INFO 15:57:59.519 [File watcher] at java.base/sun.nio.fs.AbstractWatchService.checkKey(Unknown Source)
INFO 15:57:59.519 [File watcher] at java.base/sun.nio.fs.AbstractWatchService.take(Unknown Source)
INFO 15:57:59.519 [File watcher] at net.pms.util.FileWatcher.lambda$start$0(FileWatcher.java:211)
INFO 15:57:59.519 [File watcher] at java.base/java.lang.Thread.run(Unknown Source)