[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-relays] Tor Process Being Killed on VPS



On Fri, 26 Feb 2016 08:05:06 -0500
Steve Snyder <swsnyder@xxxxxxxxxxxxx> wrote:
> I'm unfamiliar with the memory use of nginx, but 512MB ought to be more 
> than enough RAM to run just the relay on a 64-bit VPS..
> 
> Are you *sure* you're not running anything else? Not crond?  Not ntpd? 
> Not iptables? If not SSH, how do you administer the VPS?

IPTables is configured, but no firewall daemon is running. NTPd is not running (I've tried, but the kernel does not have permission to set the clock; I assume this is due to the hypervisor setup). SSH is not running. I have console access through the control panel. Cron and rsyslog are running. I didn't include them in my original post because assumed that others would assume they'd be running since they're quite common and regular system daemons.

Here's a full output of `ps aux` that I just ran (it's not very long):
https://gist.github.com/srguglielmo/63290d10b1bba434c77d

> 
> What type of virtualization is the VPS using?  If not OpenVZ, make sure 
> you have virtual memory on the system.  You can create a swapfile if 
> don't already have a swap partition.

It uses KVM. It doesn't currently have swap space, so I'll add a swapfile for the system to use. Hopefully this will solve the problem.

> 
> Do you have SELinux enabled in the VPS?  if so, get rid of it.

I'll double check this and make sure to disable it if enabled. Thanks!

> 
> Finally, you may have to ditch nginx and just use Tor and the system 
> utilities to monitor performance.


Some additional information.
Here's the out-of-memory errors I've been seeing in /var/log/messages.
https://gist.github.com/srguglielmo/e2693513e3502a0d5196

It seems that systemd restarts Tor whenever it's killed.

`free -m`:
              total        used        free      shared  buff/cache   available
Mem:            489         303          16           8         169         124
Swap:             0           0           0

I'll look into enabling swap and ensuring SELinux is disabled. Hopefully that will help. Thank you!


> 
> 
> On 02/25/2016 06:19 PM, Stephen R Guglielmo wrote:
> > Hello,
> >
> > I have a VPS with 512 MB RAM. I run nothing on it except nginx and a Tor relay. The relay is an entry guard and moves about 20 MB/s. It seems that the kernel is killing the Tor process with "out of memory" errors. Are there any tips for mitigating this? I don't have the money right now to upgrade to the next higher VPS plan which has more RAM, unfortunately. Maybe there's some config settings that I can modify to limit the RAM usage? Or, am I just out of luck?  
> 

Attachment: pgpgNl9Zn0zQB.pgp
Description: OpenPGP digital signature

_______________________________________________
tor-relays mailing list
tor-relays@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays