[appengine-java] Re: CPU Occasionally Spikes when HttpSession is Created

2009-09-16 Thread Traveler1980

Sono one else has noticed anything like this???

Regards,
Jamie

On Sep 15, 9:13 am, Traveler1980 jshar...@gmail.com wrote:
 Hi Everyone,

 I've noticed that CPU occasionally spikes when creating an
 HTTPSession.  It only seems to happen when it's been awhile since an
 app has been accessed or when an app is initially deployed.

 For example, I created a simple test servlet that creates a session
 and and writes a response:

 protected void doGet(HttpServletRequest req, HttpServletResponse resp)
 throws ServletException, IOException {
    req.getSession();
    PrintWriter writer = resp.getWriter();
    writer.write(Test Complete);
    writer.flush();
    writer.close();

 }

 When I deploy the app and invoke the servlet for the first time, I see
 the following in the admin console:
 09-15 05:57AM 29.487 /test 200 7184ms 4381cpu_ms 65api_cpu_ms 0kb
 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6) Gecko/
 2009011913 Firefox/3.0.6 (.NET C

 Note the high CPU and long response time.

 Subsequent session creations are much faster.  If I delete my cookies
 and re-invoke the servlet, CPU is approx. 70-80ms.

 Now, if I leave the app for awhile (let's say an hour) and hit the
 servlet again, CPU is once again through the roof for the initial
 GET.

 Any thoughts about what's going on here?  I know that Google's session
 management involves memcache and the datastore.  Could the high CPU be
 a side-effect of some initialization routine, etc...?

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



[appengine-java] Re: CPU Occasionally Spikes when HttpSession is Created

2009-09-16 Thread Traveler1980

Sono one else has noticed anything like this???

Regards,
Jamie

On Sep 15, 9:13 am, Traveler1980 jshar...@gmail.com wrote:
 Hi Everyone,

 I've noticed that CPU occasionally spikes when creating an
 HTTPSession.  It only seems to happen when it's been awhile since an
 app has been accessed or when an app is initially deployed.

 For example, I created a simple test servlet that creates a session
 and and writes a response:

 protected void doGet(HttpServletRequest req, HttpServletResponse resp)
 throws ServletException, IOException {
    req.getSession();
    PrintWriter writer = resp.getWriter();
    writer.write(Test Complete);
    writer.flush();
    writer.close();

 }

 When I deploy the app and invoke the servlet for the first time, I see
 the following in the admin console:
 09-15 05:57AM 29.487 /test 200 7184ms 4381cpu_ms 65api_cpu_ms 0kb
 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6) Gecko/
 2009011913 Firefox/3.0.6 (.NET C

 Note the high CPU and long response time.

 Subsequent session creations are much faster.  If I delete my cookies
 and re-invoke the servlet, CPU is approx. 70-80ms.

 Now, if I leave the app for awhile (let's say an hour) and hit the
 servlet again, CPU is once again through the roof for the initial
 GET.

 Any thoughts about what's going on here?  I know that Google's session
 management involves memcache and the datastore.  Could the high CPU be
 a side-effect of some initialization routine, etc...?

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



[appengine-java] Re: CPU Occasionally Spikes when HttpSession is Created

2009-09-16 Thread Traveler1980

Thanks Toby.  Your explanation makes sense and it looks like that's
exactly what's happening:

09-16 01:39PM 57.474 /test 200 4036ms 4478cpu_ms 65api_cpu_ms 0kb
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6)

  W 09-16 01:40PM 00.884

  foo.bar.TestServlet init: Initializing Test Servlet

  W 09-16 01:40PM 00.908

  foo.bar.TestServlet doGet: Before calling request.getSession()

  W 09-16 01:40PM 01.484

   foo.bar.TestServlet doGet: After calling request.getSession()



On Sep 16, 4:09 pm, Toby Reyelts to...@google.com wrote:
 App Engine retires and spins up new instances of your app based on demand.
 If a new instance of your app is being created, you'll see higher CPU then
 normal as all of your code gets reloaded and initialized. This sounds like
 the behavior you're seeing. One way to test that is to write a logging
 statement in your Servlet's init() method.

 On Wed, Sep 16, 2009 at 4:00 PM, Traveler1980 jshar...@gmail.com wrote:

  Sono one else has noticed anything like this???

  Regards,
  Jamie

  On Sep 15, 9:13 am, Traveler1980 jshar...@gmail.com wrote:
   Hi Everyone,

   I've noticed that CPU occasionally spikes when creating an
   HTTPSession.  It only seems to happen when it's been awhile since an
   app has been accessed or when an app is initially deployed.

   For example, I created a simple test servlet that creates a session
   and and writes a response:

   protected void doGet(HttpServletRequest req, HttpServletResponse resp)
   throws ServletException, IOException {
      req.getSession();
      PrintWriter writer = resp.getWriter();
      writer.write(Test Complete);
      writer.flush();
      writer.close();

   }

   When I deploy the app and invoke the servlet for the first time, I see
   the following in the admin console:
   09-15 05:57AM 29.487 /test 200 7184ms 4381cpu_ms 65api_cpu_ms 0kb
   Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6) Gecko/
   2009011913 Firefox/3.0.6 (.NET C

   Note the high CPU and long response time.

   Subsequent session creations are much faster.  If I delete my cookies
   and re-invoke the servlet, CPU is approx. 70-80ms.

   Now, if I leave the app for awhile (let's say an hour) and hit the
   servlet again, CPU is once again through the roof for the initial
   GET.

   Any thoughts about what's going on here?  I know that Google's session
   management involves memcache and the datastore.  Could the high CPU be
   a side-effect of some initialization routine, etc...?

   Thanks for the feedback,
   Jamie


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



[appengine-java] CPU Occasionally Spikes when HttpSession is Created

2009-09-15 Thread Traveler1980

Hi Everyone,

I've noticed that CPU occasionally spikes when creating an
HTTPSession.  It only seems to happen when it's been awhile since an
app has been accessed or when an app is initially deployed.

For example, I created a simple test servlet that creates a session
and and writes a response:

protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
   req.getSession();
   PrintWriter writer = resp.getWriter();
   writer.write(Test Complete);
   writer.flush();
   writer.close();
}

When I deploy the app and invoke the servlet for the first time, I see
the following in the admin console:
09-15 05:57AM 29.487 /test 200 7184ms 4381cpu_ms 65api_cpu_ms 0kb
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6) Gecko/
2009011913 Firefox/3.0.6 (.NET C

Note the high CPU and long response time.

Subsequent session creations are much faster.  If I delete my cookies
and re-invoke the servlet, CPU is approx. 70-80ms.

Now, if I leave the app for awhile (let's say an hour) and hit the
servlet again, CPU is once again through the roof for the initial
GET.

Any thoughts about what's going on here?  I know that Google's session
management involves memcache and the datastore.  Could the high CPU be
a side-effect of some initialization routine, etc...?

Thanks for the feedback,
Jamie

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



[appengine-java] JSF 1.2 - Session-scoped managed Bean not Behaving as Expected

2009-09-04 Thread Traveler1980

Hi All,

I recently upgraded an app that I'm working on from MyFaces 1.1.6 to
JSF (Mojarra) 1.2_13 with Facelets.  I used the jars (el and jsf) from
this example -- http://code.google.com/p/jsfongap/

Everything is working fine when running my app locally; however, when
I deploy, session-scoped managed beans are being recreated on every
page turn - almost as if they are request-scoped.

To give a simple example, let 's say I have this bean defined in faces-
config:
managed-bean
managed-bean-nameuser/managed-bean-name
managed-bean-classfoo.bar.User/managed-bean-class
managed-bean-scopesession/managed-bean-scope
/managed-bean

And the bean is used on page 1 of an application as follows:
h:inputText id=firstName value=#{user.firstName} style= /

And the value is then output on a second page like:  h:outputText
value=#{user.firstName}/

Regardless of what I type on the first page, the value is not retained
and displayed on the second page.  I did a simple test where I logged
user.toString().  I expected the output from toString() to be the same
for the entire session.  My expectation was met on my development
server, but when deployed I saw this:

First Page submit -
09-04 08:44PM 37.206
foo.bar.actions.impl.UserAction execute: foo.bar.u...@1515d5c

Second Page Submit -
09-04 08:44PM 46.579
foo.bar.actions.impl.UserAction execute: foo.bar.u...@60999e

Big surprise.  Different objects!!  In fact, a new instance of User is
created for every page turn.

Has anyone else noticed this odd behavior?  Is it possible that I've
missed something?  I will probably end up going back to MyFaces 1.1.

Thanks in advance for the help.
Jamie


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



[appengine-java] Re: GAE down? Response Error 500

2009-09-03 Thread Traveler1980

Datastore GET error rate is still 100%.  Any ETA on when this will be
resolved?

Regards,
JS

On Sep 3, 3:41 am, Hani Naguib haninag...@gmail.com wrote:
 I am also getting many error 500 pages.
 This is happening since the issue I mentioned 
 here:http://groups.google.com/group/google-appengine-java/browse_thread/th...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---