python - Django Process Lifetime -


when using django, how long python process used service requests stay alive? obviously, given python process services entire request, guaranteed survive across across requests?

the reason ask perform expensive computations @ when import modules , know how modules imported.

this not function of django @ all, of whatever system being used serve django. that'll wsgi via mod_wsgi or standalone server gunicorn, might different fastcgi or plain cgi.

the point these different systems have own models determines process lifetime. in other basic cgi, individual process serve several requests before being recycled, there absolutely no general guarantee of how many - process might last several days or weeks, or few minutes.

one thing note though have several processes running concurrently, , absolutely cannot count on particular request being served same 1 previous one. means if have user-specific data want persist between requests, need store somewhere session.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -