[Moin-user] Slow degradation into CGI Error on IIS6, Server 2k3

Thomas Waldmann tw-public at gmx.de
Fri Jan 19 04:40:22 EST 2007

> Several months back, I sold my company on MoinMoin for its internal 
> documentation needs. Everyone loved the system, until this morning 
> when I came in and was greeted by a "CGI Error: The specified CGI 
> application misbehaved by not returning a complete set of HTTP 
> headers" when I tried to load the wiki.
Well, if it worked since months and you didn't change anything python or 
moin, maybe some other change (IIS/Windows updates?) broke it.
> The wiki is version 1.5.4, hosted on a Windows 2k3 box with IIS 6 and 
> Python 2.4. The wiki, of course, is served via Python CGI.
I personally never use neither windows for servers nor IIS for web 
servers. If you have a choice, maybe apache or even better apache/linux 
would be more stable.
> The first thing I did was inspect the output by invoking "python.exe 
> -u moin.cgi" from the command line. The output from this CGI looked 
> clean, and only differed from a functional test copy on my local 
> machine with a couple of caching headers--I have no idea why the 
> headers were different, but their absence in the production version 
> shouldn't make any difference, I think.
Maybe try to do repeated calls on the command line and see if it emits 
the same stuff every time. If you redirect the output to files, you 
maybe can see it looking at the file length.
If it does and requesting same page from IIS does sometimes work, 
sometimes not, I guess you have a IIS problem (because it also just 
calls the moin.cgi with python).
> Then I did an IIS reset.
What exactly does that mean?
> Wiki immediately came back up, but if I hammered it by holding down 
> Ctrl+R in my browser, it would hit the CGI error again. If I let it 
> sit for a minute and then refreshed again, the page would load 
> correctly. If I repeated this process several times and then let it 
> sit for a couple minutes, the Wiki would then refuse to load and 
> return the error on every load.
Even a CGI moin should be able to process multiple requests per second 
on a decent machine. I have never seen such behavior. I never use 
Windows/IIS. Maybe this is related? :)
> I thought maybe it was a problem with data so I created another test 
> instance on the production server--same problem. I thought maybe my 
> site-package had somehow been corrupted, so I tried replacing this 
> with an original source copy. No change.
Well, if you are changing code anyway, you might want to try a more 
recent version of moin, like 1.5.6. I am not sure that helps, but at 
least you have a more recent moin version afterwards.

The only other hint I can give is to try to find out more information 
about your problem. The stuff you posted is vague enough to not being of 
much help diagnosing your problem. Of course this is due to windows 
stuff emitting vague and unusable error messages most of the time and 
not your fault.

E.g. find out:
 * did moin emit ANY output when this error happens? if somehow IIS does 
not get anything at all, there are of course important headers missing, too.
 * if this was not the problem: what specific header(s) IIS is missing

If you have a misconfigured moin setup (that does not work at all) with 
apache, you also get some 500 server error, premature end of script 
headers (because it got nothing at all: no content and also no headers). 
But once you have a working setup, you should never see that again.

More information about the Moin-user mailing list