View previous topic :: View next topic |
Author |
Message |
Flutterby
Joined: 01 May 2012 Posts: 11
|
Posted: Thu Aug 16, 2012 13:15 Post subject: Module crashes with nwnx_funcs |
|
|
Hey there,
The nwn1 pw I'm a developer for has recently made the switch to nwnx. We don't use it heavily (yet), just to switch around some feats and abilities on character creation. Since the switch, however, the module crashes significantly more often than before, amd severely enough that the watchdog process doesn't restart it.
Our server runs windows xp 32 bit. Any idea what might cause this?
Thanks,
Flutterby (www.worldofcaenyr.com)
Last edited by Flutterby on Mon Aug 20, 2012 20:49; edited 1 time in total |
|
Back to top |
|
|
Brutus
Joined: 16 Aug 2012 Posts: 1
|
Posted: Thu Aug 16, 2012 21:05 Post subject: |
|
|
Another one of the WoC staff chiming in. I think I may have found the issue, and just want to confirm.
I was browsing your forums, and noticed a link to a page here, which states that the "UpdateIntervalProcess'" should not be less than 30 (ours was set to 5). When I get home, I will change to 60. Is that a hard and fast rule there, and would possibly be the issue behind our sudden instability?
Thanks, Brutus |
|
Back to top |
|
|
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Fri Aug 17, 2012 13:05 Post subject: |
|
|
Yes - that may be the cause.
nwserver is single threaded.
When a long script is running, it essentially freezes the gui of the server.
nwnx has a built in process monitor, that tries to detect crashes, and recover.
However, it can find false positives if your settings are too low.
I set mine to be
10 Second Interval with 5 Retries
Essentially - will only kill a server, if its been locked up for 50 seconds or more.
You can in theory get the thresholds lower, and stable, if you have efficient scripts.
What locks the GUI is most likely scripts that take a long time to finish.
Best thing to do, is to make clever use of ExecuteScript, as well as DelayCommand
These can break up long winded Loop statements to stretch the work load over a longer duration, but free-ing up the main server thread, without locking the GUI up.
TMI Plugin- although good for extending the length of loops and scripts you can run, can also be a dangerous tool.
The TMI Warning although annoying to look at, does save your server from scripts that would lock the GUI.
Many advanced nwnx users tend to increase the TMI Limit, to allow their complex scripts to run, but keeping it at default value, can protect your server from long never ending scripts. |
|
Back to top |
|
|
Flutterby
Joined: 01 May 2012 Posts: 11
|
Posted: Mon Aug 20, 2012 20:49 Post subject: |
|
|
It turns out to be a nwnx_funcs problem. I've hooked an onexit script, and it looks like sometimes, a player entering the module triggers that onexit script, making the module crash. I've now unhooked the script and it seems to be stable.
The odd thing is, I'm not able to reproduce this on my virtual machine. The main difference is that my VM runs XP Professional while the server runs XP Home. On the server, the onexit script is not triggered by players leaving, only by some players entering who thereby crash the mod.
Any smart ideas, anyone? |
|
Back to top |
|
|
Flutterby
Joined: 01 May 2012 Posts: 11
|
Posted: Mon Aug 20, 2012 20:49 Post subject: |
|
|
By the way, I doubt that this post is in the forum where it belongs. If someone could please move it, I'd be very happy |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|