On Wed, Mar 12, 2014 at 6:14 AM, Evan Ruff <evan.r...@gmail.com> wrote:
> The 202 is the "exit code" from my process. I've attached the three major > exceptions that I've been getting. > > 1. Mystery202LogMessage - This one seems to happen ~usually on the first > run after a new deploy, but can pop up at other times. The entire doPost > method has been wrapped in a try/catch block, and nothing is ever caught > related to this exception. I'm really unclear as to what's happening. I do > know that it does make it pretty far into the process, as it updates some > datastore entries. > > 2. HeapSpaceOnLog - This happens occasionally when writing out a static > log message. It seems unlikely that my heap was > THIIIIIIIIIIIIIIIIIIIIIS99.999999999% full that the log message would push > it over the top, but hey who knows. > > 3. ApiDeadlineExceededException - I'm trying to get a cursor from the > iterator. I have a 27 second window set on all queries. Once it hits that, > it gets the cursor (this error), reloads the query and sets the iterator to > the itr of the new query. This exception is caught and logged. > > Thanks for any insight! (Oh, I'm using the Java SDK) > > Whoa, that's quite a long list! 1. Mystery202LogMessage - Google has never quite documented what the 202 error code means, so it's unclear what's going on. For now, you'll have to treat it as an unavoidable error. The best way to handle it is via task queues - requests that encounter 202 will fail with an error HTTP status code, and you can take advantage of this by configuring the task to retry automatically. If you need to, split the updates over more tasks. 2. HeapSpaceOnLog - It looks like Arrays is trying to acquire too much memory for the copy operation. Can you try batching up the log writing operations? For instance, instead of writing a new log line for each new piece of info (and forcing the underlying infrastructure to allocate memory to holding it, stamping it with the time, etc), add your logging information to a StringBuffer and then print it out occasionally. 3. ApiDeadlineExceededException - How frequently does this occur? If it occurs rarely, then I wouldn't worry about it too much. If it's more frequent than that, you may need to reduce the number of entities retrieved per iteration. How large is each entity and how many properties does it hold? 4. Google Cloud Storage HeapOnWrite & TimeoutException - It's difficult to say what exactly the issue is with Cloud Storage. I often get odd and unexpected issues from Cloud Storage as well. What I would suggest trying is not to stream data to Cloud Storage - build up a few MB of data to write to Cloud Storage, open up a connection, write the data fully, flush the connection, close it out, rinse & repeat. ----------------- -Vinny P Technology & Media Advisor Chicago, IL App Engine Code Samples: http://www.learntogoogleit.com -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscr...@googlegroups.com. To post to this group, send email to google-appengine@googlegroups.com. Visit this group at http://groups.google.com/group/google-appengine. For more options, visit https://groups.google.com/d/optout.