# Tor "Resetting timeout" crashed my server

**URL:** https://forum.torproject.org/t/tor-resetting-timeout-crashed-my-server/12019
**Category:** Relay Operator
**Created:** [March 21, 2024, 5:54pm UTC](https://forum.torproject.org/t/tor-resetting-timeout-crashed-my-server/12019 "2024-03-21T17:54:23Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![renehoj](https://forum.torproject.org/letter_avatar_proxy/v4/letter/r/8491ac/32.png) [@renehoj](https://forum.torproject.org/u/renehoj)
#### Post date: [March 21, 2024, 5:54pm UTC](https://forum.torproject.org/t/tor-resetting-timeout-crashed-my-server/12019/1 "2024-03-21T17:54:23Z")

</div>

Everything had been running without issue for long time, but I got this message today.

`[notice] Your network connection speed appears to have changed. Resetting timeout to 60000ms after 18 timeouts and 1000 buildtimes.`

And after that I started getting a lot of out of memory warnings

`[notice] We're low on memory (cell queues total alloc: 5903821968 buffer total alloc: 182304768, tor compress total alloc: 50458560 (zlib: 908544, zstd: 49549392, lzma: 0), rendezvous cache total alloc: 102271497). Killing circuits withover-long queues. (This behavior is controlled by MaxMemInQueues.)`

Which resulted in a controlled crash

```auto
Mar 21 14:38:10.000 [warn] connection_edge_about_to_close(): Bug: (Harmless.) Edge connection (marked at ../src/core/or/circuitlist.c:2747) hasn't sent end yet? (on Tor 0.4.8.10 )
Mar 21 14:38:10.000 [warn] tor_bug_occurred_(): Bug: ../src/core/or/connection_edge.c:1086: connection_edge_about_to_close: This line should not have been reached. (Future instances of this warning will be silenced.) (on Tor 0.4.8.10 )
Mar 21 14:38:10.000 [warn] Bug: Tor 0.4.8.10: Line unexpectedly reached at connection_edge_about_to_close at ../src/core/or/connection_edge.c:1086. Stack trace: (on Tor 0.4.8.10 )
Mar 21 14:38:10.000 [warn] Bug: /usr/bin/tor(log_backtrace_impl+0x5a) [0x55ac2078ccaa] (on Tor 0.4.8.10 )
Mar 21 14:38:10.000 [warn] Bug: /usr/bin/tor(tor_bug_occurred_+0x16f) [0x55ac2079804f] (on Tor 0.4.8.10 )
Mar 21 14:38:10.000 [warn] Bug: /usr/bin/tor(connection_exit_about_to_close+0x21) [0x55ac20840281] (on Tor 0.4.8.10 )
Mar 21 14:38:10.000 [warn] Bug: /usr/bin/tor(+0x712fd) [0x55ac207122fd] (on Tor 0.4.8.10 )
Mar 21 14:38:10.000 [warn] Bug: /usr/bin/tor(+0x719fb) [0x55ac207129fb] (on Tor 0.4.8.10 )
Mar 21 14:38:10.000 [warn] Bug: /lib/x86_64-linux-gnu/libevent-2.1.so.7(+0x1ff58) [0x7fa9c9981f58] (on Tor 0.4.8.10 )
Mar 21 14:38:10.000 [warn] Bug: /lib/x86_64-linux-gnu/libevent-2.1.so.7(event_base_loop+0x577) [0x7fa9c99838a7] (on Tor 0.4.8.10 )
Mar 21 14:38:10.000 [warn] Bug: /usr/bin/tor(do_main_loop+0x105) [0x55ac207143d5] (on Tor 0.4.8.10 )
Mar 21 14:38:10.000 [warn] Bug: /usr/bin/tor(tor_run_main+0x195) [0x55ac2070fcb5] (on Tor 0.4.8.10 )
Mar 21 14:38:10.000 [warn] Bug: /usr/bin/tor(tor_main+0x3e) [0x55ac2070c19e] (on Tor 0.4.8.10 )
Mar 21 14:38:10.000 [warn] Bug: /usr/bin/tor(main+0x1d) [0x55ac2070bd4d] (on Tor 0.4.8.10 )
Mar 21 14:38:10.000 [warn] Bug: /lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x7fa9c9206d90] (on Tor 0.4.8.10 )
Mar 21 14:38:10.000 [warn] Bug: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x7fa9c9206e40] (on Tor 0.4.8.10 )
Mar 21 14:38:10.000 [warn] Bug: /usr/bin/tor(_start+0x2e) [0x55ac2070bdae] (on Tor 0.4.8.10 )
Mar 21 14:38:10.000 [warn] connection_edge_about_to_close(): Bug: (Harmless.) Edge connection (marked at ../src/core/or/circuitlist.c:2747) hasn't sent end yet? (on Tor 0.4.8.10 )

```

After this I kept getting a low memory warning ever 1-2 min, and all memory including disk swap was used.

I suspect it was the initial `Resetting timeout to 60000ms` that started all the problems, do I need to do something to prevent it from happening again?

---

<div class="post-metadata">

### Author: ![gus](https://forum.torproject.org/user_avatar/forum.torproject.org/gus/32/16_2.png) [@gus](https://forum.torproject.org/u/gus)
#### Post date: [March 21, 2024, 6:27pm UTC](https://forum.torproject.org/t/tor-resetting-timeout-crashed-my-server/12019/2 "2024-03-21T18:27:11Z")

</div>

It seems that bug was already reported here:

> **[connection\_edge\_about\_to\_close(): Bug: (Harmless.) Edge connection (marked at...](https://gitlab.torproject.org/tpo/core/tor/-/issues/40820)**
>
> ... 07:55:37.000 \[notice\] Heartbeat: Tor's uptime is 7 days 18:00 hours, with 71411...

Maybe you could try the ddos scripts made by @Enkidu-6?

> [@Tor DDoS Mitigation iptables scripts update. Version 7.0.0](https://forum.torproject.org/t/tor-ddos-mitigation-iptables-scripts-update-version-7-0-0/11847):
>
> A New version of the tor-ddos iptables rules modified slightly to deal with the current ongoing attack is now available. [Change log](https://github.com/Enkidu-6/tor-ddos/releases) It is now easier for you to apply the rules by simply running: bash \<(curl -Ls https://raw.githubusercontent.com/Enkidu-6/tor-ddos/main/download.sh) The script will do the rest by asking you a few questions, taking care of dependencies on Ubuntu and Debian, as they don’t come with ipset and conntrack by default - and then applying the rules. It will also give…
