Raghvendra Kumar
Raghvendra Kumar

Reputation: 1398

/_ah/queue/__deferred__ in App Engine Logs

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?

Upvotes: 2

Views: 880

Answers (2)

Przemyslaw Borkowski
Przemyslaw Borkowski

Reputation: 171

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

Upvotes: 5

Bardia D.
Bardia D.

Reputation: 693

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.

Upvotes: 0

Related Questions