I run a fairly popular server with 40-90 players online most of the time however there is a weird bug where chunk loading doesn't work right (we fixed it mostly in the default level) but switching world's causes teleportation glitches and the world fails to load. Another side effect of this error state is that the server fails to stop, as in I have to force kill the port and it hangs on unloading one of the levels. When the levels actually do load right, players can't join due to "Login Timeout". Something else that could contribute to it is lots of people using literally any attack vector in pocketmine they can find to lag it out so they can insult my server calling it "leet" (I use maxed plan Ovh VPS right now, switching to dedicated soon but need this issue solved first). The issue seems random, however it happens frequently. There is an async task on join for proxy blocking which gets at a minimum 7k requests a day (I know this from my API key data). I've noticed the issue with chunk loading is very similar to what happens when you lag out a server using the attack vector (not going into specifics this is a known bug :v). Another thing the server has is reconnecting, and a restarter set to every hour. I can't seem to figure out how to fix this bug. It happens randomly and goes away randomly. I have however figured out that it seems to only occur when my servers core is loaded, but it has 0 to do with chunk loading. The dev who wrote the core isn't able to recreate the issue on his end and is equally confused. It seems the only thing at this point is a full rewrite, but since I've seen similar chunk loading issues on other servers, I get the feeling it's not just my server being effected by similar issues.
Which version of PMMP are you using? Is there any error or crashdump above all the timeout messages in the console? What is your chunk issue? You have so many possible sources of this problem, you'll want to narrow them down one by one.
Cupidon made a topic on the chunks, this is a continuation of that post in a sense, same server ect. https://postimg.cc/image/ke6taoj3v/ I'm using 3.1.3 release
Does the timeout issue still occur even if the plugin is unloaded? Is the plugin private? How did you fix most of the chunk issues? Usually, PMMP creates errors or crashdumps for something like this, so it seems unlikely that it's anything you'll find much help for here. I may very well be wrong, but that's how it appears to me.
Plugin is private. The issues with the default level loading aren't totally gone but they're better and I can ask what they did. Other levels don't load as often correctly. There is 0 code that has to do with chunks and chunk loading so this doesn't really make sense at all.. another weird thing they told me was that the async check was somehow delayed 2 minutes.
Sounds like you have this issue: https://github.com/pmmp/PocketMine-MP/issues/1161 Do not abuse the async workers for blocking jobs. It will delay the processing of important CPU-intensive tasks like chunk sending. I recommend you either use a dedicated thread for this, or pick a single worker from the pool and always use the same worker with submitTaskToWorker().
I think this will work, what we've done to test is disable proxy blocking (the async task) for the first couple seconds on start of the server. That should prevent players from spamming the async workers on reconnect after the server restarts.