<div dir="ltr">So some update to this, as I am not able to find anything on this.<div><br></div><div>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. </div><div><br></div><div>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.</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 18, 2017 at 10:29 PM, Stephen Mazzei <span dir="ltr"><<a href="mailto:mazzei.stephen.a@gmail.com" target="_blank">mazzei.stephen.a@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><p class="m_-1629532346947665425gmail-MsoNormal" style="font-size:12.8px">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.</p><p class="m_-1629532346947665425gmail-MsoNormal" style="font-size:12.8px">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.</p><p class="m_-1629532346947665425gmail-MsoNormal" style="font-size:12.8px">[Mon Dec 18 15:55:34.130217 2017] [core:error] [pid 2649] [client <a href="http://137.183.4.126:58877/" target="_blank">137.183.4.126:58877</a>] Premature end of script headers: wsgi, referer: <a href="https://hpc-mazzei.na.pg.com/webtools/usermanagement/" target="_blank">https://hpc-mazzei.<wbr>na.pg.com/webtools/<wbr>usermanagement/</a><u></u><u></u></p><p class="m_-1629532346947665425gmail-MsoNormal" style="font-size:12.8px">[Mon Dec 18 15:55:34.131654 2017] [:error] [pid 2602] [remote <a href="http://137.183.4.126:6748/" target="_blank">137.183.4.126:6748</a>] mod_wsgi (pid=2602): Exception occurred processing WSGI script '/data/www/flask/usermanagemen<wbr>t/wsgi'.<u></u><u></u></p><div style="font-size:12.8px;border-top:none;border-right:none;border-left:none;border-bottom:1pt solid windowtext;padding:0in 0in 1pt"><p class="m_-1629532346947665425gmail-MsoNormal" style="border:none;padding:0in">[Mon Dec 18 15:55:34.131725 2017] [:error] [pid 2602] [remote <a href="http://137.183.4.126:6748/" target="_blank">137.183.4.126:6748</a>] IOError: failed to write data<u></u><u></u></p><p class="m_-1629532346947665425gmail-MsoNormal" style="border:none;padding:0in"><br></p><p class="m_-1629532346947665425gmail-MsoNormal" style="border:none;padding:0in">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.</p><p class="m_-1629532346947665425gmail-MsoNormal" style="border:none;padding:0in"><br></p><p class="m_-1629532346947665425gmail-MsoNormal" style="border:none;padding:0in"><br></p></div><p class="m_-1629532346947665425gmail-MsoNormal" style="font-size:12.8px">[root@vm]# cat  wsgi<u></u><u></u></p><p class="m_-1629532346947665425gmail-MsoNormal" style="font-size:12.8px">import sys<u></u><u></u></p><p class="m_-1629532346947665425gmail-MsoNormal" style="font-size:12.8px">sys.path.insert(0, '/data/www/flask/usermanagemen<wbr>t/')<u></u><u></u></p><p class="m_-1629532346947665425gmail-MsoNormal" style="font-size:12.8px"><u></u> <u></u></p><p class="m_-1629532346947665425gmail-MsoNormal" style="font-size:12.8px">from usermanagement_app import usermanagement_app as application<u></u><u></u></p><div style="font-size:12.8px;border-top:none;border-right:none;border-left:none;border-bottom:1pt solid windowtext;padding:0in 0in 1pt"><p class="m_-1629532346947665425gmail-MsoNormal" style="border:none;padding:0in">application.debug = True<u></u><u></u></p></div><p class="m_-1629532346947665425gmail-MsoNormal" style="font-size:12.8px">    WSGIDaemonProcess usermanagement user=apache group=apache<u></u><u></u></p><p class="m_-1629532346947665425gmail-MsoNormal" style="font-size:12.8px">    WSGIScriptAlias /webtools/usermanagement /data/www/flask/usermanagement<wbr>/wsgi<u></u><u></u></p><p class="m_-1629532346947665425gmail-MsoNormal" style="font-size:12.8px">    <Directory /data/www/flask/usermanagement<wbr>><u></u><u></u></p><p class="m_-1629532346947665425gmail-MsoNormal" style="font-size:12.8px">        Order deny,allow<u></u><u></u></p><p class="m_-1629532346947665425gmail-MsoNormal" style="font-size:12.8px">        AuthBasicProvider ldap<u></u><u></u></p><p class="m_-1629532346947665425gmail-MsoNormal" style="font-size:12.8px">        AuthLDAPURL blah blah blah<u></u><u></u></p><p class="m_-1629532346947665425gmail-MsoNormal" style="font-size:12.8px">        AuthType Basic<u></u><u></u></p><p class="m_-1629532346947665425gmail-MsoNormal" style="font-size:12.8px">        AuthName "Please enter Intranet username and Intranet password"<u></u><u></u></p><p class="m_-1629532346947665425gmail-MsoNormal" style="font-size:12.8px">        Require valid-user<u></u><u></u></p><p class="m_-1629532346947665425gmail-MsoNormal" style="font-size:12.8px">        WSGIProcessGroup usermanagement<u></u><u></u></p><p class="m_-1629532346947665425gmail-MsoNormal" style="font-size:12.8px">        WSGIApplicationGroup %{GLOBAL}<u></u><u></u></p><p class="m_-1629532346947665425gmail-MsoNormal" style="font-size:12.8px">        WSGIScriptReloading On<u></u><u></u></p><p class="m_-1629532346947665425gmail-MsoNormal" style="font-size:12.8px">        AllowOverride none<u></u><u></u></p><p class="m_-1629532346947665425gmail-MsoNormal" style="font-size:12.8px">    </Directory><u></u><u></u></p><p class="m_-1629532346947665425gmail-MsoNormal" style="font-size:12.8px"><u></u> <u></u></p><p class="m_-1629532346947665425gmail-MsoNormal" style="font-size:12.8px"><u></u> <u></u></p><p class="m_-1629532346947665425gmail-MsoNormal" style="font-size:12.8px">---<u></u><u></u></p><p class="m_-1629532346947665425gmail-MsoNormal" style="font-size:12.8px">Stephen A. Mazzei<u></u><u></u></p><p class="m_-1629532346947665425gmail-MsoNormal" style="font-size:12.8px">Systems Administrator | AFDS, ASRC Federal Data Solutions - P&G HPC Account | <a href="tel:(513)%20634-9965" value="+15136349965" target="_blank">513-634-9965</a></p></div>
<br>______________________________<wbr>_________________<br>
Flask mailing list<br>
<a href="mailto:Flask@python.org">Flask@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/flask" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/flask</a><br>
<br></blockquote></div><br></div>