xcodian / PerPlayerLoot

A TShock server plugin which makes naturally spawned loot chests have a separate inventory for each player on your server. Every player that finds a chest can loot it for themselves, even if it has been looted by someone else before.
10 stars 1 forks source link

Opening chest would cause server lag. #2

Open Cordium1990 opened 7 months ago

Cordium1990 commented 7 months ago

When open a chest in the dungen of wild.During that time, time would frozen in that moment,and after I opened that chest,evething starts going on.

xcodian commented 7 months ago

Hello, sorry for the late reply - it is very strange that this plugin would be causing any performance issues, as it actually does surprisingly little in order to function.

If possible, could you let me know about:

  1. What hardware is your server running on?
  2. What is the file size of "perplayerloot.db" file in the tshock folder?
  3. Does the same issue occur with regular chests?
  4. Do you have any other plugins installed?

Hope I can help you out. :)

Cordium1990 commented 7 months ago

sorry mister, my bad, after I check these 4 questions, I found that lag was because I have two maps use the same name. And I should delete the SQLite file after I changed map. After I done that, there's another issue comes out, when I open a chest which I have never opened before would cause a few seconds' lag. After the first open, the issue disappears. For your questions' answer 1.Inter Xeon CPU E5-2690 V2 3.00Ghz with 16gb ram. 2 2.15mb 3 no 4 no, I have tested it with no plugin install, and it seems with fewer player, the lag would shorter.

vosdbk commented 7 months ago

we have the same problem!

  1. intel xeon e5645, 16gb ram
  2. perplayerloot.sqlite, 144kb
  3. no, just with new found chest
  4. no, just perperlayloot installed

when one player find a chest and trying to open it, all players would be stoped until a lot of server notice displayed, costs about 5~10 secs. as pic no.1 below. 1

server log shows that has throwed an exception, as pic no.2 2

xcodian commented 7 months ago

Thanks for the reports guys, I'll take a look at what's causing the issue.