Are you perhaps familiar with the two phrases:

read timed out
connection reset

Since recently I have become quiet familiar with them myself and in this post I will describe how to get rid of them.

Reason 1 – Rouge plugin

Reason Description

Minecraft is mainly single-threaded. The main thread has a formal name when you look in the source code. It is called “Server thread”. If a plugin isn’t coded correctly the “Server thread” may get stuck in an eternal loop. Here is such an example: unsafe loop in xAuth. What if the player is floating over the void in a skylands-world (all empty but for some floating islands)? The while-loop would never cancel and the “Server thread” would get stuck.

Reason Solution

You may have 50 plugins installed. How do you find the plugin causing the issue? I use CraftBukkit++ (called CB++). It has a nice feature that comes in handy in this situation. If the “Server thread” hangs CB++ will output a thread-dump. That thread-dump is visible both in the console and in server.log. I searched for “Server thread” and found this:

This line tell us the location of the bad code:

Reason 2 – todo

I will add more reasons as I find them.