For some time I have been using mod_wsgi with global variables. The global vars have been persistant across sessions in the past. Suddenly now they are not persistant. Each request loads a fresh instance and persistence is lost.
I want to enforce wsgi (for now) remembering the variables from previous requests. Is there an Apache config option such as daemon option or middleware that can enforce the behavior I had going previously?
It sounds like the issue may be that you were using daemon mode of mod_wsgi previously, with default of a single process, and then mucked up the Apache/mod_wsgi configuration and have fallen back to use embedded mode of mod_wsgi, which means you are subject to whatever Apache configuration is. The Apache configuration is generally multiprocess though.
See:
So confirm whether you are working in embedded mode or daemon mode.
You can also verify whether in multi process or multi threaded configuration.
You can also do:
import mod_wsgi
print(mod_wsgi.maximum_processes)
print(mod_wsgi.threads_per_process)
to confirm what configuration you are running under.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments