/_ah/queue/__deferred__ in App Engine Logs

断了今生、忘了曾经 提交于 2019-12-10 10:35:20

问题


I have an App Engine application which uses Google Cloud SQL, and from a page in my application I am doing some database operation; whenever this page is accessed, it is not able to perform all database operations. When I go to the console, all I see is /_ah/queue/__deferred__.

I am able to run the application without any issues on localhost so code has no errors, however, there is an issue with the Cloud SQL after deploying it.

Note : I have not used queues anywhere in my code.

What is the actual cause for /_ah/queue/__deferred__ to appear in App Engine logs?


回答1:


I had a similar issue. I've found that that in one of my filters was opening session for each incomming connection:

httpRequest.getSession(true);
//or the one below - both opens a valid HTTP Session
httpRequest.getSession();

and my appengine-web.xml was configured to store session asynchronously

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

This has resulted in creating a lot of tasks in default queue and each one of them tried to store an empty session. To avoid this, make sure that you are opening session only for proper requests. Either by fixing filter or changing filter url-patterns in your web.xml




回答2:


Unless you specified a queue name, all deferred tasks go into the "default" Task Queue. From there, you can rerun and if you are on local dev server (debug mode) you can step through the code.



来源:https://stackoverflow.com/questions/25934325/ah-queue-deferred-in-app-engine-logs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!