Agent.Respawn() causes massive server spikes

Summary

Calling Agent.Respawn() for faster respawns delivers major server spikes. This was occuring in our game Forever Zone Wars for years, and we finally determined that this function is what causes the lag. As you can see in the image, calling Agent.Respawn() once triggers the function repeatedly in 1 server tick 10+ times consistently.

Please select what you are reporting on:

Unreal Editor for Fortnite

What Type of Bug are you experiencing?

Assets

Steps to Reproduce

Add a function calling Agent.Respawn(), then eliminate yourself and see in timing insights that this triggers multiple calls of Agent.Respawn().

Expected Result

Should only call Agent.Respawn() once and not cause server lags.

Observed Result

Server lag anytime Agent.Respawn is called

Platform(s)

PC

Upload an image

This cannot be backlogged, it’s a core respawn mechanic across nearly every map that uses Respawn in UEFN. Please reconsider.

FORT-1192462 has been added to our ‘To Do’ list. Someone’s been assigned this task.

Here’s some extra profiles in different use cases for some extra data.

the execution time for when fort_characters are inactive is a bit too slow in the case you need to respawn many players close to the same time.

We see huge spikes at the end of our rounds in our end game maps
7567-5478-1659 - REALISTIC ENDGAME (SOLOS) [PANDVIL]
0666-2340-0381 - REALISTIC ENDGAME (DUOS) [PANDVIL]
9222-6831-9594 - REALISTIC ENDGAME (TRIOS) [PANDVIL]

# While fort_character is active 
LogVerseFramework: VerseProfile: Agent.Respawn({x=384.000000,y=0.000000,z=384.000000}, Axis: {x=0.000000,y=0.000000,z=-1.000000} Angle: 180.000000) 7.701800 ms
LogVerseFramework: VerseProfile: Agent.Respawn({x=384.000000,y=0.000000,z=384.000000}, Axis: {x=0.000000,y=0.000000,z=-1.000000} Angle: 180.000000) 7.671400 ms
LogVerseFramework: VerseProfile: Agent.Respawn({x=384.000000,y=0.000000,z=384.000000}, Axis: {x=0.000000,y=0.000000,z=-1.000000} Angle: 180.000000) 7.737100 ms
LogVerseFramework: VerseProfile: Agent.Respawn({x=384.000000,y=0.000000,z=384.000000}, Axis: {x=0.000000,y=0.000000,z=-1.000000} Angle: 180.000000) 7.470100 ms
LogVerseFramework: VerseProfile: Agent.Respawn({x=384.000000,y=0.000000,z=384.000000}, Axis: {x=0.000000,y=0.000000,z=-1.000000} Angle: 180.000000) 7.541300 ms
LogVerseFramework: VerseProfile: Agent.Respawn({x=384.000000,y=0.000000,z=384.000000}, Axis: {x=0.000000,y=0.000000,z=-1.000000} Angle: 180.000000) 7.584900 ms
LogVerseFramework: VerseProfile: Agent.Respawn({x=384.000000,y=0.000000,z=384.000000}, Axis: {x=0.000000,y=0.000000,z=-1.000000} Angle: 180.000000) 7.545200 ms
LogVerseFramework: VerseProfile: Agent.Respawn({x=384.000000,y=0.000000,z=384.000000}, Axis: {x=0.000000,y=0.000000,z=-1.000000} Angle: 180.000000) 7.434700 ms
LogVerseFramework: VerseProfile: Agent.Respawn({x=384.000000,y=0.000000,z=384.000000}, Axis: {x=0.000000,y=0.000000,z=-1.000000} Angle: 180.000000) 7.509200 ms
LogVerseFramework: VerseProfile: Agent.Respawn({x=384.000000,y=0.000000,z=384.000000}, Axis: {x=0.000000,y=0.000000,z=-1.000000} Angle: 180.000000) 7.579100 ms
LogVerseFramework: VerseProfile: Agent.Respawn({x=384.000000,y=0.000000,z=384.000000}, Axis: {x=0.000000,y=0.000000,z=-1.000000} Angle: 180.000000) 11.122200 ms
LogVerseFramework: VerseProfile: Agent.Respawn({x=384.000000,y=0.000000,z=384.000000}, Axis: {x=0.000000,y=0.000000,z=-1.000000} Angle: 180.000000) 7.541900 ms
LogVerseFramework: VerseProfile: Agent.Respawn({x=384.000000,y=0.000000,z=384.000000}, Axis: {x=0.000000,y=0.000000,z=-1.000000} Angle: 180.000000) 7.622000 ms
LogVerseFramework: VerseProfile: Agent.Respawn({x=384.000000,y=0.000000,z=384.000000}, Axis: {x=0.000000,y=0.000000,z=-1.000000} Angle: 180.000000) 7.688300 ms
LogVerseFramework: VerseProfile: Agent.Respawn({x=384.000000,y=0.000000,z=384.000000}, Axis: {x=0.000000,y=0.000000,z=-1.000000} Angle: 180.000000) 7.570300 ms
LogVerseFramework: VerseProfile: Agent.Respawn({x=384.000000,y=0.000000,z=384.000000}, Axis: {x=0.000000,y=0.000000,z=-1.000000} Angle: 180.000000) 7.480900 ms
LogVerseFramework: VerseProfile: Agent.Respawn({x=384.000000,y=0.000000,z=384.000000}, Axis: {x=0.000000,y=0.000000,z=-1.000000} Angle: 180.000000) 7.585300 ms
LogVerseFramework: VerseProfile: Agent.Respawn({x=384.000000,y=0.000000,z=384.000000}, Axis: {x=0.000000,y=0.000000,z=-1.000000} Angle: 180.000000) 7.857100 ms
LogVerseFramework: VerseProfile: Agent.Respawn({x=384.000000,y=0.000000,z=384.000000}, Axis: {x=0.000000,y=0.000000,z=-1.000000} Angle: 180.000000) 7.698100 ms


# While fort_character is inactive ( Dragging players out of spectate ) 
LogVerseFramework: VerseProfile: Agent.Respawn({x=384.000000,y=0.000000,z=384.000000}, Axis: {x=0.000000,y=0.000000,z=-1.000000} Angle: 180.000000) 21.991000 ms
LogVerseFramework: VerseProfile: Agent.Respawn({x=384.000000,y=0.000000,z=384.000000}, Axis: {x=0.000000,y=0.000000,z=-1.000000} Angle: 180.000000) 21.646300 ms
LogVerseFramework: VerseProfile: Agent.Respawn({x=384.000000,y=0.000000,z=384.000000}, Axis: {x=0.000000,y=0.000000,z=-1.000000} Angle: 180.000000) 22.099300 ms
LogVerseFramework: VerseProfile: Agent.Respawn({x=384.000000,y=0.000000,z=384.000000}, Axis: {x=0.000000,y=0.000000,z=-1.000000} Angle: 180.000000) 22.831200 ms
LogVerseFramework: VerseProfile: Agent.Respawn({x=384.000000,y=0.000000,z=384.000000}, Axis: {x=0.000000,y=0.000000,z=-1.000000} Angle: 180.000000) 23.547800 ms
LogVerseFramework: VerseProfile: Agent.Respawn({x=384.000000,y=0.000000,z=384.000000}, Axis: {x=0.000000,y=0.000000,z=-1.000000} Angle: 180.000000) 21.828500 ms
LogVerseFramework: VerseProfile: Agent.Respawn({x=384.000000,y=0.000000,z=384.000000}, Axis: {x=0.000000,y=0.000000,z=-1.000000} Angle: 180.000000) 22.311000 ms
LogVerseFramework: VerseProfile: Agent.Respawn({x=384.000000,y=0.000000,z=384.000000}, Axis: {x=0.000000,y=0.000000,z=-1.000000} Angle: 180.000000) 23.399000 ms
LogVerseFramework: VerseProfile: Agent.Respawn({x=384.000000,y=0.000000,z=384.000000}, Axis: {x=0.000000,y=0.000000,z=-1.000000} Angle: 180.000000) 22.127800 ms
LogVerseFramework: VerseProfile: Agent.Respawn({x=384.000000,y=0.000000,z=384.000000}, Axis: {x=0.000000,y=0.000000,z=-1.000000} Angle: 180.000000) 22.588400 ms
LogVerseFramework: VerseProfile: Agent.Respawn({x=384.000000,y=0.000000,z=384.000000}, Axis: {x=0.000000,y=0.000000,z=-1.000000} Angle: 180.000000) 23.204500 ms
LogVerseFramework: VerseProfile: Agent.Respawn({x=384.000000,y=0.000000,z=384.000000}, Axis: {x=0.000000,y=0.000000,z=-1.000000} Angle: 180.000000) 22.690000 ms
LogVerseFramework: VerseProfile: Agent.Respawn({x=384.000000,y=0.000000,z=384.000000}, Axis: {x=0.000000,y=0.000000,z=-1.000000} Angle: 180.000000) 23.396000 ms
LogVerseFramework: VerseProfile: Agent.Respawn({x=384.000000,y=0.000000,z=384.000000}, Axis: {x=0.000000,y=0.000000,z=-1.000000} Angle: 180.000000) 22.580700 ms
LogVerseFramework: VerseProfile: Agent.Respawn({x=384.000000,y=0.000000,z=384.000000}, Axis: {x=0.000000,y=0.000000,z=-1.000000} Angle: 180.000000) 23.544200 ms
LogVerseFramework: VerseProfile: Agent.Respawn({x=384.000000,y=0.000000,z=384.000000}, Axis: {x=0.000000,y=0.000000,z=-1.000000} Angle: 180.000000) 22.317800 ms
LogVerseFramework: VerseProfile: Agent.Respawn({x=384.000000,y=0.000000,z=384.000000}, Axis: {x=0.000000,y=0.000000,z=-1.000000} Angle: 180.000000) 22.208200 ms
LogVerseFramework: VerseProfile: Agent.Respawn({x=384.000000,y=0.000000,z=384.000000}, Axis: {x=0.000000,y=0.000000,z=-1.000000} Angle: 180.000000) 23.002100 ms
LogVerseFramework: VerseProfile: Agent.Respawn({x=384.000000,y=0.000000,z=384.000000}, Axis: {x=0.000000,y=0.000000,z=-1.000000} Angle: 180.000000) 22.378700 ms