0

I've successfully managed to setup django + IIS with fastcgi using this guide: https://pypi.python.org/pypi/wfastcgi
I've came across some problems:
1. I can't find a way to see error log - the python traceback, in apache with wsgi the traceback can be found in error.log, how can the same be done with IIS?

  1. I've noticed that once in a while, after the site is "inactive" (no connections for a while), the next first request will be very slow. I've found related questions like this:
    IIS and ISAPI-WSGI = very slow
    But the accepted answer isn't going to be very useful to me, since I need to run it on IIS. /
Community
  • 1
  • 1
user3599803
  • 6,435
  • 17
  • 69
  • 130

1 Answers1

1

From https://pypi.python.org/pypi/wfastcgi#route-handlers: 1. your WSGI_LOG location needs to be writable by the user your site runs under (the application pool user), so check the file permissions.

2: what's your IIS version? A slow application start-up is normal, but starting from IIS 7.5 you can enable AlwaysRunning as the application pool Start Mode, so the application pool is automatically started after a shut down. Do check your Idl Time-out (minutes) and Idle Time-out Action settings as well.

Jan Reilink
  • 458
  • 5
  • 15
  • Ok, I didn't have a WSGI_LOG key, so I've defined it and set up permissions. But still this log doesn't contain error log (python traceback) like apache used too. Just lines like: '2016-05-24 17:13:23.449000: wfastcgi.py will restart when files in c:\inetpub\wwwroot\ are changed: .*((\.py)|(\.config))$' – user3599803 May 24 '16 at 14:21
  • My IIS ver is 7.5. I didn't understand where I enable the "AlwaysRunning"? I go to Application Pools-> DefaultAppPool, then? – user3599803 May 24 '16 at 14:23
  • (note: I may be mixing IIS versions and capabilities, I only have 8.5 available to me). Bring up the Advanced Settings of the application pool your app runs in. As Start Mode you _should_ have two options: OnDemand and AlwaysRunning – Jan Reilink May 24 '16 at 17:14
  • 1
    Under which category in these Advanced Settings you found it? The closest options I see are: Start automatically (under "General"), and Startup Time Limit (under "Process model"). – user3599803 May 24 '16 at 17:58