whimxiqal / journey

A server-side path-finding Minecraft plugin
MIT License
14 stars 3 forks source link

[1.1] Lots of path requests at once causes lag and error. #53

Closed TheDeafCreeper closed 1 year ago

TheDeafCreeper commented 1 year ago

A bunch of people tried to start paths at once and it caused a ton of lag, and the following error. (It also caused DB locked errors which is a known issue)

[17:07:28 WARN]: [Journey] Scope from plugin Journey is using an invalid sub-scope id: ITZWBL_. Please notify the plugin owner.
[17:07:28 WARN]: [Journey] Scope from plugin Journey is using an invalid sub-scope id: The3ditor_. Please notify the plugin owner.
[17:07:28 WARN]: [Journey] Scope from plugin Journey is using an invalid sub-scope id: 4DrewsEh. Please notify the plugin owner.
[17:07:28 WARN]: [Journey] Scope from plugin Journey is using an invalid sub-scope id: 2xcl. Please notify the plugin owner.
[17:07:28 WARN]: [Journey] Scope from plugin Journey is using an invalid sub-scope id: ITZWBL_. Please notify the plugin owner.
[17:07:28 WARN]: [Journey] Scope from plugin Journey is using an invalid sub-scope id: The3ditor_. Please notify the plugin owner.
[17:07:28 WARN]: [Journey] Scope from plugin Journey is using an invalid sub-scope id: 4DrewsEh. Please notify the plugin owner.
[17:07:28 WARN]: [Journey] Scope from plugin Journey is using an invalid sub-scope id: 2xcl. Please notify the plugin owner.

Relevant Spark: https://spark.lucko.me/q8f2EVVCGM

TheDeafCreeper commented 1 year ago

Some debug info

[17:32:13 INFO]: [Journey] [Destination Graph Goal Search] {session: 632b623a-fb13-4bb1-abad-fe81b256bf72, origin: {x: 4, y: 98, z: 5, domain: 0}, destination: {x: -1468, y: 63, z: -4281, domain: 1}, caller: (PLAYER) 00d477dc-6c86-473f-97c0-6434b2fba066, state: idle}: scheduling search
[17:32:13 INFO]: [Journey] [Itinerary Search] {session: 632b623a-fb13-4bb1-abad-fe81b256bf72, origin: {x: 4, y: 98, z: 5, domain: 0}, paths: 2, path searches: 0, state: idle, changed graph: false}: itinerary trial started
[17:32:13 INFO]: [Journey] [Itinerary Search] {session: 632b623a-fb13-4bb1-abad-fe81b256bf72, origin: {x: 4, y: 98, z: 5, domain: 0}, paths: 2, path searches: 0, state: running, changed graph: false}: itinerary trial needs to calculate 2 paths
[17:32:13 INFO]: [Journey] [Destination Path Search] {session: 632b623a-fb13-4bb1-abad-fe81b256bf72, origin: {x: 4, y: 98, z: 5, domain: 0}, destination: {x: 10, y: 100, z: -40, domain: 0}, cycles: 1, state: idle, visited: 0, from cache: false}: path trial beginning
[17:32:13 INFO]: [Journey] [Destination Path Search] {session: 632b623a-fb13-4bb1-abad-fe81b256bf72, origin: {x: -3993, y: 120, z: -3798, domain: 1}, destination: {x: -1468, y: 63, z: -4281, domain: 1}, cycles: 1, state: idle, visited: 0, from cache: false}: path trial beginning
[17:32:13 INFO]: [Journey] [Destination Path Search] {session: 632b623a-fb13-4bb1-abad-fe81b256bf72, origin: {x: 4, y: 98, z: 5, domain: 0}, destination: {x: 10, y: 100, z: -40, domain: 0}, cycles: 1, state: running, visited: 317, from cache: false}: succeeded
[17:32:14 INFO]: TheDeafCreeper issued server command: /tps
[17:32:14 INFO]: [Journey] [Chunk Cache] {131}: added: 131, removed: 0
[17:32:16 INFO]: [Journey] [Chunk Cache] {258}: added: 127, removed: 0
[17:32:18 INFO]: Artar05 lost connection: You have been kicked for idling more than 10 minutes.
[17:32:18 INFO]: [voicechat] Disconnecting client Artar05
[17:32:18 INFO]: [Journey] [Chunk Cache] {392}: added: 134, removed: 0
[17:32:20 INFO]: [Journey] [Chunk Cache] {537}: added: 145, removed: 0
[17:32:21 INFO]: [Journey] [Destination Path Search] {session: 632b623a-fb13-4bb1-abad-fe81b256bf72, origin: {x: -3993, y: 120, z: -3798, domain: 1}, destination: {x: -1468, y: 63, z: -4281, domain: 1}, cycles: 16, state: running, visited: 15299, from cache: false}: succeeded
[17:32:21 INFO]: [Journey] [Itinerary Search] {session: 632b623a-fb13-4bb1-abad-fe81b256bf72, origin: {x: 4, y: 98, z: 5, domain: 0}, paths: 2, path searches: 2, state: stopped (successful), changed graph: true}: itinerary trial succeeded
[17:32:21 INFO]: [Journey] [Destination Graph Goal Search] {session: 632b623a-fb13-4bb1-abad-fe81b256bf72, origin: {x: 4, y: 98, z: 5, domain: 0}, destination: {x: -1468, y: 63, z: -4281, domain: 1}, caller: (PLAYER) 00d477dc-6c86-473f-97c0-6434b2fba066, state: stopped (successful)}: search complete
[17:32:21 INFO]: [Journey] [Destination Path Search] {session: 632b623a-fb13-4bb1-abad-fe81b256bf72, origin: {x: -3993, y: 120, z: -3798, domain: 1}, destination: {x: -1468, y: 63, z: -4281, domain: 1}, cycles: 16, state: stopped (successful), visited: 15299, from cache: false}: caching path in database
[17:32:21 INFO]: [Journey] [Chunk Cache] {668}: added: 131, removed: 0
[17:32:23 INFO]: [Journey] [Chunk Cache] {638}: added: 0, removed: 30
[17:32:24 INFO]: [Journey] [Chunk Cache] {555}: added: 0, removed: 83
[17:32:25 INFO]: [Journey] [Chunk Cache] {503}: added: 0, removed: 52
[17:32:25 WARN]: Can't keep up! Is the server overloaded? Running 12796ms or 255 ticks behind
[17:32:26 INFO]: [Journey] [Chunk Cache] {425}: added: 0, removed: 78
[17:32:27 INFO]: [Journey] [Chunk Cache] {353}: added: 0, removed: 72
[17:32:28 INFO]: [Journey] [Chunk Cache] {232}: added: 0, removed: 121
[17:32:29 INFO]: [Not Secure] JustBins: I cant believe that worked
[17:32:30 INFO]: [Journey] [Chunk Cache] {131}: added: 0, removed: 101
[17:32:31 INFO]: [Journey] [Chunk Cache] {0}: added: 0, removed: 131
whimxiqal commented 1 year ago

Fixed with #55