Hey Vinnie,

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)

E


On Wednesday, March 12, 2014 3:48:35 AM UTC-4, Vinny P wrote:
>
> When you say you're getting a 202 error, is that a HTTP status code or the 
> App Engine internal error code that you're receiving? 
>
> Can you also post the stack trace and any exception message connected with 
> the ApiDeadlineException?
>
>   
> -----------------
> -Vinny P
> Technology & Media Advisor
> Chicago, IL
>
> App Engine Code Samples: http://www.learntogoogleit.com
>   
>  
>
>
> On Tue, Mar 11, 2014 at 9:14 PM, Evan Ruff <[email protected]<javascript:>
> > wrote:
>
>> I've been working on a Task that exports a bunch of datastore entries out 
>> to GCS and am getting some wacky behavior. Sometimes, the thing fails in 
>> <30 seconds with a 202 error in the log that I can't catch in the code. 
>> Sometimes, I get an ApiDeadlineException when trying to get the cursor from 
>> my iterator after 30 seconds. Other times, I'll get a Java heap space error 
>> after three or four cursor pulls. There is nothing in my logs that is out 
>> of the ordinary and I'm not keeping a reference to anything anywhere.
>>
>> What is causing this completely unpredictable behavior? Is something 
>> going on with Datastore?
>>
>  

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/d/optout.
2014-03-11 17:59:41.417 /twitter_csv 200 329815ms 0kb AppEngine-Google; 
(+http://code.google.com/appengine) module=default version=connect
0.1.0.2 - - [11/Mar/2014:14:59:41 -0700] "POST /twitter_csv HTTP/1.1" 200 0 
"http://connect-dot-fivexfiveapp.appspot.com/twitter_csv"; "AppEngine-Google; 
(+http://code.google.com/appengine)" "connect-dot-fivexfiveapp.appspot.com" 
ms=329815 cpu_ms=241982 queue_name=bigquery-export 
task_name=10561343934953881018 app_engine_release=1.9.0 
instance=00c61b117ce087933af167f917263f9554bd28
I 2014-03-11 17:54:12.412
com.fivexfive.social.service.twitter.ExportTweetToCSVTask doPost: Starting 
ExportTweetToCSVTask for 1394574300000
I 2014-03-11 17:54:13.994
com.fivexfive.social.service.twitter.ExportTweetToCSVTask 
exportAndImportBigQuery: Creating Tweet Export File for Tue, Mar 11, 2014 @ 
9:45PM
E 2014-03-11 17:59:37.906
com.fivexfive.social.service.twitter.ExportTweetToCSVTask doPost: Error 
exporting tweets.
com.google.apphosting.api.ApiProxy$ApiDeadlineExceededException: The API call 
datastore_v3.RunQuery() took too long to respond and was cancelled.
        at 
com.google.apphosting.runtime.ApiProxyImpl$3.createDeadlineException(ApiProxyImpl.java:321)
        at 
com.google.appengine.tools.development.TimedFuture.get(TimedFuture.java:45)
        at 
com.google.common.util.concurrent.ForwardingFuture.get(ForwardingFuture.java:63)
        at 
com.google.appengine.api.utils.FutureWrapper.get(FutureWrapper.java:86)
        at 
com.google.appengine.api.utils.FutureWrapper.get(FutureWrapper.java:86)
        at 
com.google.appengine.api.datastore.FutureHelper.getInternal(FutureHelper.java:71)
        at 
com.google.appengine.api.datastore.FutureHelper.quietGet(FutureHelper.java:32)
        at 
com.google.appengine.api.datastore.QueryResultsSourceImpl.peekQueryResultAndIfFirstRecordIndexList(QueryResultsSourceImpl.java:162)
        at 
com.google.appengine.api.datastore.QueryResultsSourceImpl.loadMoreEntities(QueryResultsSourceImpl.java:104)
        at 
com.google.appengine.api.datastore.QueryResultIteratorImpl.ensureInitialized(QueryResultIteratorImpl.java:130)
        at 
com.google.appengine.api.datastore.QueryResultIteratorImpl.getCursor(QueryResultIteratorImpl.java:83)
        at 
com.googlecode.objectify.impl.ChunkingIterator.getCursor(ChunkingIterator.java:114)
        at 
com.fivexfive.social.service.twitter.ExportTweetToCSVTask.exportAndImportBigQuery(ExportTweetToCSVTask.java:234)
        at 
com.fivexfive.social.service.twitter.ExportTweetToCSVTask.doPost(ExportTweetToCSVTask.java:141)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at 
com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263)
        at 
com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178)
        at 
com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91)
        at 
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62)
        at 
com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118)
        at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113)
        at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
        at 
com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:125)
        at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
        at 
com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:35)
        at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
        at 
com.google.apphosting.utils.servlet.JdbcMySqlConnectionCleanupFilter.doFilter(JdbcMySqlConnectionCleanupFilter.java:60)
        at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
        at 
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
        at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
        at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
        at 
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
        at 
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
        at 
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
        at 
com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:266)
        at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:326)
        at 
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
        at 
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
        at 
com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
        at 
com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:146)
        at 
com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run(JavaRuntime.java:446)
        at 
com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:437)
        at 
com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:444)
        at 
com.google.tracing.CurrentContext.runInContext(CurrentContext.java:188)
        at 
com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:308)
        at 
com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:300)
        at 
com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:441)
        at 
com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run(ThreadGroupPool.java:251)
        at java.lang.Thread.run(Thread.java:724)
2014-03-11 22:05:39.936 /twitter_csv 500 89480ms 0kb AppEngine-Google; 
(+http://code.google.com/appengine) module=default version=connect
0.1.0.2 - - [11/Mar/2014:19:05:39 -0700] "POST /twitter_csv HTTP/1.1" 500 0 
"http://connect-dot-fivexfiveapp.appspot.com/twitter_csv"; "AppEngine-Google; 
(+http://code.google.com/appengine)" "connect-dot-fivexfiveapp.appspot.com" 
ms=89481 cpu_ms=62204 queue_name=bigquery-export task_name=4042269714830951031 
exit_code=104 app_engine_release=1.9.0 
instance=00c61b117c181633083703b6d51ddfe30c3dae5a
I 2014-03-11 22:04:10.460
com.fivexfive.social.service.twitter.ExportTweetToCSVTask doPost: Starting 
ExportTweetToCSVTask for 1394589300000
I 2014-03-11 22:04:10.826
com.fivexfive.social.service.twitter.ExportTweetToCSVTask 
exportAndImportBigQuery: Creating Tweet Export File for Wed, Mar 12, 2014 @ 
1:55AM
I 2014-03-11 22:04:38.534
com.fivexfive.social.service.twitter.ExportTweetToCSVTask 
exportAndImportBigQuery: Getting new iterator for query,
I 2014-03-11 22:05:06.635
com.fivexfive.social.service.twitter.ExportTweetToCSVTask 
exportAndImportBigQuery: Getting new iterator for query,
I 2014-03-11 22:05:32.825
com.fivexfive.social.service.twitter.ExportTweetToCSVTask 
exportAndImportBigQuery: Getting new iterator for query,
W 2014-03-11 22:05:38.915
Error for /twitter_csv
java.lang.OutOfMemoryError: Java heap space
        at java.util.Arrays.copyOf(Arrays.java:2271)
        at sun.misc.Resource.getBytes(Resource.java:117)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:444)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:427)
        at 
com.google.apphosting.runtime.security.RuntimeClassLoader.loadFilteredClass(RuntimeClassLoader.java:238)
        at 
com.google.apphosting.runtime.security.RuntimeClassLoader.loadPrivilegedClass(RuntimeClassLoader.java:202)
        at 
com.google.apphosting.runtime.security.RuntimeClassLoader.loadClass(RuntimeClassLoader.java:156)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:360)
        at 
com.google.apphosting.runtime.AppLogsWriter.doFlush(AppLogsWriter.java:229)
        at 
com.google.apphosting.runtime.AppLogsWriter.waitForCurrentFlushAndStartNewFlush(AppLogsWriter.java:189)
        at 
com.google.apphosting.runtime.AppLogsWriter.addLogRecordAndMaybeFlush(AppLogsWriter.java:178)
        at 
com.google.apphosting.runtime.ApiProxyImpl$EnvironmentImpl.addLogRecord(ApiProxyImpl.java:805)
        at com.google.apphosting.runtime.ApiProxyImpl.log(ApiProxyImpl.java:519)
        at com.google.apphosting.runtime.ApiProxyImpl.log(ApiProxyImpl.java:64)
        at com.google.apphosting.api.ApiProxy.log(ApiProxy.java:197)
        at 
com.google.apphosting.runtime.security.shared.intercept.java.util.logging.DefaultHandler.publish(DefaultHandler.java:48)
        at java.util.logging.Logger.log(Logger.java:619)
        at java.util.logging.Logger.doLog(Logger.java:640)
        at java.util.logging.Logger.log(Logger.java:663)
        at java.util.logging.Logger.info(Logger.java:1181)
        at 
com.fivexfive.social.service.twitter.ExportTweetToCSVTask.exportAndImportBigQuery(ExportTweetToCSVTask.java:245)
        at 
com.fivexfive.social.service.twitter.ExportTweetToCSVTask.doPost(ExportTweetToCSVTask.java:151)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at 
com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263)
        at 
com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178)
        at 
com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91)
C 2014-03-11 22:05:38.923
Uncaught exception from servlet
java.lang.OutOfMemoryError: Java heap space
        at java.util.Arrays.copyOf(Arrays.java:2271)
        at sun.misc.Resource.getBytes(Resource.java:117)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:444)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:427)
        at 
com.google.apphosting.runtime.security.RuntimeClassLoader.loadFilteredClass(RuntimeClassLoader.java:238)
        at 
com.google.apphosting.runtime.security.RuntimeClassLoader.loadPrivilegedClass(RuntimeClassLoader.java:202)
        at 
com.google.apphosting.runtime.security.RuntimeClassLoader.loadClass(RuntimeClassLoader.java:156)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:360)
        at 
com.google.apphosting.runtime.AppLogsWriter.doFlush(AppLogsWriter.java:229)
        at 
com.google.apphosting.runtime.AppLogsWriter.waitForCurrentFlushAndStartNewFlush(AppLogsWriter.java:189)
        at 
com.google.apphosting.runtime.AppLogsWriter.addLogRecordAndMaybeFlush(AppLogsWriter.java:178)
        at 
com.google.apphosting.runtime.ApiProxyImpl$EnvironmentImpl.addLogRecord(ApiProxyImpl.java:805)
        at com.google.apphosting.runtime.ApiProxyImpl.log(ApiProxyImpl.java:519)
        at com.google.apphosting.runtime.ApiProxyImpl.log(ApiProxyImpl.java:64)
        at com.google.apphosting.api.ApiProxy.log(ApiProxy.java:197)
        at 
com.google.apphosting.runtime.security.shared.intercept.java.util.logging.DefaultHandler.publish(DefaultHandler.java:48)
        at java.util.logging.Logger.log(Logger.java:619)
        at java.util.logging.Logger.doLog(Logger.java:640)
        at java.util.logging.Logger.log(Logger.java:663)
        at java.util.logging.Logger.info(Logger.java:1181)
        at 
com.fivexfive.social.service.twitter.ExportTweetToCSVTask.exportAndImportBigQuery(ExportTweetToCSVTask.java:245)
        at 
com.fivexfive.social.service.twitter.ExportTweetToCSVTask.doPost(ExportTweetToCSVTask.java:151)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at 
com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263)
        at 
com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178)
        at 
com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91)
W 2014-03-11 22:05:39.936
A 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 may be 
throwing exceptions during the initialization of your application. (Error code 
104)
2014-03-11 19:09:42.498 /twitter_csv 500 73354ms 0kb AppEngine-Google; 
(+http://code.google.com/appengine) module=default version=connect
0.1.0.2 - - [11/Mar/2014:16:09:42 -0700] "POST /twitter_csv HTTP/1.1" 500 0 
"http://connect-dot-fivexfiveapp.appspot.com/twitter_csv"; "AppEngine-Google; 
(+http://code.google.com/appengine)" "connect-dot-fivexfiveapp.appspot.com" 
ms=73355 cpu_ms=0 queue_name=bigquery-export task_name=8084788327269285550 
exit_code=202 app_engine_release=1.9.0 
instance=00c61b117c5e9e55b0f94b0e9aa70e8448bfa7eb
W 2014-03-11 19:09:42.498
A 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. (Error code 202)

Reply via email to