logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
A problem I am having

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows technical support
View previous topic :: View next topic  
Author Message
Necros



Joined: 25 Oct 2008
Posts: 7

PostPosted: Sat Oct 25, 2008 20:10    Post subject: A problem I am having Reply with quote

Now the problem isn't with NWNX2. I actually downladed NWNX because of the problem and it was suggested to me by a friend.

I was hoping maybe someone knows something about this though so I am going to post it.

I am a new server host, I just went out about a week or two weeks ago and bought a new server. It is a 32mb system with Windows Vista Home Premium with SP1 (probably the problem lol). I am running my world using the NWN Dedicated Server NWServer of course. I have 1.69 and CEP 2.1 which the mod is updated with and works fine there. I am using NWN Diamond edition as well. Lastly, since I am using Vista I am running NWNX2 and NWServer in compatibility mode with Windows XPSP2 and running them in Administraitor mode.

Now that that's out of the way. My server seems to crash frequently. Typically it happens every 6 to 8 hours though last night it crashed in just 2 hours. Vista pops up a window that says "NWServer has stopped working" and waits for me to tell it to shut down the program. This is a problem. I downloaded NWNX2 so that it would reload the mod on crash however Windows will not allow the dedicated server to shut down without me telling it to, which I don't know how to disable. The problem seems like a memory leak but I do not get any low memory error messages. Even if I could get windows to allow the program to crash so NWNX2 could reload the mod, chars who were on during the crash would lose anything they gained during their time on.

I have thought about downloading the reset plugin and having my server reset every 6 or so hours. I am not familiar with the plugins as NWNX2 and it's plugins are new to me. Also, if I was to do this I would want my server to post messages telling a server reset is comming up. I would want this to happen 1 hour before reset, 30 min before reset, 15 minutes before reset, 10 min before reset, 5 min before reset, and every minute until reset. I dont know how to set up the reset plugin though I haven't checked it, I am sure it's pretty straight forward though. I however have no idea how to set up the server messages to let people know it's getting time to get to a friendly place, save their persistant location, and get ready basically.

Before I did any of this though I wanted to hear everyone's opinion on this problem first though, in case anyone else has came across this and knows how to fix it.
Back to top
View user's profile Send private message
Necros



Joined: 25 Oct 2008
Posts: 7

PostPosted: Sat Oct 25, 2008 20:14    Post subject: Reply with quote

Oh, and I forgot about this. I do have a dual core processor in case that matters.
Back to top
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Sat Oct 25, 2008 21:37    Post subject: Re: A problem I am having Reply with quote

Necros wrote:
I am a new server host, I just went out about a week or two weeks ago and bought a new server. It is a 32mb system with Windows Vista Home Premium with SP1 (probably the problem lol).
32mb?? 32 megabytes of RAM?
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Necros



Joined: 25 Oct 2008
Posts: 7

PostPosted: Sat Oct 25, 2008 21:43    Post subject: Reply with quote

No, the OS lol. I meant 32 bit sorry for the confusion there.

I have like 3 gig of ram lol.

I did just notice something. The server uses up to 120 MB of memory after it has finally loaded. It slowly goes up too. After about 2 hours of being up it is up to around 300 MB of memory. I think I have a memory leak.
Back to top
View user's profile Send private message
Fireboar



Joined: 17 Feb 2008
Posts: 323

PostPosted: Sun Oct 26, 2008 15:16    Post subject: Reply with quote

Servers do generally use up more and more RAM as they go on, since they start storing more and more data about PCs who arrive and depart. It shouldn't be crashing on 300MB. You MIGHT have a memory leak though, I don't know.

Anyway, it would help if you said which plugins you were using.

Just a few suggestions:
- Don't use Windows Vista as a server.
- Use either Windows XP or Linux as a server.
- Don't use Windows Vista as a server.
- Try and get your operating system stripped down as much as you can afford to.
- Did I mention not using Windows Vista as a server?
Back to top
View user's profile Send private message
Necros



Joined: 25 Oct 2008
Posts: 7

PostPosted: Sun Oct 26, 2008 19:30    Post subject: Reply with quote

Today, when I woke up, I checked the server. It had been running for 9 hours and 28 minutes and the memory usage was up to around 1.5 Gig and still climbing.
Back to top
View user's profile Send private message
Fireboar



Joined: 17 Feb 2008
Posts: 323

PostPosted: Sun Oct 26, 2008 21:12    Post subject: Reply with quote

Okay, sounds like a definite memory leak. Does it happen when NWNX isn't running? Are NWNX2-Core and all your plugins up to date?
Back to top
View user's profile Send private message
Necros



Joined: 25 Oct 2008
Posts: 7

PostPosted: Sun Oct 26, 2008 21:22    Post subject: Reply with quote

It does happen when NWNX2 is running. I think the problem is actually with the mod somhow but I am not sure what is causing it. Currently I am using the Kingdom of Paramon created by Vuldrick. You can find it on the vault there. I have been talking to Vuldrick and he told me to check the weather system, but the problem doesn't seem to be there. I know he set up the database diffrently when he updated to 1.69 but I am not familiar with databases.

I think that I am going to use the reset plugin to reset the server every 6 hours or so. I am however new to NWNX and it's plugins. I do not know how to use the plugin properly because the readme file isn't very descriptive. I mean it tells me where to put the plugin and how to make it fire, however I don't know how often it fires, or how to change how often it fires. Like I said, I would like it to fire about every 6 hours. Lastly, I am needing to figure a way to have the server give warnings when it gets close to time for it to fire so that everyone will know to get to a friendly area and save their persistant location, like I described above.

I know this won't fix the leak, but it will keep my server up for the time being while I work on fixing the leak, or tracking it down to it's source. If anyone can help me with this please let me know.
Back to top
View user's profile Send private message
Fireboar



Joined: 17 Feb 2008
Posts: 323

PostPosted: Mon Oct 27, 2008 0:44    Post subject: Reply with quote

You might be setting, but not deleting, many local variables (strings, floats or locations are most probable), or maybe setting new variables constantly over time, in a very heavy manner.

Here is a useful but little-known optimization trick, and the reasoning behind it.

SetLocalInt(object, string, 0);
DeleteLocalInt(object, string);

These two are not the same!

Setting a local to its default value keeps that variable in memory, which makes it quicker to set a new value to since the memory is already allotted.

Deleting a local, on the other hand, removes the variable and frees up the memory used to store it. This is slightly worse for performance (only noticeable when you add the overhead together), but allows other variables to take up the memory freed.

Deleting locals is quite a good habit, but knowing when to simply set to 0 is also good. As a general rule of thumb, if there's something you're not going to use again, delete it. If you want to cache some information, set it once and never delete it.

One other thing: this stresses the importance of cleaning up enemies and loot that spawns. These all take up memory and degrade performance quite significantly.
Back to top
View user's profile Send private message
Necros



Joined: 25 Oct 2008
Posts: 7

PostPosted: Tue Oct 28, 2008 3:50    Post subject: Reply with quote

I haven't fixed the problem but I have slowed it down a whole lot. I turned off the weather system and apparentally it ate up a bunch of memory. Rather than going up 150 to 300kb per 3 seconds it is now going up about 80kb every 3 minutes. The mod is still not turning loose of the memory it is tieing up but this has helped out a lot. Now I can leave the server running without fear of it crashing and figure out what the problem is.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows technical support All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
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