NetTalk Central

Author Topic: NTWS 6.13 Index Out of Range error every hour???  (Read 3111 times)

ccordes

  • Sr. Member
  • ****
  • Posts: 384
    • View Profile
    • Email
NTWS 6.13 Index Out of Range error every hour???
« 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)
-------------
« Last Edit: January 04, 2012, 08:33:56 AM by ccordes »
Real programmers use copy con newapp.exe

ccordes

  • Sr. Member
  • ****
  • Posts: 384
    • View Profile
    • Email
Re: NTWS 6.13 Index Out of Range error every hour???
« Reply #1 on: January 04, 2012, 10:31:53 AM »
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
 
Real programmers use copy con newapp.exe

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: NTWS 6.13 Index Out of Range error every hour???
« Reply #2 on: January 05, 2012, 02:58:24 AM »
thanks Chris!
Good Catch!