0

This is what I observed after debugging my blog app while working on this previous question.

Link : Having Problems with Django Context Processors

While debugging my blog app, I found out if I refresh the page once, it responds normally. But when I refresh it thrice or maybe more it gives me errors with large number of request size, CPU time and voluntary/involuntary context switches. Eventually leaving me with a fail to allocate memory error about which I am still concerned.

I guess on the server side, processing the request does not stop when I load the page more than once. Hence I get thousands of context switches and large total CPU time with errors.

Basically its like a DDoS attack on very very small scale. My app would definitely crash if its on a large scale.

Is there any way that I can design my blog app so that it responds to only one request at a time? Or is there any other possible solution to my problem ?

Community
  • 1
  • 1
madil
  • 35
  • 6
  • @catherine I am using it in every page and it is being called in every page of my blog app. its the number of page requests I am concerned about. – madil Mar 25 '13 at 11:42
  • how about you use pjax? it load only the body you want to show not the entire page – catherine Mar 25 '13 at 11:43
  • that too is good. But ive only heard of it never used it. I am thinking of keeping it to another (mini)app named `quotes` which would do get quotes for me instead of a context processor. :/ – madil Mar 25 '13 at 11:59
  • That's also good. And about the pjax I use it also in my website and it's working good, light like 1KB, it's a simple app :) – catherine Mar 25 '13 at 12:10

0 Answers0