Managing resources on my IPFS server

Words
606
Reading
3 min
7y
Listen to this post
~4 min

Yesterday dreemsteem@dreemsteem let me know one of my videos were not playing using the direct links I provide in my dtube posts. I shared my Green Anole Lizard on my Window post on #pypt (Pimp your Post Thursday) hosted by shadowspub@shadowspub dreemsteem@dreemsteem wanted to see the Anole video though it would not play through my direct link.

These direct links go to my IPFS Gateway I operate and will play independently of dtubes network. So if there are issues at the time with playback on Dtube someone could still view my video. Well its been working great well for the last month.

htop52419.jpeg

But seems over time, the IPFS daemon has been using up all of the memory and not dumping it correctly. In this htop screenshot, you can see the memory was over 3GB, and CPU was acting kind of high for how it usually is playing back videos.

I went into PM2 using pm2 status and showed memory much higher than the rest of the processes. I did a pm2 restart 1

afterservicerestart.jpg

I followed up that command with pm2 logs to show the log for the IPFS daemon start up information. Looks good, daemon is ready.

memoryusageaftestart52419.jpeg

After restarting and doing a pm2 status the IPFS daemon using PM2. It is now using 23MB instead of 2.9GB.

htopafter52419.jpeg

I tried the video again, by closing the window and opening it again and playing back video. Looks good now using htop, memory is staying under 1GB of usage and CPU is running much better with that surplus of memory.

Special Thanks to dreemsteem@dreemsteem for bringing this to my attention. It brings up a good point, as my LBRY server that I host my images on has done the same. Memory seems to spike and use up most of the system resources.

Plans going forward:

I think I need to implement two things:

Scripts to restart Processes and systemctl services, I cannot run my LBRY node on PM2 so I must use systemctl for starting and stopping it.
I can solve this using Crontab. Or using the timer function with systemctl.

Web based network monitoring to check on my server and to have email notifications if something goes awry. Some solutions may be software such as Cacti, librenms, Zabbix or Graphite. One big bonus would an option to view countries viewing my pictures and videos. I know I can see the IP addresses, but would be cool if one of these network monitoring tools could resolve the IP to the country of origin and output that on one of the monitoring pages.

Apps such as Solarwinds, Nagios and others are out of my price range, and with these other solutions that are free id rather try the above before investing in enterprise software.

I am glad I have these challenges, as this is important for maintaining a healthy server. My biggest concern is serving two websites using nginx on the same vps. I have not done that yet, right now its just my dtube uploader page and a second domain for the IPFS gateway. So hopefully it will be simple, just like adding the gateway to my nginx site config. Ill be backing up my config files before I get started though.

For the moment the issue of playback has been resolved, so give the video another try dreemsteem@dreemsteem:

https://ipfsgateway.makingblocks.xyz/ipfs/QmS18qxsqjaxLoen8y7vNSy3Kh3iMHdJJuVq2aMN8d9D5D


CoinDonation Address
BTC:bc1qhfmvd2gywg4fvrgy2kkkkyqta0g86whkt7j8r7
LTC:ltc1qdyzm5cwgt8e2373prx67yye6y9ewk0l8jf3ys9
DASH:XkSqR5DxQL3wy4kNbjqDbgbMYNih3a7ZcM
ETH:0x045f409dAe14338669730078201888636B047DC3
DOGE:DSoekC21AKSZHAcV9vqR8yYefrh8XcX92Z
ZEN:znW9mh62WDSCeBXxnVLCETMx59Ho446HJgq

Rockin Steemians

#rockhound & rockhounds@rockhounds by bitfiend@bitfiend

#shadowphoto by melinda010100@melinda010100

#mineralmondays by rt395@rt395

#bouldersunday by shasta@shasta

#GTWCA (Crypto Price Analysis) by gandalfthewhite@gandalfthewhite


PlatformURL/Username
Steemhttps://steempeak.com/@solominer
D.Tubehttps://d.tube/#!/c/solominer
Wekuhttps://main.weku.io/@solominer
Bit.Tubehttps://bit.tube/solominer
MithrilSolominer
DiscordSolominer#4248
Bitcointalkhttps://bitcointalk.org/index.php?action=profile;u=83228
CryptoPanichttps://cryptopanic.com/solominer
Whaleshareshttps://whaleshares.io/@solominer
Bearshareshttps://bearshares.com/@solominer

HyedqTBryV.gif

thanks nevlu123@nevlu123 for the animation

Managing resources on my IPFS server | Ecency