Why does terraria get stuck at "connecting to...."?

Why does terraria get stuck at "connecting to...."? - Young hipster looking at smartphone screen in park

I have a server running on my desktop pc for terraria that my brothers and myself try to play on. They don't seem to have a problem getting on, but I have difficulties even though its my server. I'll lose the connection and when trying to reconnect it gets stuck on the "connecting to " screen. I can only reconnect after restarting the server. I play on a laptop, so is this an issue with the IP I'm connecting from or just a network issue in general? I've done port forwarding for each computer's IP address and am allowing the game through the firewall.



Best Answer

I have run into this issue a number of times. When you first start up the server, it should ask you how many player spots to reserve, from 1-8. I'm assuming you selected 2 - one for yourself, and one for your brother. Try increasing this to 3 or higher (I set mine to 6). This seems to get rid of this problem, or at least reduce the occurrences by a significant amount.

The following is speculation, since I don't have the client/server source code in front of me, but I believe this error happens because whenever you disconnect, the server keeps temporary session in memory in case you reconnect. This "ghost session" uses up one of those reserve slots, and sometimes the server bugs out and doesn't end those sessions for a long time, which prevents you from logging back in. By increasing the number of available slots, you bypass this problem... at least for a while, until hopefully the server un-bugs itself. If there are enough disconnections to take up all the slots before the server fixes itself, you may still need to restart the server.

I believe one of the latest server updates was supposed to fix this error, but I have occasionally run into it again anyways. The above workaround still works for me just fine.




Pictures about "Why does terraria get stuck at "connecting to...."?"

Why does terraria get stuck at "connecting to...."? - Free stock photo of alphabet, be a self starter, blur
Why does terraria get stuck at "connecting to...."? - Scrabble Tiles on White Surface
Why does terraria get stuck at "connecting to...."? - Close-Up Shot of Scrabble Tiles on a White Surface



Why does Terraria keep saying connecting to?

It could be an incompatibility between your computer and your friend's computer/internet, it could be something on their end, it could be something in your router settings, etc. Have you tried joining any other multiplayer servers?

Why wont Terraria let me join my friends server?

If your friends can't connect to Terraria server, using steam invite can solve this sometimes. Updating the network driver will solve the problem if the driver problem was behind it. Tweaking Windows Firewall or any other third-party firewall settings can be another effective solution.

How do I connect to localhost Terraria?

Connecting to the serverStep 1: Launch Terraria as you would normally. Step 2: Select Multiplayer > Join via IP. Step 3: Select the character you wish to use. Step 4: Type in either \u201clocalhost\u201d or \u201c127.0.



How to fix the “Terraria lost connection” 2020 bug and get playing with friends online again




More answers regarding why does terraria get stuck at "connecting to...."?

Answer 2

You need to post more details in order for us to help you. (I cannot comment with my current reputation; I understand this answer sounds like a comment, but the information below should help the OP.)

If you are connecting from your own computer, you either need to connect directly via your own IP, or using localhost. When playing multiplayer, and hosting on the computer I am also playing on, using the official dedicated server .exe, I have had the most success joining using the IP of localhost. (It might seem weird to type text into a field asking for an IP, but Terraria can join servers based on domain names - which can be handy for servers using dynamic IPs.)

Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Mary Taylor, Brett Jordan, Brett Jordan, Brett Jordan