Re: [tor-relays] Tor automatic restart

2021-10-12 Thread s7r

Hi,

I don't see the problem in being How to automatically restart Tor. The 
base problem is, why do you need to restart it regularly or at every x 
period?


I mean, I only restart my Tor when I apply updates to Tor or to the 
operating system, etc. -- otherwise it works fine. If something hangs 
your Tor process and you need to restart it, you have to determine the 
cause of that.


What OS and which version, hardware and setup (bare metal, virtual 
machine) do you use?

What are the system resources (CPU,RAM,HDD/SSD,Bandwidth)?
How did you install Tor? Package manager or other method?
What is your soft and hard max open files limit?


Keifer Bly wrote:
No. I have no other processes running on the vps. The OS Debian Linux is 
running the newest version, it seems something is causing the tor 
process to get hung up once a month. Will take a look at that, thanks.

--Keifer


On Sun, Oct 10, 2021 at 10:04 AM Tor Manager > wrote:


On Sunday, October 10, 2021 at 4:48:47 AM UTC-4 Keifer Bly wrote:

I am wondering, is there a way configure tor (via the torrc
file) to restart automatically once a month? Thank you.


Before you implement a time-based service restart, you may wish to
check that your OS and hardware (eg. firmware) are as up to date as
you can reasonably make them. It strikes me as odd that you would
have that instability that would require such a service restart. Do
you have other services running? Are you running any sort of system
monitoring that would tell you about issues with RAM or persistent
storage?

With that said, I have used monit[0] in the past to bring services
back up when a test fails, though never tor. Note that my go-to if I
were going to implement monit would be to have a service check, and
not restart on a time basis, but rather on a threshold or
reachability basis. Eg. if you were going to use monit with a
webapp, Id suggest you have a page in the style of
https://example.org/webapp/monit-check/
 that must load the app
runtime, and then have monit restart everything involved in the app
if that page load takes more than 15 seconds. In your case that
might look like installing nyx[1] and having a wrapper script that
checks with nyx and has a non-zero exit you can have monit act on.

Cheers,
--
ibiblio Tor Manager

[0] https://mmonit.com/monit/documentation/monit.html

[1] https://nyx.torproject.org/ 






OpenPGP_signature
Description: OpenPGP digital signature
___
tor-relays mailing list
tor-relays@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays


Re: [tor-relays] Tor automatic restart

2021-10-12 Thread lists
On Monday, October 11, 2021 4:36:16 AM CEST Keifer Bly wrote:
> No. I have no other processes running on the vps. The OS Debian Linux is
> running the newest version, it seems something is causing the tor process
> to get hung up once a month. Will take a look at that, thanks.

On debian 9, 10 and 11, the tor deamon is started and managed by systemd by 
default. With the option 'Restart=on-failure'
Is the tor service really down?
~$ sudo systemctl status tor

If the tor service is terminated by something, you can find out why this is 
happening in the logs. Reading the log files carefully is always the first 
thing 
to do in the event of errors on UNIX systems.
~$ cat /var/log/tor/notices.log

-- 
╰_╯ Ciao Marco!

Debian GNU/Linux

It's free software and it gives you freedom!

signature.asc
Description: This is a digitally signed message part.
___
tor-relays mailing list
tor-relays@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays