Manfred Lotz | 1 May 2012 04:43
Picon
Favicon

Re: Print a page in moinmoin

On Mon, 30 Apr 2012 23:21:33 +0200
Paul Boddie <paul <at> boddie.org.uk> wrote:

> On Monday 30 April 2012 21:59:40 Manfred Lotz wrote:
> >
...
> 
> My solution is to leave the actual print settings on some kind of
> sane default unless I really want to print four pages per side/sheet,
> and to try and have things like paper sizes mostly in agreement. I
> have also in the past printed to PDF to get something that won't be
> mysteriously rescaled or reformatted and then printed that PDF file.
> 

I agree. It seems to be the best not to touch the print settings in the
browser, and if I have special needs to print to a pdf document. Then I
could try whatever I want.

--

-- 
Thanks,
Manfred

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Mark Scheufele | 2 May 2012 11:11

Re: xapian search: an unhandled win32 exception occured in w3wp.exe

Hi Thomas,

I was now able to track down to code that triggers IIS to throw the unhandled exception.
It appears within the  _indexingRequest() method  of the MoinMoin\search\builtin.py module.

I did the following:

	- inserted a breakpoint into the code using winpdb and restarting the wiki
	- after updating a page over the web I could step through the lines of _indexingRequest() until a copy of the
request object is being made. This causes the exception within IIS

   def _indexingRequest(self, request):
        """ Return a new request that can be used for index building.

        This request uses a security policy that lets the current user
        read any page. Without this policy some pages will not render,
        which will create broken pagelinks index.

         <at> param request: current request
        """
        import copy
        from MoinMoin.security import Permissions
        from MoinMoin.logfile import editlog

        class SecurityPolicy(Permissions):

            def read(self, *args, **kw):
                return True
        import rpdb2
        rpdb2.start_embedded_debugger("""...Removed-password-from-output...""")
(Continue reading)

Mark Scheufele | 2 May 2012 14:30

Re: xapian search: an unhandled win32 exception occurred in w3wp.exe

Hi,

I did file a bug at http://moinmo.in/MoinMoinBugs  regarding the issue. The page name of the bug is 
"1.9.3XapianNoIndexUpdateAtPageIfRunningIIS". Would it be possible to rename the page to
"1.9.3XapianNoIndexUpdateAtPageChangeIfRunningIIS" to make it a bit more meaningful.

Many Thanks,

mark
_______________________________________________________________________________________

Dialog Semiconductor GmbH
Neue Str. 95
D-73230 Kirchheim
Managing Directors: Dr. Jalal Bagherli, Jean-Michel Richard
Chairman of the Supervisory Board: Gregorio Reyes
Commercial register: Amtsgericht Stuttgart: HRB 231181
UST-ID-Nr. DE 811121668

Legal Disclaimer: This e-mail communication (and any attachment/s) is confidential and 
contains proprietary information, some or all of which may be legally privileged. It is 
intended solely for the use of the individual or entity to which it is addressed. Access 
to this email by anyone else is unauthorized. If you are not the intended recipient, any
disclosure, copying, distribution or any action taken or omitted to be taken in reliance
on it, is prohibited and may be unlawful.

Please consider the environment before printing this e-mail

------------------------------------------------------------------------------
Live Security Virtual Conference
(Continue reading)

Christopher MacMinn | 2 May 2012 16:00
Picon
Favicon

Diagnose and fix performance problems?

Hello MoinMoin -


I used MoinMoin to build a website for my former research group at MIT, and it has worked well for them so far (http://juanesgroup.mit.edu). The servers are internal to MIT and we have limited control over them.

As it stands, the website has some performance problems -- sometimes it's quick, and sometimes it takes 10 seconds or more to load a page. I'm looking for suggestions on how to diagnose and fix this sluggishness. It could stem from the servers, from MoinMoin, or from less-than-optimal HTML, CSS, javascript, or Moin configuration that I did myself. Any help would be greatly appreciated -- thanks!

Best, Chris MacMinn
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Moin-user mailing list
Moin-user <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/moin-user
Thomas Waldmann | 2 May 2012 18:48
Picon
Picon

Re: xapian search: an unhandled win32 exception occured in w3wp.exe

> I was now able to track down to code that triggers IIS to throw the unhandled exception.

That's interesting, but please let's keep the information on the wiki
bug page (noone will dig through the mailing list when trying to fix
bugs).

>         r = copy.copy(request)	<-- IIS exception is caused

Oops, that's strange.

> Exception RuntimeError: 'maximum recursion depth exceeded while calling a Python object' in <type
'exceptions.AttributeError'> ignored

If you just see that in the log, without the usual traceback, it likely
means that there was a (rather simple) error handler that catched it and
just logged minimal information.

> Yet it seems that the standalone script handles the condition more gracefully than if the code is executed
as ISAPI application under the command of IIS.

Well, or it does not happen at all there. Maybe the "request" object has
something that causes issues with copy in one case, but not in the
other?

> There is also one more thing I cannot understand. When I run the standalone script an exception is being
reported yet I am not able to catch it.

If there is a more "inner" error handler that catches it, your handler
won't get it.

> Apart from this mail I will also file a bugreport at http://moinmo.in/MoinMoinBugs describing my setup
and all the observations I have already made.

Great! :)

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Thomas Waldmann | 2 May 2012 18:49
Picon
Picon

Re: xapian search: an unhandled win32 exception occurred in w3wp.exe

> I did file a bug at http://moinmo.in/MoinMoinBugs  regarding the issue.
> The page name of the bug is  "1.9.3XapianNoIndexUpdateAtPageIfRunningIIS".
> Would it be possible to rename the page to "1.9.3XapianNoIndexUpdateAtPageChangeIfRunningIIS" to
make it a bit more meaningful.

Sure, just rename it (you need to be logged in).

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Thomas Waldmann | 2 May 2012 19:03
Picon
Picon

Re: Diagnose and fix performance problems?

Hi Chris,
> 
> I used MoinMoin to build a website for my former research group at
> MIT, and it has worked well for them so far
> (http://juanesgroup.mit.edu). The servers are internal to MIT and we
> have limited control over them.

Nicely themed moin 1.9.4. :)
> 
> As it stands, the website has some performance problems -- sometimes
> it's quick, and sometimes it takes 10 seconds or more to load a page.
> I'm looking for suggestions on how to diagnose and fix this
> sluggishness. It could stem from the servers, from MoinMoin, or from
> less-than-optimal HTML, CSS, javascript, or Moin configuration that I
> did myself. Any help would be greatly appreciated -- thanks!

Well, without more infos and without server shell access it is a bit
hard to help.

Look into web server logs (apache access log / error log), compare times
when wiki is fast to times when it is slow.

Did you use apache/mod-wsgi or cgi? cgi is slow.

Look at machine load (linux: "top") when wiki is fast vs. when wiki is
slow. Look which process is eating cpu.

Is it when you are doing specific wiki requests? Like after saving?

If you can't get it solved, talk to me.

Cheers,

Thomas

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Christopher MacMinn | 2 May 2012 19:22
Picon
Favicon

Re: Diagnose and fix performance problems?

Hi Thomas -

Thanks for your reply!

>> I used MoinMoin to build a website for my former research group at MIT
>
> Nicely themed moin 1.9.4. :)

Thanks! Our goal was for it to function like a wiki for logged-in
users, but to look like a normal webpage to everyone else.

>> As it stands, the website has some performance problems -- sometimes
>> it's quick, and sometimes it takes 10 seconds or more to load a page.
>
> Well, without more infos and without server shell access it is a bit
> hard to help.
>
> Look into web server logs (apache access log / error log), compare times
> when wiki is fast to times when it is slow.

> Look at machine load (linux: "top") when wiki is fast vs. when wiki is
> slow. Look which process is eating cpu.

I will do that.

> Did you use apache/mod-wsgi or cgi? cgi is slow.

Our servers do not offer mod_wsgi, so I think we're currently using
some sort of WSGI<--> Fast CGI wrapper. Could this be a major cause of
the problems?

> Is it when you are doing specific wiki requests? Like after saving?

It can happen any time, but we're primarily worried about normal page
loading rather then page editing. It's ok (though annoying) for it to
be slow on our end, but we definitely want to it be fast for everyone
else who visits.

Thanks much for your help!
Best, Chris

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Thomas Waldmann | 3 May 2012 00:15
Picon
Picon

Re: Diagnose and fix performance problems?

> > Did you use apache/mod-wsgi or cgi? cgi is slow.
> 
> Our servers do not offer mod_wsgi, so I think we're currently using
> some sort of WSGI<--> Fast CGI wrapper. Could this be a major cause of
> the problems?

Well, I can't tell much about the layers below moin (esp. not for
software I do not use myself), but in principle, fastcgi should be of
almost same performance as mod-wsgi. A little more software (likely
flup) in between moin and web server, but still fast.

Plain CGI (not fastcgi) means loading and initializing all the code for
each request and terminating after that one request is processed.

FastCGI as well as mod-wsgi means long-running processes which are only
rarely terminated and restarted and thus is much faster and less
overhead.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Paul Boddie | 3 May 2012 01:25
Picon

Re: Diagnose and fix performance problems?

On Thursday 03 May 2012 00:15:31 Thomas Waldmann wrote:
> > > Did you use apache/mod-wsgi or cgi? cgi is slow.
> >
> > Our servers do not offer mod_wsgi, so I think we're currently using
> > some sort of WSGI<--> Fast CGI wrapper. Could this be a major cause of
> > the problems?
>
> Well, I can't tell much about the layers below moin (esp. not for
> software I do not use myself), but in principle, fastcgi should be of
> almost same performance as mod-wsgi. A little more software (likely
> flup) in between moin and web server, but still fast.
>
> Plain CGI (not fastcgi) means loading and initializing all the code for
> each request and terminating after that one request is processed.

Although Thomas wrote that CGI is slow, it isn't necessarily super-slow, just 
slow compared to WSGI. Even then, there are lots of things that can overwhelm 
the overhead of CGI in terms of performance costs, even if you've switched to 
WSGI and are convinced that everything should be much faster.

The classic example of this is any functionality that makes use of page 
searching: perhaps long-running processes may be fortunate when scanning 
pages for, say, category information if it gets cached over time (although 
the filesystem cache would help for CGI processes, too), but enabling Xapian 
for Moin 1.x provides significant benefits regardless of the means of 
deployment.

> FastCGI as well as mod-wsgi means long-running processes which are only
> rarely terminated and restarted and thus is much faster and less
> overhead.

Agreed. Still, if things are taking 10 seconds and there isn't some kind of 
pathological script reloading going on, it may be something other than the 
deployment technology.

I have in the past enabled the timing information to spot bottlenecks, 
although this merely indicated that searches were slow and that I should 
enable Xapian support. On your site, the only unusual stuff looks like some 
banner-related JavaScript and the delightful Google Analytics code. Nothing 
like fancy but expensive Moin macros as far as I can tell.

Paul

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

Gmane