Question

My Django WEB Application fails to launch all of a sudden and out of the blues.

It was working fine until yesterday in production.

I am not able to figure out where the problem is. It could apache or mod_wsgi or windows but at the moment I have no clue.

I have tried to reinstall all the python libraries/prerequisites etc. but the problem persists nevertheless.

I am serving the WEBApp at Apache Port 8999 and When I access the WEB App, the browser fails to show any error. It just keeps trying to open the page and in the status bar I just see the Waiting for message.

If I see the netstat results then I see the following

C:\Documents and Settings\admintemp>netstat -an | find "8999" TCP
0.0.0.0:8999 0.0.0.0:0 LISTENING TCP 172.18.148.156:8999 10.107.226.88:1826 ESTABLISHED

This connection remains established forever and nothing happens. Internet Browser just seems to try to keep opening the Web App and it appears as if it is waiting forever.

The only thing i see in Apache logs is this

[Fri Jun 21 18:34:32 2013] [warn] mod_wsgi: Compiled for Python/2.7.
[Fri Jun 21 18:34:32 2013] [warn] mod_wsgi: Runtime using Python/2.7.3.
[Fri Jun 21 18:34:32 2013] [notice] Apache/2.2.22 (Win32) mod_wsgi/3.3 Python/2.7.3 configured -- resuming normal operations
[Fri Jun 21 18:34:32 2013] [notice] Server built: Jan 28 2012 11:16:39
[Fri Jun 21 18:34:32 2013] [notice] Parent: Created child process 3876
[Fri Jun 21 18:34:32 2013] [warn] mod_wsgi: Compiled for Python/2.7.
[Fri Jun 21 18:34:32 2013] [warn] mod_wsgi: Runtime using Python/2.7.3.
[Fri Jun 21 18:34:32 2013] [notice] Child 3876: Child process is running
[Fri Jun 21 18:34:32 2013] [notice] Child 3876: Acquired the start mutex.
[Fri Jun 21 18:34:32 2013] [notice] Child 3876: Starting 64 worker threads.
[Fri Jun 21 18:34:32 2013] [notice] Child 3876: Starting thread to listen on port 8999.
[Fri Jun 21 18:34:43 2013] [error] C:/Program Files/App_Logic/logic_apps/logic_apps\\..\\logic_apps

I also noticed in the Windows Event Viewer logs (Application Logs) the following message but I am not sure how (and if) this could be related to my problem at hand. This message seems to shows up once for everytime i access the Web App.

Application popup: Microsoft Visual C++ Runtime Library : Runtime Error!

Program: C:\Progr...

R6034 An application has made an attempt to load the C runtime library incorrectly. Please contact the application's support team for more information.

Exact screenshot of above error message is at http://imgur.com/hijiKv8

Please note that as part of my analysis I have tried

  • Accesing the apache page at http://127.0.0.1:8999 does show me the It Works ! message
  • Running the WEB App using the Django Development server and it launches fine.
  • Changing the wsgi.py file and when I introduce errors in the file deliberately, accessing the web app does complain with the relevant.

The application is installed on Windows Server 2003 SP1 and there are no automatic updates schedules on this machine so I am not suspecting that a update would have caused this problem. I also saw the Windows Update log and there was nothing installed recently.

The application is based on following Python Libraries as prerequisites

  • httpd-2.2.22-win32-x86-openssl-0.9.8t.msi
  • python-2.7.3
  • Django-1.4.3
  • psycopg2-2.4.6.win32-py2.7-pg9.2.2-release
  • cx_Oracle-5.1.2-10g.win32-py2.7
  • PIL-1.1.7.win32-py2.7
  • python-ldap-2.4.10.win32-py2.7
  • south-0.7.6
  • xlrd-0.9.0
  • xlwt-0.7.5
  • mod_wsgi.so

I have tried with the WSGIApplicationGroup %{GLOBAL} directive and setting the log level to debug and info but the resulting logs don't give any additional information.

I have posted apache debug level log at http://dpaste.com/1268653/ I have posted apache info level log at http://dpaste.com/1268660/

Both these logs were taken after a fresh restart of apache and then the application hanging and until I stopped apache and copied the logs.

I also tried running the Hello World Application as documented at https://code.google.com/p/modwsgi/wiki/ConfigurationGuidelines and it worked fine.

I still remain clueless. Appreciate if you could guide me what else I could do to get more details of the issue.

Appreciate if someone could guide me with respect to what more I can do to solve this problem or get more information to get to the root of this.

Was it helpful?

Solution

I was able to solve this issue in the end.

The post at Runtime error R6034 in embedded Python application led me to a solution.

Thanks to Graham Dumpleton and others who were helping me offline to get this issue solved.

It was rather cheeky in the end, a conflicting version of msvcr90.dll

I removed the IBM Bit from the path and it works fine now.

Process Explorer View

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top