Due to the nature of classic google app engine, you can't leave threads running. This doesn't mean you can't have sockets open between requests, but the MongoDB driver wants to use threads to manage those sockets for you and that's a no-no.
This leaves you pretty much two choices if you want to use MongoDB in some capacity with Google App Engine: 1) Use Managed VMs. You can do almost anything you want in a Managed VM, including creating threads. 2) Hack the driver to not use threads. There really aren't a lot of other options. GAE is inherently constrained somewhat more than other platforms. There are advantages and disadvantages to this, but if you really want to make heavy use of MongoDB, I suggest investigating #1 above. Jeff On Thu, Nov 5, 2015 at 10:16 PM, Minie Takalova <mintak...@gmail.com> wrote: > Can be used, *Task Queue *as separate, non request dependent, process for > storing open database connection? > > https://cloud.google.com/appengine/docs/python/taskqueue/ > Cite:... *With the Task Queue API, applications can perform work outside > of a user request, initiated by a user request. If an app needs to execute > some background work, it can use the Task Queue API ...* > > Is there any simple sample of that usage? > > > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to google-appengine+unsubscr...@googlegroups.com. > To post to this group, send email to google-appengine@googlegroups.com. > Visit this group at http://groups.google.com/group/google-appengine. > To view this discussion on the web visit > https://groups.google.com/d/msgid/google-appengine/86acf991-e188-41bd-8741-56c14c84c38c%40googlegroups.com > <https://groups.google.com/d/msgid/google-appengine/86acf991-e188-41bd-8741-56c14c84c38c%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscr...@googlegroups.com. To post to this group, send email to google-appengine@googlegroups.com. Visit this group at http://groups.google.com/group/google-appengine. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/CADK-0ujmp3uW8gnkUrZckp%3DpOGhGOAKDqo1oYfMFaTty%3DLu7Jg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.