Hi, any workaround for this?
What does it exactly mean?
My “Server Load” isnt high, so it must be crashing for other reasons?
Server load between 40-90 when crash happends.
Hi, any workaround for this?
What does it exactly mean?
My “Server Load” isnt high, so it must be crashing for other reasons?
Server load between 40-90 when crash happends.
I’m in a similar situation.
My “Server Load” sits around a gentle 29-31 and still randomly crashes saying “Server shut down due to excessive Workshop script load”
Like what? That’s no where near 100. I’m very confused and unsure what to do because the numbers tell me it’s not an optimization issue whilst the error does. What is going on?
What kind of actions do you have running in your script ? I’ve had my game hit 150%+ average and it still never crashed.
This is interesting. I’ve done a lot of modifying and testing with one of my game modes to make sure server load peak doesn’t exceed 100 for any complex action. On top of that, average server load never was higher than 80. Yet the game still keeps crashing, seemingly out of nowhere even with just one human player in team 2.
Another thing that I found interesting is that the longer the game has been running, the higher server load peaks will go, for the exact same actions.
In general, I found it surprising that even when playing a game against 6 bots that had just 1 rule in the script to keep track of moments when the server load peak was over a certain value, the server load was still pretty high.
In my case i might have discovered something that have fixed the problem. Just until i add more than 5 players, by anyways.
1-having arrays big size. (Example: create effect stored to A1, position of effect A10, hud text to tell effect is created A100.)
Basically 1, 10 and 100 is used, but the array consists of 100 entries even though i use only 3.
100 entries with zeroes.
What i found on google is that this causes high memory usage, which i belive is not shown in the performance, which is cpu only?.
Now having this with many arrays caused me trouble.
I shortened all arrays and used linear 1,2,3,4 etc. No huge leaps.
2-if you need to move an effect or entity, dont delete it, and create a new one in a new value in array!.
Move it instead to a new vector.
Set global variable at index 5, vector.
Instead of, destroy effect 10, create effect 11.
This also saves memory.
These two things was the main cause of problems for me, i managed to fix all this and got it running fine.
I however need to clean my stuff better as i still get crashes if i go above 6+ players.
Anyways, i had crashes at 2+ players before i did this.
Hope it helps.
Still need help myself though lom
Thanks, that’s interesting. I had actually done some tests where I created arrays that had values stored in super high indices (for example index 1000) but were otherwise empty and that didn’t seem to make a difference in server load for me. Maybe I missed something. Need to test that again.
What did make quite a difference in my testing though is how many values I stored in an array. I made another series of tests where I filled up all player variables (a-z) of 12 players with vector data (111.111/222.222/333.333) up to index 15/31/49 (it crashed before I could do higher numbers :)). This had a noticable impact on server load values for me.
In any case, I always try to use the lowest free indices as well, as you suggested 
Most likely because the zeros that are used to fill up the empty slots in an array when it only gets set at a high index are just ints or maybe reals, but the vectors are objects, wich are way bigger.
Hm, thanks for the info. I guess it was a really bad idea of me then to save 3 int or float values in a vector to use up fewer index positions ><
Edit: I did another test where I set player variables a-j for all 12 players at index 10000 to value 1. This had a huge impact on the server load values. Not sure how I missed that the first time, my apologies.
im starting to understand why my game crash when i go above 3 players. each player creates and destroy about 2 effects every second and in some cases creates, destroys and plays about 20 (each) effects in under half of a second storing and removing all effects IDs and positions in arrays. oopsie 
bad ideas that wont work:
edit: why did i comment this? i think i was replying to a different topic
I also belive my game crashes cause im using like 40 “Distance Between event player”
I tried to figure out if i could fix this by using a Global instead, and use “Players within radius TEAM1”
I want to know whats worse to use, a distance between or players within radius.
And, for effects that are created ONCE, visible to all players, does it matter if its global or each player since it doesnt have a condition.
Starting to wounder if i just should change some global rules to each player, and vice versa, for certain rules.
I have a shop, that creates 25 effects, Global, but inside the effects i set it to Visible Only TEAM2.
Having this just set to “Each player Team2” instead of global, would it really impact any differently, since half of these effects are triggered by a variable later on to have them spawn.
That’s weird. My PVE mode makes the server load surpass 100%, the highest I’ve gone is 103% and it never crashed. I even average over 60% most of the time (depends on the number of players).
I have a PVE mode that literally averages at 180% and peaks at 230% regularly without ever crashing. I seriously don’t understand how the server doesn’t die from it.
How do I see the Server Load?
It’s not a “setting”, but rather a value that text ids can display.
The simplest solution is to create some HUD UI where the header is equal to the “Server Load” value.
Posting my experience here on what has caused server crashes/problems for me:
| Type of action: | How many times it can be used: |
|---|---|
| Abort | 18600+ |
| Skip (1) | 6655 |
| Small Message to event player (player variable A) | 3996 |
| Set player variable at INDEX to player variable | 2855 |
| Small Message to event player (“Hello”) | 1817 |
| Set player variable to value in array (player variable) | 1817 |
| Set global variable at INDEX to value in array (global variable) | 1817 |
| Set player variable at INDEX to value in array (player variable) | 1537 |
| Skip If: Skip 1 if value in array (player variable) > 0 | 949 (14 per rule) |
| Skip (1 + 2 * compare if player variable A >0) | 799 |
| Set player variable to value in array (player variable) + value in array (player variable) | 799 |
| Set player variable to round value in array (player variable) * 0.1 down to integer + modulo 10 of value in array (player variable) | 540 |
| A very complex string that I’m actually using in one of my game modes | 30 |
).
).here is random fact: i dont think the server load and these stuff can go above 255, in my game mode it always stops there (and doesnt immediatly crush or do something special)
I think the main point here is that server load and excessive script are two different errors.
Thank you. I think reading this helped! I replaced chase variable elements with work-arounds and it doesn’t crash anymore.
An tip: Add an hud text with this: Custom String("{0}%", (Server Load / 255) * 100) will give how many power the server is processing the rules. If this value gives you 100% almost of time or greater than this, you should use workshop inspector to fix these rules.
Also another things can cause server crash such as: