First of all, I'm sorry for my english, not native speaker, so I might repeat tons of words. But let's get right into the problem, hopefully this community can help me out.
CREATING THE SERVER
I decided to create a server - via Hamachi - using my old laptop, instead of using my main laptop, so I could aLlocate more RAM into the server. I did all the steps just fine, server was always joinable and visible. My friend also could always use it with no issues. Lag was no problem at all.
START OF THE ISSUES
Untill a few hours later, when I try to join the server, I was getting timed out and/or very laggy.
We we're using our map from our Aternos Server (the reason we left Aternos was due the queue time). Those issues started to show up after I decided to continue a few in-game maps and build a "map wall" (the ones with items frames). I did it for a bit (4 maps + 2 maps I had done inside Aternos Server), left the server, had dinner, and when I came back, along with my friend (which was in his house, in case someone missunderstood it), the issues started to show up.
Started with me being unable to join while my friend was on the server. If I tried to, I would get timed out or wouldn't even leave the "Joining Server/Encrypting" screen (even tho I appeared to him as "joined server"). If my friend was off-line, I could perfectly join it with no lag at all. But if he joined, while I was online, I would get timed out in the moment he joined. Seemed like his connection to the server was interrupting mine.
TRYING TO FIX IT
Later on, I tried resetting the map. Backed up the Aternos Map (let's call it this way) and created a whole new one. We'll call it the New Map. The same issues were happening in the New Map, so we just decided to recreate the whole server file, from scratch. New Map #2 was generated, we tried again, same results. Re-Imported the Aternos Map, same issues.
Now here comes the new main issue: I am, as usual, able to join the server when alone. But now I'm getting very laggy. The server lists shows up 4-8ms, but it is very laggy when I try to play. Only have 1 bar of connection, takes time for a few actions to work, and I get some "good connection" spikes, where chests, chat and other actions are almost instant.
My friend, meanwhile, is able to perfectly play everytime. Never gets timed out, his connection is perfect, no lag at all, just like we had before this all happened. And our internet is the same (pretty sure mine is better actually).
I'm not sure, but the only time we played together was when I created the server in my MAIN laptop. It was a bit laggy because I didn't allocated more RAM at the time, but it worked, no timeouts, nothing like I mentioned. As soon as I moved it into my secondary/old laptop, I believe we didn't get to play together.
Maybe my old laptop has some kind of internet setting that messes with our connection? But I don't see how this would change my own connection to the server and the later lag that I started to get.
I will now describe a few things we tried to achieve by following forums.
I thought it could be some corrupted chunk issue. I'm no expert on it, I don't know exactly how it works, but the same issues happened on the New Map #1 and #2, so maybe a corrupted chunk wasn't the issue.
I thought it could be some sort of DAT file issue (player data). So I deleted (and backed up) the players DAT files and re-opened the server. My friend joined, all fine, no lag. I joined, same issue: timed out. Tried to do that and generate a new world: same issues.
I have tried to disable the Server Laptop's Firewall, Windows Defender Antivirus, but nothing seemed to work.
My biggest headache ATM is that I get low ping on the server list, as I said, 4-8ms. But when online, the server lags.
I haven't found someone with the same issue, specially by the fact that every forum with questions directioned to server lags are erros related to someone not even being able to find the server, connect to the server, etc. In our case, we can see, join, connect, but with the main issues I explained.
Even tho I have tried to achieve some solutions, I'm accepting every time of ideas and tips.
Hopefully you guys can help me out on it, we really just want to finish our journey. Anything is welcome.
Yeah, I took a look onto that. Believe I managed to port foward my router and all. My connection seems to be working better now, sometimes I get kicked for this sort of message "handledisconnection() called twice".
My friend will later try to join me, and I'll keep you guys posted.