Thank you for the suggestion. I added --enable-threads but it did not
change the outcome. Here is what I meant by shared object:
http://en.wikipedia.org/wiki/Shared_object#Shared_libraries
I load and call the shared object using Python's ctypes module like so:
CorrectA = ctypes.CDLL("libCorrectA.so")
If I spawn a child process from within uWSGI (using python's subprocess
module) and call the shared object from the child process, the shared
object corrects the address. It is only when the shared object is called
from directly within the uWSGI process that the correction fails because
the shared object fails to memory-map the files it needs.
Thanks,
Brian
*
*
On 8/7/2012 9:49 AM, Roberto De Ioris wrote:
Il giorno 07/ago/2012, alle ore 15:19, Brian Jay Stanley
<[email protected]> ha scritto:
I am running uWSGI 1.2.4 behind nginx. My application has to correct misspelled
addresses, and to do so, it uses a product called CorrectAddress by Intelligent
Search Technology. CorrectAddress runs as a shared object (I am on Ubuntu
10.04) that loads data files into memory in order to correct the misspellings.
What I have found is that when I run my application either from the command
line or within Apache, the shared object successfully corrects the address. But
when I run the application within uWSGI, it fails to correct the address. The
engineers at Intelligent Search believe that, under uWSGI, the shared object is
not loading the data files into memory properly. (It needs to load about 60 MB
of data into memory.)
Are there any configuration options that I should look at that might affect the
uWSGI process's ability to load files into memory? I've ruled out permission
issues. I am starting uWSGI with the following options:
DAEMON_OPTS="--socket 127.0.0.1:5050 \
--uid www-data \
--master \
--daemonize /var/log/uwsgi.log \
--logdate \
--harakiri 600 \
--buffer-size 65536 \
--vacuum \
--listen 1024 \
--single-interpreter \
"
Thanks for any suggestions,
Brian
Sorry, i am not sure to understand what a "shared object" is.
Do you have some form of tech documentation about such a product ?
The only difference with mod_wsgi is the usage of threads and fork(). The
second one should not be relevant as it looks like
you are using dynamic apps, so i would bet adding --enable-threads should help.
--
Roberto De Ioris
http://unbit.it
JID: [email protected]
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi