0

I wrote a program to send mails from GAE. It can be run in two ways:-

  1. as a http request
  2. as a scheduled cron job (by writing job desc. in cron.yaml)

Requests per second for the latter case is almost half the former.

screen shot from app's dashboard

Why could be the possible reason for this?

haltTm
  • 534
  • 1
  • 6
  • 25
  • It's impossible to say without more details - what's the code for each? What logs show up in the request logs? The most obvious answer, though, is that the second request is for favicon.ico. – Nick Johnson Jul 24 '11 at 09:15
  • my (python) code reads 400 email ids from a file which is available on gae itself and shoots them all a mail each. – haltTm Jul 25 '11 at 04:50
  • 1
    That's nice, but it's not code, and you haven't provided any details that would allow us to distinguish your app from scores of apps that don't experience this. The simplest explanation is still `favicon.ico`. – Nick Johnson Jul 25 '11 at 05:45
  • The logs say that `favicon.ico` is requested. That explains why the number of requests are doubled. Isn't there a way to avoid it? – haltTm Jul 26 '11 at 13:29
  • There is no way to stop it; read this: http://stackoverflow.com/questions/4867206/how-to-prevent-the-browser-from-asking-for-the-favicon/4867228#4867228 – Bogdacutu Jul 26 '11 at 16:53

1 Answers1

3

As you can see, there are 2 request instead of one when using HTTP requests. All modern browsers attempt to retrieve the favicon.ico file from the server, and, even if it does not exist, it is counted in the graph.

Bogdacutu
  • 763
  • 7
  • 24
  • @Nick I'm invoking a function by appending it to app's url and attaching the necessary get parameters. e.g. `appid.appspot.com/sendMail?parameter=filName.txt`. I directly type this URL into the address bar. Doesn't this ensure that the browser doesn't look for favicon.ico? – haltTm Jul 26 '11 at 13:23
  • No, it still looks for the favicon. – Bogdacutu Jul 26 '11 at 16:48