# Error: Unable to set up server: std::exception (N2DB9ExceptionE)

**URL:** <https://forums.plex.tv/t/error-unable-to-set-up-server-std-exception-n2db9exceptione/901216>\
**Category:** General Discussions\
**Tags:** server-unraid\
**Created:** [January 6, 2025, 9:23am UTC](https://forums.plex.tv/t/error-unable-to-set-up-server-std-exception-n2db9exceptione/901216 "2025-01-06T09:23:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shadow\_229](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@Shadow\_229](https://forums.plex.tv/u/Shadow_229)\
**Post date:** [January 6, 2025, 9:23am UTC](https://forums.plex.tv/t/error-unable-to-set-up-server-std-exception-n2db9exceptione/901216/1 "2025-01-06T09:23:14Z")

</div>

The past few days I’d noticed plex eating up a bunch of memory - it got to 21GB so I restarted the container. Now I get the below lines in the log when starting:

Starting Plex Media Server.  
Error: Unable to set up server: std::exception (N2DB9ExceptionE)  
Stopping Plex Media Server.

I’ve attempted re-installing the image and I tried to switch over to the beta version too, but same error. I’ve since updated everything and cycled the server - everything else is working fine.

Google gives me nothing on that exception code, and nothing else has changed on the server (Unraid 6.12.14). Can anyone point me in the right direction?

Thanks

---

<div class="post-metadata">

**Author:** ![Shadow\_229](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@Shadow\_229](https://forums.plex.tv/u/Shadow_229)\
**Post date:** [January 6, 2025, 6:22pm UTC](https://forums.plex.tv/t/error-unable-to-set-up-server-std-exception-n2db9exceptione/901216/2 "2025-01-06T18:22:26Z")

</div>

I tried to run PlexDBRepair but the database was completely done. Despite having backups ticked in plex to backup the db every 3 days, my last backup was over a year ago (clearly the backups aren’t reliable).

Eventually, I’ve had to delete my database and let Plex create a new blank one, then use PlexDBRepair to restore the new db file from one of the year old ones - just so I keep my folders etc.

Lost all of mine and my users watch history and currently having to rescan all media folders and pull down meta data.

There is a plugin called ‘AppData Backup’ which runs off a CRON job and stores all your app data (compressed) to a share. I’ve left the button ticked in plex to backup my database every 3 days - but I wont be relying on that anymore!

---

<div class="post-metadata">

**Author:** ![FordGuy61](https://avatars.discourse-cdn.com/v4/letter/f/22d042/32.png) [@FordGuy61](https://forums.plex.tv/u/FordGuy61)\
**Post date:** [January 6, 2025, 7:03pm UTC](https://forums.plex.tv/t/error-unable-to-set-up-server-std-exception-n2db9exceptione/901216/3 "2025-01-06T19:03:03Z")

</div>

> [@Shadow\_229](#):
>
> Lost all of mine and my users watch history and currently having to rescan all media folders and pull down meta data.

Enable [Sync Watch State & Ratings](https://support.plex.tv/articles/sync-watch-state-and-ratings/). It is an account setting. Have anyone you share with enable it as well. This will help in case you run into database problems in the future.

  

See [Move Viewstate/Ratings from One Install to Another](https://support.plex.tv/articles/201154527-move-viewstate-ratings-from-one-install-to-another/).

I’ve used the procedure to copy information between servers. Unsure if it will work if the source database is corrupt.

Note that the document is out of date WRT SQLite. You should use the Plex version of SQLite. See [Locating the Plex SQLite tool](https://support.plex.tv/articles/repair-a-corrupted-database/#toc-1).

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [April 6, 2025, 7:03pm UTC](https://forums.plex.tv/t/error-unable-to-set-up-server-std-exception-n2db9exceptione/901216/4 "2025-04-06T19:03:59Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
