Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 500.0 on IIS - The FastCGI process exited unexpectedly #5450

Closed
CarloPoletto opened this issue Jul 19, 2019 · 2 comments
Closed

Error 500.0 on IIS - The FastCGI process exited unexpectedly #5450

CarloPoletto opened this issue Jul 19, 2019 · 2 comments

Comments

@CarloPoletto
Copy link

Hi all,

I developed a Python application in Django using IIS as a web server. Until a few days ago, I used Python 2.7.15 and everything was ok. This week I decided to upgrade the Python version to 3.7 as next year version 2.7 will be deprecated. The application update went very well but now I can no longer host it with IIS due to the following error: Error 500.0 - Internal Server Error The FastCGI process exited unexpectedly

This is my initial configuration:

  • Python 3.7.4
  • Django 1.11.17
  • wfastcgi 3.0.0
  • virtualenv 16.6.2

After reading several topics on the subject, I realized that wfastcgi is not compatible with Python 3.7. For this reason I tried to downgrade the application to Python 3.6.8 but nothing has changed. I also read some topics (very old indeed) where it was said that wfastcgi has problems with Python 3.5 and beyond. Although it seemed very strange to me (the PyPi page declares a compatibility up to Python 3.6), I tried to use Python 3.4.2 but I realized that it has already been deprecated and therefore I discard it.

This is my web.config configuration:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <location overrideMode="Deny">
        <system.webServer>
            <handlers>
                <add name="Django Handler" 
                     path="*" 
                     verb="*" 
                     modules="FastCgiModule" 
                     scriptProcessor="C:\MyProject\virtualenv\Scripts\python.exe|C:\MyProject\virtualenv\Lib\site-packages\wfastcgi.py" 
                     resourceType="Unspecified" 
                     requireAccess="Script" />
        </handlers>
    </system.webServer>

    <appSettings>
        <!-- Required settings -->
        <add key="WSGI_HANDLER" value="django.core.wsgi.get_wsgi_application()" />
        <add key="PYTHONPATH" value="C:\MyProject" />

        <!-- Optional settings -->
        <add key="DJANGO_SETTINGS_MODULE" value="myproject.settings" />
    </appSettings>
</location>
@CarloPoletto
Copy link
Author

After several attempts I tried to install Python 3.6.8 in C:/Python36 (previously it was in C:/Users/MyUser/AppData/Local/Programs/Python/Python36). This seems to have solved the problem.

@RaymonGulati1
Copy link
Contributor

Glad you solved it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants