# Plex Server hangs on database optimization

**URL:** <https://forums.plex.tv/t/plex-server-hangs-on-database-optimization/801306>\
**Category:** Plex Media Server\
**Tags:** server-windows\
**Created:** [July 19, 2022, 1:54pm UTC](https://forums.plex.tv/t/plex-server-hangs-on-database-optimization/801306 "2022-07-19T13:54:09Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![OttoKerner](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/ottokerner/32/10079_2.png) [@OttoKerner](https://forums.plex.tv/u/OttoKerner)\
**Post date:** [July 28, 2022, 11:57am UTC](https://forums.plex.tv/t/plex-server-hangs-on-database-optimization/801306/15 "2022-07-28T11:57:21Z")

</div>

```auto
Jul 27, 2022 11:48:24.070 [5744] DEBUG - TrayIcon::WindowProc received DisplayIcon timer message
Jul 27, 2022 11:48:24.070 [5744] WARN - Shell_NotifyIcon(NIM_ADD) failed: 0x80004005

```

You might want to use the command line parameter `-noninteractive` when starting PMS. It suppresses all errors which have to do with the regular task tray icon on Windows. (which is not used when running as a system service)  
 ![grafik](https://global.discourse-cdn.com/plex/original/4X/2/c/4/2c44f18b83080dd1ced8af1840ea0759389c1678.png)

> [@soulvoid86](#):
>
> Server just went offline again for seemingly no reason, even after rebuilding both DBs and using the recovery method as well.

At least you have no messages about a damaged database file in your logs. So that is a good thing.

There is currently an issue being tracked about PMS becoming unresponsive after a few hours/days. [Plex keeps crashing/closing - #110 by sa2000](https://forums.plex.tv/t/plex-keeps-crashing-closing/723437/110)  
(The process is not _crashing_ per se, which unfortunately means that the watchdog in NSSM won’t catch it.)

Last thing I heard about that is there was an issue found with the Microsoft compiler/linker, which required working around it. The workaround is expected to become available in PMS 1.28.1.xxxx

---

_[View the full topic](https://forums.plex.tv/t/plex-server-hangs-on-database-optimization/801306)._
