jobro13
|
  |
| Joined: 05 Aug 2009 |
| Total Posts: 2865 |
|
|
| 01 Dec 2012 12:19 PM |
Hello.
My place can crash after it has been up a long time (like 6 hours). I dont know why, but people report it happens like 10 seconds after a new player joins - a huge lag spike is first.
I checked all my scripts for playeradded events. I came on a total of 5, thats not much, and they also don't have excessive power code to run.
Anyone knows if PlayerAdded can cause a lag spike? Or a player joining at all? |
|
|
| Report Abuse |
|
|
|
| 01 Dec 2012 12:20 PM |
| Do you have a lot of local script/bricks? |
|
|
| Report Abuse |
|
|
abaw7
|
  |
| Joined: 23 Oct 2009 |
| Total Posts: 745 |
|
|
| 01 Dec 2012 12:21 PM |
| Or do you have a while true do loop with out the wait()? |
|
|
| Report Abuse |
|
|
jobro13
|
  |
| Joined: 05 Aug 2009 |
| Total Posts: 2865 |
|
|
| 01 Dec 2012 12:22 PM |
The brick ammount rises, but I cannot say that it is "a lot". My servers start with around 7k bricks... and rising bricks is pretty hard for players, even over a long time...
Not a lot of localscripts too. Not when you join at least, the most ammount gets in after you have started playing. |
|
|
| Report Abuse |
|
|
jobro13
|
  |
| Joined: 05 Aug 2009 |
| Total Posts: 2865 |
|
|
| 01 Dec 2012 12:22 PM |
| Abaw, please, I know you want to help but I'm not a noob. |
|
|
| Report Abuse |
|
|
|
| 01 Dec 2012 12:23 PM |
| Well localscripts run off the player's computer so if there is enough localscripts it could crash people with low RAM. |
|
|
| Report Abuse |
|
|
jobro13
|
  |
| Joined: 05 Aug 2009 |
| Total Posts: 2865 |
|
|
| 01 Dec 2012 12:25 PM |
| Please read my post, the whole server crashes. |
|
|
| Report Abuse |
|
|
abaw7
|
  |
| Joined: 23 Oct 2009 |
| Total Posts: 745 |
|
|
| 01 Dec 2012 12:26 PM |
| He's talking about the place crashing, not just a player which means it must be server sided. And a while true do loop is a type of loop that never ends but with out a wait() in the loop it crashes the server. |
|
|
| Report Abuse |
|
|
jobro13
|
  |
| Joined: 05 Aug 2009 |
| Total Posts: 2865 |
|
|
| 01 Dec 2012 12:27 PM |
*facepalm*
Abaw, I know that, and if that would be in a script my server would crash after one player would have joined. |
|
|
| Report Abuse |
|
|
|
| 01 Dec 2012 12:28 PM |
| How large are the servers? It could be due to just the amount of players and the server cannot handle all the stuff for each player. |
|
|
| Report Abuse |
|
|
Monkey727
|
  |
| Joined: 12 Jan 2009 |
| Total Posts: 969 |
|
|
| 01 Dec 2012 12:29 PM |
I was about to facepalm too. :o
Hmm, What do your 5 playeradded events actually do? |
|
|
| Report Abuse |
|
|
abaw7
|
  |
| Joined: 23 Oct 2009 |
| Total Posts: 745 |
|
|
| 01 Dec 2012 12:29 PM |
So, it is crashing after a number of people joins. Any idea as to the max number of players and is this repeatable?
|
|
|
| Report Abuse |
|
|
jobro13
|
  |
| Joined: 05 Aug 2009 |
| Total Posts: 2865 |
|
|
| 01 Dec 2012 12:33 PM |
No, because it also happens when (example) one player is online and another one joins.
They don't do a lot actually, what they do doesnt really matter - they most of the time run a small for loop on a small ammount of children and manipulate the instances in there...
Maybe its because its all at the same time. |
|
|
| Report Abuse |
|
|
Monkey727
|
  |
| Joined: 12 Jan 2009 |
| Total Posts: 969 |
|
|
| 01 Dec 2012 12:37 PM |
Possibly,
I've never really come accross this before, So I cannot really help.
Perhaps try and add some waits in so the code isn't all running at the same time, Or merge the scripts together if possible. |
|
|
| Report Abuse |
|
|
jobro13
|
  |
| Joined: 05 Aug 2009 |
| Total Posts: 2865 |
|
| |
|
Monkey727
|
  |
| Joined: 12 Jan 2009 |
| Total Posts: 969 |
|
|
| 01 Dec 2012 12:44 PM |
| Alright. I hope it works, Your stranded game looks quite good. |
|
|
| Report Abuse |
|
|
jobro13
|
  |
| Joined: 05 Aug 2009 |
| Total Posts: 2865 |
|
|
| 01 Dec 2012 12:45 PM |
Thank you! I will post on here the outcome (tomorrow)
|
|
|
| Report Abuse |
|
|
|
| 01 Dec 2012 01:37 PM |
| Add a debounce. I had the same problem a couple days ago and debounce seemed to work :P |
|
|
| Report Abuse |
|
|
jobro13
|
  |
| Joined: 05 Aug 2009 |
| Total Posts: 2865 |
|
|
| 02 Dec 2012 04:59 AM |
| It's not running like 30 times, I have a "chat" in it that chats when a new player hops on, that only runs one time ;) |
|
|
| Report Abuse |
|
|