# Server stops when tickrate its too high

**URL:** <https://forum.heroiclabs.com/t/server-stops-when-tickrate-its-too-high/2813>\
**Category:** Runtime Framework\
**Tags:** server-framework, sdk-unity, lua\
**Created:** [July 10, 2022, 1:16am UTC](https://forum.heroiclabs.com/t/server-stops-when-tickrate-its-too-high/2813 "2022-07-10T01:16:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![KittySkin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/kittyskin/32/1088_2.png) [@KittySkin](https://forum.heroiclabs.com/u/KittySkin)\
**Post date:** [July 10, 2022, 1:16am UTC](https://forum.heroiclabs.com/t/server-stops-when-tickrate-its-too-high/2813/1 "2022-07-10T01:16:59Z")

</div>

Hello!

I am having a strange issue, my current match handler its writhen in Lua, so far so good, everything works out as expected, but when I increase the tickrate high enough (around 10 while we use it at 2 normally), the server suddenly stops after enough player interactions.

What can the issue be?

My first guess is that the tickrate its higher than what the server can handle (meaning that the server cant run the whole loop faster enough), but since there is no error on the console its hard to actually tell what is happening here.

On the server console I still register incoming messages and no error its presented on it, no warnings or anything at all.

Any help its really appreciated.

---

<div class="post-metadata">

**Author:** ![mharis](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/mharis/32/969_2.png) [@mharis](https://forum.heroiclabs.com/u/mharis)\
**Post date:** [July 11, 2022, 2:48pm UTC](https://forum.heroiclabs.com/t/server-stops-when-tickrate-its-too-high/2813/2 "2022-07-11T14:48:46Z")

</div>

Hello,  
first of all, the server shouldn’t stop if the match loop cannot keep up with the tick rate: it should still process falling behind. So there is something else going on but we’d need to see the code, probably starting with the match loop itself. And since the server is registering incoming messages then the server isn’t really stopped - could it be the client that actually stops ?

---

<div class="post-metadata">

**Author:** ![KittySkin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/kittyskin/32/1088_2.png) [@KittySkin](https://forum.heroiclabs.com/u/KittySkin)\
**Post date:** [July 19, 2022, 4:39pm UTC](https://forum.heroiclabs.com/t/server-stops-when-tickrate-its-too-high/2813/3 "2022-07-19T16:39:40Z")

</div>

@mharis  
Found the bug. It was related to the empty checks template provided on the documentation.

The # operator in Lua only accounts for numerical keys on tables (the same way ipairs do) so it returns 0 when used with the provided template check on the documentation.

Just a heads up to fix it later on 🙂

---

<div class="post-metadata">

**Author:** ![mharis](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/mharis/32/969_2.png) [@mharis](https://forum.heroiclabs.com/u/mharis)\
**Post date:** [August 25, 2022, 7:58am UTC](https://forum.heroiclabs.com/t/server-stops-when-tickrate-its-too-high/2813/4 "2022-08-25T07:58:26Z")

</div>

Thanks for the heads-up, we’ll fix this in the documentation.
