Home Issue with Cloud App Engine, Jersey REST framework and Cloud SQL
Reply: 0

Issue with Cloud App Engine, Jersey REST framework and Cloud SQL

user48564
1#
user48564 Published in September 20, 2018, 10:22 pm

I have a App engine Project in Google App Engine named : cwdataproject I also have a REST service Application deployed in Google App engine under same Project. I have Implemented REST service using Jersey with CORS implementation.REST service Application Project retrieving data from Google Cloud SQL and returning back to client.

Now, the behavior of REST service seems very unstable. Some time it is giving back result. and sometime it is not returning any data . But no error is there.

This is from App Engine log :

A 2014-05-14 11:41:27.581 200 298B 12ms
/rest/messageservices/manufecturerlist?callback=createmanufactureroption [13/May/2014:23:11:27 -0700] "GET /rest/messageservices/manufecturerlist?callback=createmanufactureroption HTTP/1.1" 200 298 - "Mozilla/5.0 (Linux; U; Android 4.2.1; en-us; Lenovo P780_ROW Build/JOP40D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30" "cwdataproject.appspot.com" ms=12 cpu_ms=520 cpm_usd=0.000033 instance=00c61b117ce022f9f9bf9df99be6e4b0b6e58e app_engine_release=1.9.4

But same code was working hours back ;-) Here is a log which was returning data previously. No change has been done ..

[13/May/2014:11:23:18 -0700] "GET /rest/messageservices/manufecturerlist?callback=createmanufactureroption HTTP/1.1" 200 560 - "Mozilla/5.0 (Linux; U; Android 4.2.1; en-us; Lenovo P780_ROW Build/JOP40D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30" "cwdataproject.appspot.com" ms=11543 cpu_ms=7280 cpm_usd=0.000063 loading_request=1 instance=00c61b117ce022f9f9bf9df99be6e4b0b6e58e app_engine_release=1.9.4

I only can see a difference loading_request=1

Really no idea. !!!

Can anybody help please ..

My appengine-web.xml file looks as below ...

<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
  <application>messageframework</application>
  <version>1</version>
  <!--
    Allows App Engine to send multiple requests to one instance in parallel:
  -->
  <threadsafe>true</threadsafe>
  <!-- Configure java.util.logging -->
  <system-properties>
    <property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>
  </system-properties>

  <!--
    HTTP Sessions are disabled by default. To enable HTTP sessions specify:

      <sessions-enabled>true</sessions-enabled>

    It's possible to reduce request latency by configuring your application to
    asynchronously write HTTP session data to the datastore:

      <async-session-persistence enabled="true" />

    With this feature enabled, there is a very small chance your app will see
    stale session data. For details, see
    http://code.google.com/appengine/docs/java/config/appconfig.html#Enabling_Sessions
  -->
</appengine-web-app>
share|improve this question
  • Are you sure the request which you are sending it has data or not ? – Ankur Jain May 14 '14 at 6:56
  • Yes Ankur ,, It is master manufacturer list, hence will not take any input but will return all the manufacturer as output – ajoy sinha May 14 '14 at 10:59
  • Some problem must be there in your code. As I have deployed several applications on GAE using Spring, Hibernate, Objectify and I never faced any such issue. – Ankur Jain May 14 '14 at 13:32
  • I have noticed an unusual pattern.. Services are working fine for sometime ..and if i send request continiously, it works,, and suppose I have not send request for longer period of time.. then it will stop returning the result. and again If i restart the instance, it start to return service result. Need help. to understand. And these behaviour is observing for those seervices which are intaresting with cloud sql database. there are two services which are not interesting with database, those are working always. – ajoy sinha May 14 '14 at 20:10
  • This is happening because you are using the free instance of your GAE application, when you switch to Paid Version there is an option of keeping instance always on, then your service will work continuously. – Ankur Jain May 15 '14 at 5:24

active oldest votes

Your Answer

StackExchange.ifUsing("editor", function () { StackExchange.using("externalEditor", function () { StackExchange.using("snippets", function () { StackExchange.snippets.init(); }); }); }, "code-snippets"); StackExchange.ready(function() { var channelOptions = { tags: "".split(" "), id: "1" }; initTagRenderer("".split(" "), "".split(" "), channelOptions); StackExchange.using("externalEditor", function() { // Have to fire editor after snippets, if snippets enabled if (StackExchange.settings.snippets.snippetsEnabled) { StackExchange.using("snippets", function() { createEditor(); }); } else { createEditor(); } }); function createEditor() { StackExchange.prepareEditor({ heartbeatType: 'answer', convertImagesToLinks: true, noModals: false, showLowRepImageUploadWarning: true, reputationToPostImages: 10, bindNavPrevention: true, postfix: "", onDemand: true, discardSelector: ".discard-answer" ,immediatelyShowMarkdownHelp:true }); } });
 
StackExchange.ready( function () { StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f23647060%2fissue-with-cloud-app-engine-jersey-rest-framework-and-cloud-sql%23new-answer', 'question_page'); } );

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged sql google-app-engine rest cloud or ask your own question.

StackExchange.ready(function(){$.get('/posts/23647060/ivc/cf21');});
StackExchange.ready(function () { StackExchange.responsiveness.addSwitcher(); }) (function(i, s, o, g, r, a, m) { i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function() { (i[r].q = i[r].q || []).push(arguments) }, i[r].l = 1 * new Date(); a = s.createElement(o), m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m); })(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga'); StackExchange.ready(function () { StackExchange.ga.init({ sendTitles: true, tracker: window.ga, trackingCodes: [ 'UA-108242619-1' ] }); StackExchange.ga.setDimension('dimension2', '|sql|google-app-engine|rest|cloud|'); StackExchange.ga.setDimension('dimension3', 'Questions/Show'); StackExchange.ga.trackPageView(); }); /**/ var _qevents = _qevents || [], _comscore = _comscore || []; (function() { var ssl = 'https:' == document.location.protocol, s = document.getElementsByTagName('script')[0], qc = document.createElement('script'); qc.async = true; qc.src = (ssl ? 'https://secure' : 'http://edge') + '.quantserve.com/quant.js'; s.parentNode.insertBefore(qc, s); _qevents.push({ qacct: "p-c1rF4kxgLUzNc" }); /**/ var sc = document.createElement('script'); sc.async = true; sc.src = (ssl ? 'https://sb' : 'http://b') + '.scorecardresearch.com/beacon.js'; s.parentNode.insertBefore(sc, s); _comscore.push({ c1: "2", c2: "17440561" }); })();
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.312974 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO