Google App Engine Cloud SQL too many connections -


i have app running on google app engine , uses task queue api of heavier lifting in background. of tasks need connect cloud sql work. @ scale many tasks attempting connect cloud sql @ once. need sort of data service layer of shared client tasks aren't making individual connections cloud sql. if has ideas i'd love hear them.

yes, can this, take little bit of planning, coding, , configuration in side.

one idea use pull queue (instead of push queues). pull queue can schedule tasks , execute them in separate module of application. hardware of module can configured separately main module, can avoid many instances serving requests in turns allow better use connection pooling.

of course, depending on traffic getting might want decide on how many concurrent backend instances want running (and connecting db) avoid/minimize contention.

easier said done, here 2 resources out:

  1. app engine modules - https://developers.google.com/appengine/docs/java/modules/
  2. pull queues - https://developers.google.com/appengine/docs/python/taskqueue/overview-pull

Comments

Popular posts from this blog

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

php - render data via PDO::FETCH_FUNC vs loop -

The canvas has been tainted by cross-origin data in chrome only -