简体   繁体   中英

IIS 7.5 crashes after a few requests (with Django + PyISAPIe)

I managed to run Django using IIS as webserver (using PyISAPIe ) and everything goes well in my test server, mounting Windows 2008 Server R2 64bit.

Then I installed the application on another server with the same configuration and it works fine for the first request. Then when I reload the page, I get a "Service not working" page.

On the event log I see an Application error saying that python26.dll had some problems:

Faulting application name: w3wp.exe
Faulting module name: python26.dll
Exception code: 0x40000015
Faulting application path: C:\Windows\SysWOW64\inetsrv\w3wp.exe
Faulting module path: C:\Windows\system32\python26.dll

Can you give me some hint on how to solve that problem?

UPDATE : "Rapid-Fail Protection" in the Advanced Settings of the Application Pool was set to 5 failures; disabling it, all worked well.

So, now the question is: how can I detect what caused the failures?

UPDATE : I discovered that IIS crashes when there are multiple requests (img, css, js). PyISAPIe is called for each of them, passing them to static server once recognized. No idea why this happens...

PyISAPIe不是在Windows 2008上运行Django的好选择。在本文中,您可以找到更好的解决方案: 在Windows上运行Django(带有性能测试)

I discovered that IIS crashes when there are multiple requests (img, css, js). PyISAPIe is called for each of them, passing them to static server once recognized. No idea why this happens...

Do multiple request cause the error on both machines? When there are multiple requests in an ISAPI application, each request runs in its own thread. The Python multi-threading model is GLOBAL - all threads running under that Python process are co-mingled and sharing all global resources, so you must serialize all multi-threaded code running in all applications and processes using your Python engine. This is a serious downside in Python multi-threaded processing and may be the source of your problems. See http://docs.python.org/library/multiprocessing.html and other sources.

But even this only occurs on one machine and not the other, that may still be the cause - it could also depend on many other environmental variables - number of requests, resources of the machine, processors, etc.

Check the eventlog it should be in there.

You may also find some more detail in the httperror log (C:\\Windows\\System32\\LogFiles\\HTTPERR).

检查机器上的内存使用情况(物理总量)。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM