Possible Plex DLNA memory leak fix

I love plex ,I am on plex Version 1.21.0.3711 and recently tried Dlna in plex as I need it for my lg tv. Slowly I saw there was a memory leak in plex dlna which is also an known issue . After searching a lot on net , finally I tried to restart plex services and wow this seem to have fixed the memory leak .
This is the command I used to restart plex .

sudo service plexmediaserver restart

Now I have to figure out to auto run this command automatically at midnight or after every reboot ,I would love help regarding that .

Hope this help fixing the plex dlna issue
thanks .

Update: I managed to set up auto reboot of plex service and no memory leaks so far.
steps

Create a crontab entry

  1. crontab -e
  2. add the line : 0 4 * * * sudo service plexmediaserver restart
  3. save with ctrl + o
  4. verify: crontab -l

Check out: Memory leak since 1.19.1.2701 (possible > 1.19)

There’s no solution there but you’re not the only with with issues. I’m not sure if it’s a memory leak (it doesn’t grow gradually over time) but just poor memory allocation.

Starting a new thread (as you’ve done) is also a good idea as the Plex staff/moderators seem to read the newer threads with greater interest than posts to older threads.