[modwsgi] Re: How to run Apache and mod_wsgi using system python not some virtual python

2020-05-10 Thread Sujai Kumar
In addition to what Graham sir has mentioned. You can easily see it for yourself on what is the module search path for django when it is found as root user and as apache user using the snipped below. Run the below as 'root' user $ python -c "import sys;print(sys.ptah);import

Re: [modwsgi] Modwsi Daemon mode python giving error (until manual restart of apache)

2019-05-17 Thread Sujai Kumar
ta/dev/deployment/production/release/server-python/sf_django/sf_api/wsgi.py'. Thanks & regards, Sujaikumar On Thu, May 16, 2019 at 2:47 PM Graham Dumpleton wrote: > > > On 16 May 2019, at 3:32 pm, Sujai Kumar wrote: > > Hi Graham, > > Please find attached the i

Re: [modwsgi] Modwsi Daemon mode python giving error (until manual restart of apache)

2019-05-15 Thread Sujai Kumar
ed, with your version not having the "while lnum > 0"? > > On 16 May 2019, at 1:11 pm, Sujai Kumar wrote: > > Hi Graham, > > Here are the version of softwares being used. > *Python -> 3.6* > *mod_wsgi -> 4.6.4* > Sujai@machine0009:/usr/lib64/httpd/modules&

Re: [modwsgi] Modwsi Daemon mode python giving error (until manual restart of apache)

2019-05-15 Thread Sujai Kumar
ff the file system paths and > so I can't see what: > > File ".core/api/api_util.py", line 15, in log_user_access > > is likely a part of (if open source project) and infer anything about > whether a separate thread is running. So a more complete stack trace may > he

Re: [modwsgi] Modwsi Daemon mode python giving error (until manual restart of apache)

2019-05-15 Thread Sujai Kumar
appening when the processes are being shutdown? > > Graham > > On 16 May 2019, at 1:44 am, Sujai Kumar wrote: > > Hello All, > > We have a Apache/Python/Django using modwsgi. We hit upon a situation > where the following error is happening in the site, > > *Error Log*

[modwsgi] Modwsi Daemon mode python giving error (until manual restart of apache)

2019-05-15 Thread Sujai Kumar
Hello All, We have a Apache/Python/Django using modwsgi. We hit upon a situation where the following error is happening in the site, *Error Log* 2019-05-09 09:18:08,471 - root - ERROR] - Error : Traceback (most recent call last): File ".core/api/api_util.py", line 15, in

Re: [modwsgi] Apache Reload Kills Django Process Abruptly

2018-06-14 Thread Sujai Kumar
fore, but think it may be three seconds in this scenario. > > The way Apache works internally, it isn't possible to have a graceful > shutdown for managed processes, like those of mod_wsgi daemon processes, so > you cannot override this behaviour. > > > On 13 Jun 2018, at 9:10 pm

Re: [modwsgi] Apache Reload Kills Django Process Abruptly

2018-06-13 Thread Sujai Kumar
Apache > instance. > > Graham > > On 13 Jun 2018, at 1:31 pm, Sujai Kumar wrote: > > Hello All, > > As part of logrotate config, the httpd process is getting reloaded on a > set time. I was of impression that this should not affect the django > serving (under apache)

[modwsgi] Apache Reload Kills Django Process Abruptly

2018-06-12 Thread Sujai Kumar
Hello All, As part of logrotate config, the httpd process is getting reloaded on a set time. I was of impression that this should not affect the django serving (under apache). On the contrary, I see that the django processes are killed abruptly on httpd reload. I read through the below

Re: [modwsgi] Need help debugging ModuleNotFoundError: No module named 'django'

2018-05-24 Thread Sujai Kumar
Can you please do this? pip3 install django #Please note it is small 'd' and not capital 'D'. If django is already installed you will get appropriate message. If already installed try importing the same from python prompt by doing 'import django'. If no error display then django is installed

Re: [modwsgi] Apache/mod_wsgi lxml etree.tostring returns different output compared to the run on standalone Django server

2018-04-10 Thread Sujai Kumar
he configuration using: > > LoadFile /usr/local/lib/libxml2.so.2.9.8 > > before loading mod_wsgi module. That way it only applies to Apache. > > On 10 Apr 2018, at 6:46 pm, Sujai Kumar <sujai@gmail.com > > wrote: > > Thanks very much sir for your help. > > The

Re: [modwsgi] Apache/mod_wsgi lxml etree.tostring returns different output compared to the run on standalone Django server

2018-04-10 Thread Sujai Kumar
e no: > > libxml2mod.so > > under your Python virtual environment. That path is system Python 2.7 > version of package. There must be an equivalent .so file somewhere. > > If you do have two systems, you need to ensure both have same > libxml2/libxml2-devel packages, if you are co

Re: [modwsgi] Apache/mod_wsgi lxml etree.tostring returns different output compared to the run on standalone Django server

2018-04-08 Thread Sujai Kumar
& regards, > Sujaikumar > > > On Monday, April 9, 2018 at 8:06:57 AM UTC+5:30, Graham Dumpleton wrote: >> >> Are you sure the libxm2-dev package on your system is up to date? >> >> Can you find the lxml .so file in the Python installation/virtual >> enviro

Re: [modwsgi] Apache/mod_wsgi lxml etree.tostring returns different output compared to the run on standalone Django server

2018-04-08 Thread Sujai Kumar
nt and run 'ldd' on it to see where it is finding the XML shared >> library? >> >> Graham >> >> On 9 Apr 2018, at 12:23 pm, Sujai Kumar <sujai@gmail.com> wrote: >> >> I have compiled Python 3.6.3 from sources. >> >> Thanks &

Re: [modwsgi] Apache/mod_wsgi lxml etree.tostring returns different output compared to the run on standalone Django server

2018-04-08 Thread Sujai Kumar
your system is up to date? > > Can you find the lxml .so file in the Python installation/virtual > environment and run 'ldd' on it to see where it is finding the XML shared > library? > > Graham > > On 9 Apr 2018, at 12:23 pm, Sujai Kumar <sujai@gmail.com >

Re: [modwsgi] Apache/mod_wsgi lxml etree.tostring returns different output compared to the run on standalone Django server

2018-04-08 Thread Sujai Kumar
iled from source code? > > Graham > > On 8 Apr 2018, at 10:14 pm, Sujai Kumar <sujai.san...@gmail.com> wrote: > > Hello Sir, > > I'm facing a problem with mod_wsgi/lxml configuration. I looked up into > some of the stackoverflow posts and understood that the issue cou

[modwsgi] Apache/mod_wsgi lxml etree.tostring returns different output compared to the run on standalone Django server

2018-04-08 Thread Sujai Kumar
Hello Sir, I'm facing a problem with mod_wsgi/lxml configuration. I looked up into some of the stackoverflow posts and understood that the issue could be with Library versions. etree.tostring() removes characters between '<' and '>' on Apache/mod_wsgi where as the plain Django server works