= Description =
## Please read this page. Lines prefixed with ## such as this one are comments,
## you can remove them (except for those after the "Plan" section.)
## Please follow the instructions given in those comments and the text.
## After creating the bug page, please subscribe to it! We may have questions
## that only you can answer, and if you get email when your bug changes it'll
## be much faster to get it fixed since you can answer the questions!
I have !MoinMoin set up with Apache and WSGI.  It has been working fine until recently, when I have noticed intermittent problems.  Twice, I have updated a page, been thanked for my attention to detail – ''and on the same page been told that the page doesn't exist!''  Visiting the page again does not help, but restarting Apache does.  A colleague was editing the front page and on about the fifth preview was told there was an edit conflict; looking at the conflicting versions, the "current" one was the original version of the front page before anybody had edited it!  (It has been edited many times.)

== Steps to reproduce ==
## Describe the steps needed to reproduce the bug. If we can't reproduce it, we  probably can't fix it.
I wish I knew!

Apologies for the lack of information.  I know intermittent problems are the worst to fix.  I'll provide more information when I can.

== Example ==
If/when it happens again I'll post a screen shot or something.

##Add URL that show the bug, screenshot or test wiki markup that fail...
##URL:
##{{attachment:screenshot.png}}
##{{{
##Example wiki markup that fail
##}}}
== Component selection ==
## Where you think is this bug happening ? (general, plugin [plugin name], theme [theme name], ...
 * general

== Details ==
## If you got a traceback, please save the traceback page as html and attach here:
## [[attachment:traceback.html]]
## if the bug is in this wiki, just kill the table and write: This Wiki.
## If a traceback is not available, please fill in the details here:
||'''!MoinMoin Version''' ||1.9 ||
||'''OS and Version''' ||Windows Server 2003 ||
||'''Python Version''' ||2.6.4 ||
||'''Server Setup''' ||Apache 2.2 + WSGI ||
||'''Server Details''' ||Apache version 2.2.14 ||
||'''Language you are using the wiki in''' (set in the browser/UserPreferences) ||English ||


== Workaround ==
## How to deal with the bug until it is fixed
Restart Apache fixes one of the two issues (until it happens again).

= Discussion =
Your WSGI Version is maybe buggy or just old. You should upgrade to 3.1 (http://code.google.com/p/modwsgi/). I can also remember some bug in wsgi 2.2 or 2.3. Maybe this leads to your errors. -- MarcelHäfner <<DateTime(2010-02-09T14:48:09+0200)>>

 . Thanks.  I'm currently using version 3.0 because I needed a precompiled version (http://code.google.com/p/modwsgi/downloads/detail?name=mod_wsgi-win32-ap22py26-3.0.so) to work with Python 2.6.4.  I've updated to !MoinMoin 1.9.1 now, so I'll see if that fixes things.  I'll also try compiling WSGI v3.1.  -- RichardWiseman <<DateTime(2010-02-09T13:37:00+0000)>>

 . Well it sounds ([[http://code.google.com/p/modwsgi/wiki/InstallationOnWindows#Compiling_From_Source_Code|here]]) like compiling WSGI 3.1 should be easy, but it certainly wasn't!  The normal installation of Apache on Windows doesn't come with all the required header files, and the Apache source has to be compiled in order to generate some of them.  Then they have to be copied elsewhere along with `.lib` files in order to eventually compile WSGI.  So certainly not as straightforward as a single `nmake` command!  Anyhow, the new version seems to work OK.  I'll obviously mention here if the original problem recurs.  Thanks again for the help Marcel. -- RichardWiseman <<DateTime(2010-02-09T15:09:00+0000)>>

 . :-( I'm not sure that fixed it.  I've just had another issue where I made an update, it was successfully saved but this time the displayed version was the previous one.  Restarting Apache caused the right one to be displayed.  Could this be WSGI caching issue?  Viewing, reloading and shift-reloading the page just kept displaying the old (previous) version of it.  Can I perhaps turn on debugging somehow? -- RichardWiseman <<DateTime(2010-02-10T09:05:00+0000)>>

I don't know exactly what's causing this, but I would rather suspect moin (caching or "backend" code) or windows (filesystem calls/implementation limits) than mod_wsgi. -- ThomasWaldmann <<DateTime(2010-02-10T12:53:30+0100)>>

 . Is there anything I can do to help track this down?  Are there, for example, any files I should grab copies of if/when it happens again?  (Something that may or may not be relevant: I'm pretty sure I cleared the cache yesterday, but there didn't seem to be much feedback when I used the `moin ... maint cleancache` command.  I'd hoped it would say the caches had been cleared, or that when I looked in the data/cache directory it would basically be empty.  I must confess, though, it doesn't help that I'm not really sure what caching is done in !MoinMoin!) -- RichardWiseman <<DateTime(2010-02-10T15:17:00+0000)>>

The caching I was referring to is in RAM, you can't see it in the filesystem. The observed behaviour also rather looks like it is a in-memory issue, because if it would be some "damaged" file or directory, restarting the web server would not help. I guess the best thing you can do is to research how to make it happen with highest frequency, so some developer could try to reproduce it. If it is a windows issue, it would need someone developing/debugging on windows. You could also try it on Linux and see whether it happens there, too. IIRC, I did not see that bug HERE in this wiki, yet. -- ThomasWaldmann <<DateTime(2010-02-10T18:47:35+0100)>>

 . That makes sense.  Sadly, it does appears to be one of those annoying intermittent problems that doesn't happen very often and where attempting to repeat apparently-problematic steps doesn't have the same effect!  I'll see what I can discover, however, and document anything of note here.  Thanks for the suggestions. -- RichardWiseman <<DateTime(2010-02-11T09:00:01+0000)>>
 . PS - Does everyone but me have some clever, sneaky way of inserting the current time into the !DateTime macro?  I tend to use Text Mode to edit pages but couldn't see a button on GUI Mode to do it!
  . Aha!  `@``SIG@`!  :-) -- RichardWiseman <<DateTime(2010-02-11T09:16:08Z)>>
  . @``DATE@, @``TIME@, @``TIMESTAMP@, http://master19.moinmo.in/HelpOnVariables -- EugeneSyromyatnikov <<DateTime(2010-02-11T09:45:04Z)>>

Perhaps a memtest could clarify if your RAM is broken -- ReimarBauer <<DateTime(2010-02-10T22:41:10+0100)>>

 . Whilst that is a good idea, I don't have easy physical access to the server and it appears (understandably I suppose) that memory test tools only come in bootable-disk form.  I'll have to see when I can create the disk and put it in the server... -- RichardWiseman <<DateTime(2010-02-11T09:00:01+0000)>>

= Plan =
## This part is for Moin``Moin developers:
 * Priority:
 * Assigned to:
 * Status:

----
## If you are a moin core developer, replace the category to Category* in these cases:
## Category MoinMoinNoBug - if this is not a bug.
## Category MoinMoinBugConfirmed - if you can confirm the bug on current code.
## Category MoinMoinBugFixed - after the bug is fixed in current code.
CategoryMoinMoinBug