4

Started using Google Flex Vms recently and in the logs there are multiple requests to /_ah/background that last ~1 hour each time. The only reference to these I could find is this question which mentions they have to do with background threads but I don't believe that's the case here as:

  • nowhere do we use background threads
  • that API is deprecated and I'm not even sure we can use it
  • we do use processes but they're short-lived (nowhere near an hour) and don't print any log messages

Any ideas?

Community
  • 1
  • 1
Michoel
  • 834
  • 5
  • 16

2 Answers2

5

/_ah/background is used in flex for AE API calls that are called outside of an incoming request processing context (like threads, async-io, ...).

Even if you don't do that directly log flushing is still done asynchronously (not part of an income request processing).

This is an implementation details and there is a plan to hide it but still find a way to show (in log, trace,...) information about these API calls.

ozarov
  • 1,051
  • 6
  • 7
  • 1
    Any update on this? It's particularly annoying because it makes all Stackdriver latency graphs and alerts unuseable – Glenn Vandamme Sep 05 '16 at 16:02
  • 4
    We hear you. We're actively working on fixing this right now. We don't have an eta quite yet, but it will be in our next big release. – Justin Beckwith Sep 06 '16 at 16:35
  • @JustinBeckwith Has this been resolved? We are noticing the same thing in our Node.js application. – JackH Mar 31 '17 at 15:35
  • 1
    This has been fixed. If you are using `env:flex` you shouldn't see these requests. – Justin Beckwith Mar 31 '17 at 15:55
  • Which part was fixed @JustinBeckwith: StackDriver graphs/alerts? The logs? The actual use of `/_ah/background`? I have some push-tasks with a `Referer` header of `oldversion.myapp.appspot.com/_ah/background` that I'm trying to debug execution issues with, and I'm not sure exactly where they came from. (I'm using `env:flex`, with 3 days old tasks) – Mike Lambert May 04 '17 at 14:14
0

FWIW, I thought sharing this picture will provide little insight on the frequency, (possible performance) impact this /_ah/background creates..

is there any workaround to clear this ?

enter image description here

Sahas
  • 3,046
  • 6
  • 32
  • 53