Gah! I'm an idiot, I had a Thread.sleep in there from some earlier
testing. Sorry for the false alarm.

- Philip

On Jan 10, 1:03 pm, Philip Tucker <[email protected]> wrote:
> Sorry for the late response, somehow I missed your reply.
>
> No, just using the default GAE stuff with annotations on the persisted
> objects.
>
> Code is underhttp://code.google.com/p/appengine-closure-chat/, app ID
> isptucker.
>
> Code:
>
> Persisted 
> objects:http://code.google.com/p/appengine-closure-chat/source/browse/trunk/s...http://code.google.com/p/appengine-closure-chat/source/browse/trunk/s...
>
> See selectMessages and persistMessage 
> here:http://code.google.com/p/appengine-closure-chat/source/browse/trunk/s...
>
> All other classes 
> underhttp://code.google.com/p/appengine-closure-chat/source/browse/trunk/src.
>
> Thanks for taking a look,
> Philip
>
> On Dec 23 2009, 5:46 pm, "Jason (Google)" <[email protected]> wrote:
>
>
>
> > This is definitely odd. Are you using any frameworks or libraries aside from
> > the App Engine-supplied JDO/JPA implementation? I assume you're using a
> > query to fetch the most recent n messages sorted by a date -- can you reply
> > with your app ID, a snippet of your fetching and persisting code, and any
> > extra information that might be relevant?
>
> > Thanks,
> > - Jason
>
> > On Mon, Dec 21, 2009 at 11:51 PM, Philip Tucker <[email protected]> wrote:
> > > I've got a very simple application with very little data in it. It's a
> > > simple chat app with 2 tables, Room and Message. Each server requests
> > > stores a message and returns the most recent n messages, where n is on
> > > the order of 1-5.
>
> > > Each request is taking 2-3 seconds. I'm doing 3 datastore
> > > transactions; look up room by ID, insert message, look up most recent
> > > n message by room ID. I know there's some optimization I could do to
> > > skip the room lookup, but this is still way slower than I would
> > > expect.
>
> > > I've also been getting a few of these errors, maybe 1/20 requests or
> > > so:
>
> > > com.honkentuber.Servlet doIt: error on ChatServlet
> > > com.google.appengine.api.datastore.DatastoreTimeoutException: Unknown
> > >        at
> > > com.google.appengine.api.datastore.DatastoreApiHelper.translateError
> > > (DatastoreApiHelper.java:42)
> > >        at
> > > com.google.appengine.api.datastore.DatastoreApiHelper.makeSyncCall
> > > (DatastoreApiHelper.java:60)
> > >        at com.google.appengine.api.datastore.DatastoreServiceImpl$2.run
> > > (DatastoreServiceImpl.java:173)
> > >        at
> > > com.google.appengine.api.datastore.TransactionRunner.runInTransaction
> > > (TransactionRunner.java:30)
> > >        at com.google.appengine.api.datastore.DatastoreServiceImpl.put
> > > (DatastoreServiceImpl.java:161)
> > >        at com.google.appengine.api.datastore.DatastoreServiceImpl.put
> > > (DatastoreServiceImpl.java:141)
> > >        at com.google.appengine.api.datastore.DatastoreServiceImpl.put
> > > (DatastoreServiceImpl.java:133)
> > >        at
>
> > > org.datanucleus.store.appengine.RuntimeExceptionWrappingDatastoreService.pu
> > >  t
> > > (RuntimeExceptionWrappingDatastoreService.java:93)
> > >        at org.datanucleus.store.appengine.DatastorePersistenceHandler.put
> > > (DatastorePersistenceHandler.java:165)
> > >        at org.datanucleus.store.appengine.DatastorePersistenceHandler.put
> > > (DatastorePersistenceHandler.java:112)
> > >        at
> > > org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObjects
> > > (DatastorePersistenceHandler.java:239)
> > >        at
> > > org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObject
> > > (DatastorePersistenceHandler.java:225)
> > >        at org.datanucleus.state.JDOStateManagerImpl.internalMakePersistent
> > > (JDOStateManagerImpl.java:3185)
> > >        at org.datanucleus.state.JDOStateManagerImpl.makePersistent
> > > (JDOStateManagerImpl.java:3161)
> > >        at org.datanucleus.ObjectManagerImpl.persistObjectInternal
> > > (ObjectManagerImpl.java:1298)
> > >        at org.datanucleus.ObjectManagerImpl.persistObject
> > > (ObjectManagerImpl.java:1175)
> > >        at org.datanucleus.jdo.JDOPersistenceManager.jdoMakePersistent
> > > (JDOPersistenceManager.java:669)
> > >        at org.datanucleus.jdo.JDOPersistenceManager.makePersistent
> > > (JDOPersistenceManager.java:694)
> > >        at 
> > > com.honkentuber.chat.ChatServlet.persistMessage(ChatServlet.java:
> > > 83)
> > >        at 
> > > com.honkentuber.chat.ChatServlet.newJspResponse(ChatServlet.java:
> > > 21)
> > >        at com.honkentuber.Servlet.doIt(Servlet.java:42)
> > >        at com.honkentuber.Servlet.doPost(Servlet.java:29)
> > >        at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
> > >        at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
> > >        at
> > > org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
> > > 487)
> > >        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> > > (ServletHandler.java:1093)
> > >        at
> > > com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter
> > > (ParseBlobUploadFilter.java:97)
> > >        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> > > (ServletHandler.java:1084)
> > >        at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter
> > > (SaveSessionFilter.java:35)
> > >        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> > > (ServletHandler.java:1084)
> > >        at
> > > com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter
> > > (TransactionCleanupFilter.java:43)
> > >        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> > > (ServletHandler.java:1084)
> > >        at org.mortbay.jetty.servlet.ServletHandler.handle
> > > (ServletHandler.java:360)
> > >        at org.mortbay.jetty.security.SecurityHandler.handle
> > > (SecurityHandler.java:216)
> > >        at org.mortbay.jetty.servlet.SessionHandler.handle
> > > (SessionHandler.java:181)
> > >        at org.mortbay.jetty.handler.ContextHandler.handle
> > > (ContextHandler.java:712)
> > >        at 
> > > org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
> > > 405)
> > >        at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle
> > > (AppVersionHandlerMap.java:238)
> > >        at org.mortbay.jetty.handler.HandlerWrapper.handle
> > > (HandlerWrapper.java:139)
> > >        at org.mortbay.jetty.Server.handle(Server.java:313)
> > >        at
> > > org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
> > > 506)
> > >        at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete
> > > (HttpConnection.java:830)
> > >        at
> > > com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable
> > > (RpcRequestParser.java:76)
> > >        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
> > >        at
>
> > > com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceReques
> > >  t
> > > (JettyServletEngineAdapter.java:135)
> > >        at com.google.apphosting.runtime.JavaRuntime.handleRequest
> > > (JavaRuntime.java:235)
> > >        at com.google.apphosting.base.RuntimePb$EvaluationRuntime
> > > $6.handleBlockingRequest(RuntimePb.java:5235)
> > >        at com.google.apphosting.base.RuntimePb$EvaluationRuntime
> > > $6.handleBlockingRequest(RuntimePb.java:5233)
> > >        at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest
> > > (BlockingApplicationHandler.java:24)
> > >        at 
> > > com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:
> > > 363)
> > >        at com.google.net.rpc.impl.Server$2.run(Server.java:838)
> > >        at com.google.tracing.LocalTraceSpanRunnable.run
> > > (LocalTraceSpanRunnable.java:56)
> > >        at com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan
> > > (LocalTraceSpanBuilder.java:536)
> > >        at com.google.net.rpc.impl.Server.startRpc(Server.java:793)
> > >        at com.google.net.rpc.impl.Server.processRequest(Server.java:368)
> > >        at com.google.net.rpc.impl.ServerConnection.messageReceived
> > > (ServerConnection.java:448)
> > >        at com.google.net.rpc.impl.RpcConnection.parseMessages
> > > (RpcConnection.java:319)
> > >        at com.google.net.rpc.impl.RpcConnection.dataReceived
> > > (RpcConnection.java:290)
> > >        at com.google.net.async.Connection.handleReadEvent(Connection.java:
> > > 466)
> > >        at com.google.net.async.EventDispatcher.processNetworkEvents
> > > (EventDispatcher.java:759)
> > >        at com.google.net.async.EventDispatcher.internalLoop
> > > (EventDispatcher.java:205)
> > >        at com.google.net.async.EventDispatcher.loop(EventDispatcher.java:
> > > 101)
> > >        at com.google.net.rpc.RpcService.runUntilServerShutdown
> > > (RpcService.java:251)
> > >        at com.google.apphosting.runtime.JavaRuntime$RpcRunnable.run
> > > (JavaRuntime.java:394)
> > >        at java.lang.Thread.run(Unknown Source)
>
> > > --
>
> > > You received this message because you are subscribed to the Google Groups
> > > "Google App Engine" group.
> > > To post to this group, send email to [email protected].
> > > To unsubscribe from this group, send email to
> > > [email protected]<google-appengine%2Bunsubscrib
> > >  [email protected]>
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/google-appengine?hl=en.
-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.


Reply via email to