views:

42

answers:

4

I have a small yest App running on GAE under the default free quota. It runs fine locally. When deployed on GAE (appspot), some parts of it do not work. Appspot dashboard does not show any error in the logs. Added code to trap quota limits is not triggered. Why is there a variation between the App running locally, versus failing when uploaded? There are no server error screens when deployed, only non-responsive buttons. (One non-responsive html form submit button, which works fine locally.) I am using Eclipse to run the App locally and also to deploy the same identical code.

Any insights offered would be helpful. I don't have infinite loops, only a java while () {} statement which locally is tracked to run only 4 while loop iterations within 4 milliseconds.

A: 

One possibility:

Check your urls are not having a double slash ('//') e.g. /user//listall This works on dev server but not when you deploy it on app engine.

Gopi
A: 

I do not have any double slash // in my JSP or java. Every URL is a single slash.

Drew Sears: The Appspot log below shows no error before server-side request fires. The request does fire, and finishes, it does not time out. See the log below. It completes successfully. But the form does not trigger or fire the next process that it is supposed to trigger. It stays stuck. The enxt process (to which the form data is fed) is not initiated.


1.

  08-22 07:57PM 12.475 /getmoreinputs.jsp?cp=true&iv=true 200 23ms 16cpu_ms 0kb Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 (.NET CLR 3.5.30729),gzip(gfe)
  See details

  98.236.17.99 - - [22/Aug/2010:19:57:12 -0700] "GET /getmoreinputs.jsp?cp=true&iv=true HTTP/1.1" 200 923 "http://black-scholes.appspot.com/" "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 (.NET CLR 3.5.30729),gzip(gfe)" "black-scholes.appspot.com" ms=23 cpu_ms=17 api_cpu_ms=0 cpm_usd=0.000615
Joe Smallman
Try "getmoreinputs.jsp" instead of "/getmoreinputs.jsp". I suspect when this is being appended internally to ' http ://black-scholes.appspot.com/' it may create a condition as I mentioned in my answer. Please give a try.
Gopi
A: 

Drew Sears: Thanks for the suggestion on running Firebug. This is for client-side Javascript. Google App Engine is in java (or python) code, not javascript. GAE offers the log.info() function to show interim values at any step of the way. My code is practically with log.info() all over, and it works perfectly. There are no math or code errors when run locally: all the variables have correct values. Why the code fails on deployment at form submit without errors is a mystery.
-- Joe

Joe Smallman
A: 

Drew Sears:

Based in your insight, I viewed the client side javascript returned by the GAE deployment. It was missing 2 lines of code: the most critical submit=/Calculate path of the form tag. How did that happen, when the same exact code works perfectly locally? No errors shown on server side, and I did not need Firebug on client side, only View-Source in client side browser response. No wonder that the client side response to submitting the form was NULL. (I wish we have client-side javascript natural intelligence to identify broken JSP-created output.) Why GAE deployment was creating bad JSP output without throing errors is a mystery.

When all else fails, try occult methods. Without any change to code, I complied the GAE App with a new version number. Then I went to Appspot dashboard and deleted the old version (which was not working). Amazing! The deployment of the new version worked perfecly, exactly as the local run. There was no change to the code.

GAE has problems. When deployment != Local, my new rule is: clean out all old versions at deployment site. In my case, I had only 1 old version.

--Joe

Joe Smallman