SphereServer BugTracker - SphereServer
View Issue Details
0002279SphereServerexecutable - windows buildpublic18-02-14 17:2823-02-14 13:27
Coruja 
XuN 
normalmajoralways
resolvedfixed 
 
 
Automated (specify build number)
None
None
0002279: [Major bug] Heavy load after server startup
After server startup, it will call @SkillChange, @LevelChange, etc on all chars when loading it on save files, this causes a heavy load on sphere, and ultra heavy load if someone uses these triggers to sync skills/status on SQL database (me :D)

[EVENTS e_player]
ON=@SkillChange
SQLSyncSkill char,skill,value

I really doesnt make a deep tested it yet (I'm not at home) but every time my server startup, the console get spammed with millions of SQL errors. The problem is not the SQL error because I'm using the test server on my PC, not on the remote live server which has the SQL server, so SQL functions will never work on the test server. But these errors means that sphere is calling the trigger @SkillChange for every skill on every char

maybe thats a wrong usage for this trigger, just imagine 57 skills on chars and 3000 chars/accounts to load on server startup. This will cause a huge load calling @SkillChange for 171.000 times (57 x 3000)

I think its a wrong call for the trigger @SkillChange, because the server is not really changing any skill, its just loading the skill from the save file -without change the value-

I dont know exactly all triggers causing this, but the most notable on my server startup is @SkillChange and @LevelChange
No tags attached.
Issue History
18-02-14 17:28CorujaNew Issue
18-02-14 19:20XuNNote Added: 0001965
18-02-14 19:47XuNNote Edited: 0001965bug_revision_view_page.php?bugnote_id=0001965#r571
18-02-14 19:56XuNNote Edited: 0001965bug_revision_view_page.php?bugnote_id=0001965#r572
19-02-14 15:36XuNNote Added: 0001966
19-02-14 17:17CorujaNote Added: 0001967
19-02-14 17:30CorujaNote Added: 0001968
23-02-14 10:32XuNAssigned To => XuN
23-02-14 10:32XuNStatusnew => acknowledged
23-02-14 13:27XuNNote Added: 0001969
23-02-14 13:27XuNStatusacknowledged => resolved
23-02-14 13:27XuNResolutionopen => fixed

Notes
(0001965)
XuN   
18-02-14 19:20   
(edited on: 18-02-14 19:56)
i'll look on creating a exception so these triggers are not called on startup.


Edit: I cannot reproduce it.

Edit2: It seems to happen the first time this build is being loaded, do a worldsave and reload... it should work fine then.

(0001966)
XuN   
19-02-14 15:36   
Any news? happened again? it was just the first time...?
(0001967)
Coruja   
19-02-14 17:17   
the problem still there, I downloaded exactly all same savefiles from the live server (which already have everything created and running fine)

but even using this save file the test server will got a heavy load on startup. I noticed this problem only on @SkillChange and @ExpLevelChange (strangely @ExpChange is fine). Others triggers are fine too
(0001968)
Coruja   
19-02-14 17:30   
I'm using this event on all players, with exactly these same triggers. All these triggers are using SQL functions to sync data on SQL. Only @SkillChange and @ExpLevelChange are causing heavy load on server startup


[EVENTS e_sql_sync]
ON=@Login
...

ON=@Logout
...

ON=@ItemEquip
...

ON=@ItemUnequip
...

ON=@SkillChange //heavy load
...

ON=@Kill
...

ON=@Death
...

ON=@MurderDecay
...

ON=@FameChange
...

ON=@KarmaChange
...

ON=@ExpChange
...

ON=@ExpLevelChange //heavy load
...
(0001969)
XuN   
23-02-14 13:27   
Added