On 27/02/2015, at 3:20 AM, Avi Gabay <[email protected]> wrote:

>  Hi,
> 
> I have two Flask webservices that make use of Scipy/Numpy libraries. Due to C 
> extensions in both libraries, I followed directions mentioned in a few posts 
> and websites and had both under %{GLOBAL} application group. The problem I'm 
> having is that the first app that I send a http request to returns valid 
> results, while the second app will always return a 404. If I deploy only a 
> single app then each work fine on their own, and hence I believe that the 
> issue has to do with the numpy/scipy C modules.
> 
> Below is the virtual hosts file.
> 
> Anyone has any idea how to solve the issue?
> 
> WSGIPythonHome /home/myuser/miniconda3
> WSGIChunkedRequest On
> <VirtualHost *:80>
>                 WSGIDaemonProcess app1 user=myuser group=mygroup
>                 WSGIScriptAlias /app1  /var/www/app1/app1.wsgi
>                 <Location /var/www/app1/>
>                         WSGIProcessGroup app1
>                 </Location>
> 
>                 WSGIDaemonProcess app2 user=myuser group=mygroup
>                 WSGIScriptAlias /app2 /var/www/app2/app2.wsgi
>                 <Location /var/www/app2/>
>                         WSGIProcessGroup app2
>                 </Location>
> 
>                 WSGIApplicationGroup %{GLOBAL}
> 
>                 ErrorLog ${APACHE_LOG_DIR}/error.log
>                 LogLevel debug
>                 CustomLog ${APACHE_LOG_DIR}/access.log combined
> </VirtualHost>

Is the 404 coming from Apache, ie., generic Apache 404, or a Flask generated 
404 page?

The debug level logging may create a lot of noise. If you have it at info 
level, when you access each app in turn, do the logs show the WSGI script file 
for each being loaded when expected on first request?

Note that chunked requests for daemon mode processes only works properly in 
recent mod_wsgi versions. If you are stuck on mod_wsgi 3.X as that is all the 
distro ships, it will not work as expected.

Graham

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to