WinPooh32 / peerstohttp

Simple torrent proxy to http stream controlled over REST-like api
GNU General Public License v3.0
46 stars 10 forks source link

dies randomly #16

Open jameseriksen74 opened 3 years ago

jameseriksen74 commented 3 years ago

I've been having a problem were it just dies while "streaming" a video, How can I run this as a daemon and have it restart if/when it dies?

WinPooh32 commented 3 years ago

Can you describe how much ram you have, what os, etc? Do you use docker version? Which start parameters are used for app? How much free space on hdd? Any errors when fails?

How can I run this as a daemon and have it restart if/when it dies?

For bash you can try infinite start loop:

while true; do perrstohttp; sleep 1; done
jameseriksen74 commented 3 years ago

I'm just testing for now using an AWS instance not using docker.

Ubuntu 20, go 1.16

I'm guessing you mean:

while true; do go run github.com/WinPooh32/peerstohttp/cmd -port=8585; sleep 1; done I can resize the instance accordingly if you have recommended specs. Also I have set up a clean up cron script that will run every minute and remove files older than 4hrs

UPDATE This worked

WinPooh32 commented 3 years ago

I'm just testing for now using an AWS instance not using docker.

As I know most of hosters block any p2p torrent activity.

jameseriksen74 commented 3 years ago

Actually AWS supports downloads they even have torrents api on s3 https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTorrent.html Eventually I will be looking for a host after I complete the construction of my project.