0

I have a daemon service (transmission) that timeouts after a few minutes of usage, I started a thread to find out why, but until then I'd like to know if there is a bash command where I can restart the service after it times out for x time? Right now I put a bandaid on it and just made a looping bash script that restarts it after 5 minutes, but i'd prefer to be more efficient until I can fix whatever is going on with the service.

gcsvm: n1-standard-1 (1 vCPU, 3.75 GB memory) running ubuntu-1604-xenial-v20200407 and using gcsfuse to mount storage from a cloud bucket

Zeinir
  • 25
  • 1
  • 5
  • 2
    Please provide more details: **1**. describe your VM instance **2**. update question with transmission log records – Serhii Rohoza Apr 20 '20 at 11:02
  • Described my vm instance, how do I enable logging? I modified /etc/default/transmission-daemon to include OPTIONS="--config-dir $CONFIG_DIR --logfile /path/to/transmission.log" using this answer https://askubuntu.com/a/398864 but it doesnt log anything? – Zeinir Apr 20 '20 at 22:50
  • You can find some log records at `/var/log/syslog` with default configuration of transmission. Have you tried to set as close to default configuration as possible and check if it crashes? – Serhii Rohoza Apr 21 '20 at 10:18
  • I started with default then turned it all down to try and slow crashes. I have it relatively stable at this point ill add a log the next time it crashes – Zeinir Apr 21 '20 at 10:27
  • I've created n1-standard VM and installed there Transmission with the command `sudo apt-get install transmission-cli transmission-common transmission-daemon` and it runs without any crushes for more than 30 min. Do you have any transmission related log records at `var/log/syslog`? – Serhii Rohoza Apr 21 '20 at 10:47
  • I'd recommend you to have a look at documentation [TransmissionHowTo](https://help.ubuntu.com/community/TransmissionHowTo) and [Editing Configuration Files](https://github.com/transmission/transmission/wiki/Editing-Configuration-Files). In addition, I do not recommend you to use such outdated [answer](https://askubuntu.com/questions/397589/enable-logging-to-service/398864#398864) because a lot of things changed since `answered Jan 2 '14 at 10:25`. – Serhii Rohoza Apr 21 '20 at 11:01
  • I changed to a n1-standard-v4 as my cpu was peaking, and finally caught some logs, every torrent piece I had failed its checksum all at once? sorry for the late reply, but I forgot I had asked my question here – Zeinir Apr 25 '20 at 06:54
  • Maybe something to do with gcsfuse not keeping up with dl speeds? I'm on standard storage, with 3mb/s download speed limit – Zeinir Apr 25 '20 at 06:57
  • Have a look at the documentation [Key differences from a POSIX file system](https://cloud.google.com/storage/docs/gcs-fuse#notes):"Small random reads are slow due to latency to first byte" and "Random writes are done by reading in the whole blob, editing it locally, and writing the whole modified blob back to Cloud Storage. Small writes to large files work as expected, but are slow and expensive." and so on. Try to run torrents from local disk only, at least for to check how it works. – Serhii Rohoza Apr 25 '20 at 07:29
  • heard that im doing it wrong lol. I just heard that larger disks are more expensive. If i put incomplete dir on disk and compeleted dir on cloud would that work fine? – Zeinir Apr 25 '20 at 07:36
  • I'm not sure, but you can try. – Serhii Rohoza Apr 25 '20 at 11:57

0 Answers0