[BangPypers] Django + Lighttpd + Global Variables are getting initalized frequently

Praveen Kumar praveen.python.plone at gmail.com
Wed Feb 4 10:39:29 CET 2009


I was facing the same problem in Django Development server also, but I am
able to come across the same using '--noreload' option, python manage.py
runserver --noreload, and updation of my variable is working properly

>>I was facing the same problem in Django Development server also, but I am
able to come across the same using '--noreload' option, python manage.py
runserver --noreload, and updation of my variable is working properly

thats because it's one process serving one application to one person, in
production, thats no feasible.

You do not resolve it. to be in that situation you must be doing some thing
wrong. if you wanna store state, store in cache.

Thanks

On Wed, Feb 4, 2009 at 2:55 PM, Praveen Kumar <
praveen.python.plone at gmail.com> wrote:

> *That is because your (and most) web servers cycles child processes*
>
> On Mon, Feb 2, 2009 at 4:57 PM, Hussain Bohra <hussainbohra_30 at yahoo.com>wrote:
>
>> Hi All,
>>
>> I am using Django and Lighttpd Webserver, for one of our tool.
>> I am initializing one variable as a global at the top of file and updating
>> the same on some particular function call. What I am observing is it works
>> fine for some time but after some time variable defined on the top get
>> reinitialized but happening with random pattern of time-- (can be confirmed
>> from the log message), I guess complete module is getting loaded again
>>
>> I was facing the same problem in Django Development server also, but I am
>> able to come across the same using '--noreload' option, python manage.py
>> runserver --noreload, and updation of my variable is working properly
>>
>> but i cant able to find any thing similar for runfcgi, python manage.py
>> runfcgi daemonize=true.
>>
>> Any one do let me know, what can be done to avoid reinitialize of a source
>> file (i.e. once get loaded in a memory, should not be updated until web
>> server restarts), I tried removing py file and start server with .pyc files,
>> then also same problem is coming.
>>
>> Thankx in advance
>>
>> Thanks and Regards,
>> Hussain Bohra
>>
>> ------------------------------
>> Add more friends to your messenger and enjoy! Invite them now.<http://in.rd.yahoo.com/tagline_messenger_6/*http://messenger.yahoo.com/invite/>
>>
>> _______________________________________________
>> BangPypers mailing list
>> BangPypers at python.org
>> http://mail.python.org/mailman/listinfo/bangpypers
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/bangpypers/attachments/20090204/ed6a2e4e/attachment.htm>


More information about the BangPypers mailing list