NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: ccordes on January 04, 2012, 08:27:16 AM
-
I'm having a very strange situation here and I am wondering if anyone else is seeing it or can give me a clue where to look.
I have just installed 6.13 and recompiled my 5.44 app. Testing went beautifully. BUT ...
Now every hour if anyone does anything in the first minute of the hour, the server falls over with an Index out of range error.
Is there something new in 6.13 that might be causing this? or is no longer compatible with my code?
To test this, I have been resetting the clock on my machine to 10:59:30 and waiting 30 seconds. If just refresh the page or even just drop down a menu selection (not making a menu selection), it crashes.
This is happening on 4 instances of this app on 2 different machines. They all go out within a few seconds of each other.
I have nothing in my embeds that tests the time of day.
??? ??? ??? ???
Chris
---- Edit ----
I am not using the new server performance control
nor any timers on browses, etc. They wouldn't be limited to the top of the hour anyway)
-------------
-
Answering my own questions...
Bruce,
Here's a fix for you. Even though I'm not using the performance control template, the performance is still being calculated - That's fine
In NetWebServer._PerfEndThread you have this line -
self.PerformanceLoad.RequestsPerMinute[(clock()%360000)/6000,clock()/360000,day(today()),month(today())] += 1
That causes the error -
:( Every hour, for 1 minute, clock()%360000)/6000 = 0
:( Everyday, for 1 hour at midnight, clock()/360000 = 0
This should fix it -
self.PerformanceLoad.RequestsPerMinute[(int(clock()%360000)/6000)+1,int(clock()/360000)+1,day(today()),month(today())] += 1
Now I'm going to try the performance control thingy.
Chris
-
thanks Chris!
Good Catch!