peerstohttp icon indicating copy to clipboard operation
peerstohttp copied to clipboard

dies randomly

Open jameseriksen74 opened this issue 4 years ago • 4 comments

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?

jameseriksen74 avatar Jul 02 '21 05:07 jameseriksen74

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

WinPooh32 avatar Jul 02 '21 05:07 WinPooh32

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

jameseriksen74 avatar Jul 02 '21 06:07 jameseriksen74

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

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

WinPooh32 avatar Jul 02 '21 09:07 WinPooh32

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.

jameseriksen74 avatar Jul 02 '21 14:07 jameseriksen74