Hi Matija,

   I'm not using java on app engine, but I can offer the following

- the ms count on the two variations is hugely different - one is less
than a second, and one is over 40s - if commenting out those lines
causes such a difference, then I don't think it is inside this
function that the problem exists.
- I can't see where you define the 'sequence' variable, or guess how
you use either the 'sequence' array or the 'ai' array, but my money
would be on the processing of those arrays - after the call to the
function is complete. e.g. commenting out those lines means those
arrays have different content, which affects processing elsewhere.
- guessing even more, I would say that 203 is not the correct error
code, and that perhaps GAE exited from too much recursion, stack
overflow, infinite loop or something like that. That should probably
be a 500 range error code, as a 2xx range code indicates success,
which does not seem right based on the error message.
- My understanding is that to deal with memory leaks, GAE will kill a
server that uses too much memory and start a new one if necessary to
handle subsequent requests. This also makes me wonder about too much
recursion or stack overflow etc.
- it is strange that the request took 40s and used no cpu - this also
makes me wonder about too much recursion - i.e. GAE never gets the
opportunity to measure CPU before your process crashes.

Anyway - some log messages in your processing would go a long way to
identifying the real problem (assuming you are getting log message
output before this crashes).

Cheers,

Colin

On Oct 26, 4:42 pm, Matija <matija.jerko...@gmail.com> wrote:
> I have a rather complex code for traveling salesman problem that is
> trowing this error. I have located lines that produce this error and
> it is pretty strange.
>
> int[] sequence = new int[dimension];
>
> private void reverse(int i, int j, final int ai[]) {
>         int i1 = j - i;
>         if (i1 < 0)
>             i1 += dimension;
>         i1 = i1 / 2 + 1;
>         int l, k;
>         for (l = 0; l < i1; l++) {
>             k = sequence[i];
>             sequence[i] = sequence[j];
>             ai[sequence[i]] = i;
> //            sequence[j] = k;
> //            ai[sequence[j]] = j;
>             if (++i >= dimension)
>                 i -= dimension;
>             if (--j < 0)
>                 j += dimension;
>         }
>     }
>
> If I leave commented this two lines task request finishes with this
> performance parameters (ms=842 cpu_ms=97 api_cpu_ms=0).
>
> If I uncomment this two lines I get:
>
> ms=40087 cpu_ms=0 api_cpu_ms=0 exit_code=203 throttle_code=1
>
> A serious problem was encountered with the process that handled this
> request, causing it to exit. This is likely to cause a new process to
> be used for the next request to your application. If you see this
> message frequently, you should contact the App Engine team. (Error
> code 203)
>
> Why ?!

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to