[Flask] (no subject)

Stephen Mazzei mazzei.stephen.a at gmail.com
Tue Dec 19 14:43:07 EST 2017


So some update to this, as I am not able to find anything on this.

This appears to be a wsgi/apache issue. If I run the application manually,
I do not have the issue regardless of which system I run this from. What is
happening is when I click the user page, it queries the database and pulls
back roughly 2000 tuples. This query is not completing. It is getting about
1/4 of the way through and then dies. What is odd that is it doesn't just
die completely, it tries to do the second loop on the test database. I put
a print in the code before, and can see it print the first 1/4 of the
production query result, then does it again for the test, but neither one
completes.

If I put a sleep in the code, the code will sleep, but the results will be
the same. On the HTML side, the website has already failed with the error
500. If someone can please help me with this, I would really appreciate it.
I am at a complete stop until I can figure out a way to solve this problem.



On Mon, Dec 18, 2017 at 10:29 PM, Stephen Mazzei <mazzei.stephen.a at gmail.com
> wrote:

> So I am running into an interesting error and not sure how to go about
> this. When running my application on my local laptop, the application runs
> smooth, but dies on the test virtual machine. My laptop is a 4 core, 8Gb
> machine, the test VM is 2 core 8GB.
>
> From what I can tell, is on one of the pages I am pulling back about 2000
> records to be displayed. On my laptop, this is fine, but it looks like this
> causes the VM to fail with an error code of 500 in the Apache logs.
>
> [Mon Dec 18 15:55:34.130217 2017] [core:error] [pid 2649] [client
> 137.183.4.126:58877] Premature end of script headers: wsgi, referer:
> https://hpc-mazzei.na.pg.com/webtools/usermanagement/
>
> [Mon Dec 18 15:55:34.131654 2017] [:error] [pid 2602] [remote
> 137.183.4.126:6748] mod_wsgi (pid=2602): Exception occurred processing
> WSGI script '/data/www/flask/usermanagement/wsgi'.
>
> [Mon Dec 18 15:55:34.131725 2017] [:error] [pid 2602] [remote
> 137.183.4.126:6748] IOError: failed to write data
>
>
> I'm not to sure where to go from here, or really what I need to do. I
> supplied the wsgi and my Apache config below. Any help would be really
> appreciated.
>
>
>
> [root at vm]# cat  wsgi
>
> import sys
>
> sys.path.insert(0, '/data/www/flask/usermanagement/')
>
>
>
> from usermanagement_app import usermanagement_app as application
>
> application.debug = True
>
>     WSGIDaemonProcess usermanagement user=apache group=apache
>
>     WSGIScriptAlias /webtools/usermanagement /data/www/flask/usermanagement
> /wsgi
>
>     <Directory /data/www/flask/usermanagement>
>
>         Order deny,allow
>
>         AuthBasicProvider ldap
>
>         AuthLDAPURL blah blah blah
>
>         AuthType Basic
>
>         AuthName "Please enter Intranet username and Intranet password"
>
>         Require valid-user
>
>         WSGIProcessGroup usermanagement
>
>         WSGIApplicationGroup %{GLOBAL}
>
>         WSGIScriptReloading On
>
>         AllowOverride none
>
>     </Directory>
>
>
>
>
>
> ---
>
> Stephen A. Mazzei
>
> Systems Administrator | AFDS, ASRC Federal Data Solutions - P&G HPC
> Account | 513-634-9965 <(513)%20634-9965>
>
> _______________________________________________
> Flask mailing list
> Flask at python.org
> https://mail.python.org/mailman/listinfo/flask
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/flask/attachments/20171219/a1ab0dff/attachment.html>


More information about the Flask mailing list