Mailing List Archive

Regarding delay
Hello,
If this is where Wiki administrators can ask general questions about their installation please read on. Otherwise ignore this message (sorry).

I have just installed mediawiki 1.3.7 on a linux box (debian) and installation seemed to go smoothly and correctly. The only problem I have is, when entering any link ( even index page) there is a 5 sec delay before anything appears. At first I thought it was something wrong with mysql user or database itself, but I can create an account and everything seems fine except the delay. I have tried reading all the FAQ and googled my problem, yet without any results. Is this a common problem or is there a unique error I might have somewhere?

I am not sure if it is a problem with mysql or PHP4, but before this instalation I had a site engine that was also using php4 parsing which worked correctly and a phpbb forum that used both.

The site it is currently residing in is www.nerdinside.net.

Thanks in advance.
Re: Regarding delay [ In reply to ]
N. Mourtos wrote:
> Hello, If this is where Wiki administrators can ask general questions
> about their installation please read on. Otherwise ignore this
> message (sorry).
>
> I have just installed mediawiki 1.3.7 on a linux box (debian) and
> installation seemed to go smoothly and correctly. The only problem I
> have is, when entering any link ( even index page) there is a 5 sec
> delay before anything appears. At first I thought it was something
> wrong with mysql user or database itself, but I can create an account
> and everything seems fine except the delay. I have tried reading all
> the FAQ and googled my problem, yet without any results. Is this a
> common problem or is there a unique error I might have somewhere?
>
> I am not sure if it is a problem with mysql or PHP4, but before this
> instalation I had a site engine that was also using php4 parsing
> which worked correctly and a phpbb forum that used both.
>
> The site it is currently residing in is www.nerdinside.net.
>
> Thanks in advance.

I recently had a delay like that after upgrading. It was due to the
rewrite rules causing the program to look in the wrong place for the
style sheets and javascript files.

--
Paul Sinnett
Freelance video game programmer
http://gamecontractor.org/Paul_Sinnett
Re: Regarding delay [ In reply to ]
> I recently had a delay like that after upgrading. It was due to the
> rewrite rules causing the program to look in the wrong place for the
> style sheets and javascript files.

1.3.6 and 1.3.7 are terribly, terribly slow for me, and I don't use
rewrite rules at all

I spent ages putting Apache and MySQL into highperformance modes,
recompiled most of the OS for Pentium III, tweaked anything I could
to get a speed boost, with little effect. Went back to 1.3.5 and it
was fast again, faster than before due to the tweaks.

For some reason I can't think of any reason for, Mozilla looks for
favicon.ico about 20 times on 1.3.7 and only about 4 times on 1.3.5.
So its possible there is some rewrite-looking-for-stuff going on.

Cian
Re: Regarding delay [ In reply to ]
On Nov 2, 2004, at 9:39 AM, Cian Duffy wrote:
>> I recently had a delay like that after upgrading. It was due to the
>> rewrite rules causing the program to look in the wrong place for the
>> style sheets and javascript files.
>
> 1.3.6 and 1.3.7 are terribly, terribly slow for me, and I don't use
> rewrite rules at all

If you're using $wgWhitelistRead, make sure that the style sheets and
.js pages are accessible.

If not, could you provide some details of your configuration that might
be different from the defaults?

-- brion vibber (brion @ pobox.com)
Re: Regarding delay [ In reply to ]
> If you're using $wgWhitelistRead, make sure that the style sheets and
> .js pages are accessible.

I was then, I'm not now...

Another issue I noticed then but haven't checked since was that when
$wgWhitelistRead was on, IE users got a script error on the front page
if not logged in and didn't if logged in. I don't use Windows so I
haven't checked since.

> If not, could you provide some details of your configuration that might
> be different from the defaults?

Err, where to start...

My 1.3.5 was extensively modified, although not on any of the files
1.3.6 changed. I've got $wgWhitelistEdit (I think thats what its
called) turned on, the copyright notice on the edit page hacked out,
extra buttons added to the editbox, and a few other random hackjobs to
make it work better in the enviroment I use it. But no major changed
to config files.

Cian
Re: Regarding delay [ In reply to ]
On Nov 2, 2004, at 10:08 AM, Cian Duffy wrote:
> My 1.3.5 was extensively modified, although not on any of the files
> 1.3.6 changed. I've got $wgWhitelistEdit (I think thats what its
> called) turned on, the copyright notice on the edit page hacked out,
> extra buttons added to the editbox, and a few other random hackjobs to
> make it work better in the enviroment I use it. But no major changed
> to config files.

Is your site on the public internet? If I can poke at it, it might be
easier to diagnose.

-- brion vibber (brion @ pobox.com)
Re: Regarding delay [ In reply to ]
>
> Is your site on the public internet? If I can poke at it, it might be
> easier to diagnose.

I actually don't know.... Network admin did set up a hostname for it
(khost.finance.gov.ie), but I'm not sure it was actually propogated
out to to web. I can't actually tell because I'm on the Intranet here.
Re: Regarding delay [ In reply to ]
DNS error with khost.finance.gov.ie, but it's fine with finance.gov.ie
(though I can't find khost on there).

However, I did have success with www.dnsstuff.com by viewing the DNS
transversal ( http://www.dnsstuff.com/tools/traversal.ch?domain=khost.finance.gov.ie&type=A
).

Basically, the domain name hasn't propogated yet. Try again in a little while.

On Tue, 2 Nov 2004 20:06:15 +0100, Cian Duffy <myob87@gmail.com> wrote:
> >
> > Is your site on the public internet? If I can poke at it, it might be
> > easier to diagnose.
>
> I actually don't know.... Network admin did set up a hostname for it
> (khost.finance.gov.ie), but I'm not sure it was actually propogated
> out to to web. I can't actually tell because I'm on the Intranet here.
>
>
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l@Wikimedia.org
> http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
>


--
-------------------------------------------------------------------
http://endeavour.zapto.org/astro73/
Thank you to JosephM for inviting me to Gmail!
Re: Regarding delay [ In reply to ]
I just installed mediawiki 1.3.5 and I am having the same time delayed
problems as version 1.3.7. I am not exactly sure what my problem is. The
site that it is installed on currently is
www.nerdinside.net/mediawiki-1.3.5/ . I really don't know where to start
looking for my problems. Any suggestions?

----- Original Message -----
From: "Cian Duffy" <myob87@gmail.com>
To: "MediaWiki announcements and site admin list"
<mediawiki-l@wikimedia.org>
Sent: Tuesday, November 02, 2004 12:39 PM
Subject: Re: [Mediawiki-l] Regarding delay


>> I recently had a delay like that after upgrading. It was due to the
>> rewrite rules causing the program to look in the wrong place for the
>> style sheets and javascript files.
>
> 1.3.6 and 1.3.7 are terribly, terribly slow for me, and I don't use
> rewrite rules at all
>
> I spent ages putting Apache and MySQL into highperformance modes,
> recompiled most of the OS for Pentium III, tweaked anything I could
> to get a speed boost, with little effect. Went back to 1.3.5 and it
> was fast again, faster than before due to the tweaks.
>
> For some reason I can't think of any reason for, Mozilla looks for
> favicon.ico about 20 times on 1.3.7 and only about 4 times on 1.3.5.
> So its possible there is some rewrite-looking-for-stuff going on.
>
> Cian
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l@Wikimedia.org
> http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Re: Regarding delay [ In reply to ]
On Nov 2, 2004, at 6:53 PM, N. Mourtos wrote:
> I just installed mediawiki 1.3.5 and I am having the same time
> delayed problems as version 1.3.7. I am not exactly sure what my
> problem is. The site that it is installed on currently is
> www.nerdinside.net/mediawiki-1.3.5/ . I really don't know where to
> start looking for my problems. Any suggestions?

There is not any recursive redirection on your server (the typical
complaint regarding 1.3.7); simply your wiki is taking an uncomfortably
long time to return a response -- about 9-10 seconds. Static files and
declarative PHP script loads are relatively quick (under a second,
anyway), so it's probably not Apache to blame.

The first thing I need to ask: is this server simply a slow machine, or
perhaps highly loaded?

Second: are you using a PHP acceleration cache module (such as Turck
MMCache, Zend Optimizer, PHPA, or APC)? If not, you should -- a
significant portion of execution time is typically spent parsing the
PHP scripts on a vanilla PHP installation. (We use Turck on Wikipedia.)

Third: is the database server local or remote? Is it highly loaded?
Slow round-trip times to an external server could slow things down a
lot.

Fourth: Have you customized LocalSettings.php in any way? Some things
like enabling memcached support without a working memcached server can
turn your wiki into a tarpit instantly.

Fifth: try adding this line to LocalSettings.php:
$wgUseDatabaseMessages = false;
Normally it will not make much impact, but if there's something wrong
it's conceivable that the wiki might be trying to re-cache the user
interface messages from the database server on every hit. If it doesn't
seem to make a difference, leave it at true -- it's easier to customize
your wiki that way.

Finally: if nothing obvious stands out above, turn on the internal
profiling:
$wgDebugLog = "/tmp/some-file-name";
$wgProfiling = true;
Load some pages and look at the output report to see if there's a
localized hotspot. (Times reported are milliseconds total spent in that
function/section and average per-call during the request. Some sections
will be bloated by time for including of PHP code or output buffer
flush delays. Function times include functions called from that
function.)

-- brion vibber (brion @ pobox.com)
Re: Regarding delay [ In reply to ]
Well as in my first post with the original problem, this machine is a little
slow but can definitely handle the loads. mysql is local ( very small loads)
and I am not using any php acceleration modules, there has never been a
need. I have not configured LocalSettings.php at all, this is a stock
installation. Just was wondering if this is a common problem with stock
installations of mediawiki? I certainly cannot find the problem.

I have tried your suggestions yet still no (noticeable) difference.


----- Original Message -----
From: "Brion Vibber" <brion@pobox.com>
To: "MediaWiki announcements and site admin list"
<mediawiki-l@Wikimedia.org>
Sent: Tuesday, November 02, 2004 10:24 PM
Subject: Re: [Mediawiki-l] Regarding delay
On Nov 2, 2004, at 6:53 PM, N. Mourtos wrote:
> I just installed mediawiki 1.3.5 and I am having the same time
> delayed problems as version 1.3.7. I am not exactly sure what my
> problem is. The site that it is installed on currently is
> www.nerdinside.net/mediawiki-1.3.5/ . I really don't know where to
> start looking for my problems. Any suggestions?

There is not any recursive redirection on your server (the typical
complaint regarding 1.3.7); simply your wiki is taking an uncomfortably
long time to return a response -- about 9-10 seconds. Static files and
declarative PHP script loads are relatively quick (under a second,
anyway), so it's probably not Apache to blame.

The first thing I need to ask: is this server simply a slow machine, or
perhaps highly loaded?

Second: are you using a PHP acceleration cache module (such as Turck
MMCache, Zend Optimizer, PHPA, or APC)? If not, you should -- a
significant portion of execution time is typically spent parsing the
PHP scripts on a vanilla PHP installation. (We use Turck on Wikipedia.)

Third: is the database server local or remote? Is it highly loaded?
Slow round-trip times to an external server could slow things down a
lot.

Fourth: Have you customized LocalSettings.php in any way? Some things
like enabling memcached support without a working memcached server can
turn your wiki into a tarpit instantly.

Fifth: try adding this line to LocalSettings.php:
$wgUseDatabaseMessages = false;
Normally it will not make much impact, but if there's something wrong
it's conceivable that the wiki might be trying to re-cache the user
interface messages from the database server on every hit. If it doesn't
seem to make a difference, leave it at true -- it's easier to customize
your wiki that way.

Finally: if nothing obvious stands out above, turn on the internal
profiling:
$wgDebugLog = "/tmp/some-file-name";
$wgProfiling = true;
Load some pages and look at the output report to see if there's a
localized hotspot. (Times reported are milliseconds total spent in that
function/section and average per-call during the request. Some sections
will be bloated by time for including of PHP code or output buffer
flush delays. Function times include functions called from that
function.)

-- brion vibber (brion @ pobox.com)


> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l@Wikimedia.org
> http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
>
Re: Regarding delay [ In reply to ]
Don't know if this helps much but I just logged the current apache ps while
clicking some links in mediawiki. These are VERY unsually high CPU % yields.
Usually any process apache runs takes up 2% of the CPU for maybe a fraction
of a second. I have only clicked 3 links over 40 seconds so these numbers
are quite startling to me. I just used

Email:~# top d 1 p 15355 b S > stats
You can look at the stats nicely with a simple :

Email:~#: cat stats| grep apache
The stats file is available at http://nerdinside.net/stats
This will show the CPU% taken up by the process, its the 4th column from the
right.
I am leaning towards the conclusion that my box is way too slow for this
engine, yet I don't know why.


----- Original Message -----
From: "Brion Vibber" <brion@pobox.com>
To: "MediaWiki announcements and site admin list"
<mediawiki-l@Wikimedia.org>
Sent: Tuesday, November 02, 2004 10:24 PM
Subject: Re: [Mediawiki-l] Regarding delay


> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l@Wikimedia.org
> http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
>
Re: Regarding delay [ In reply to ]
On Nov 3, 2004, at 5:41 AM, N. Mourtos wrote:
> Well as in my first post with the original problem, this machine is a
> little slow but can definitely handle the loads.

Can you be more specific as to how slow it is? From here we can't tell
whether you're running a 486 or a Pentium 4. If you're on the 486 end
of the scale, then I'm not too surprised that it's sluggish. :)

> mysql is local ( very small loads) and I am not using any php
> acceleration modules, there has never been a need.

I highly, highly, highly recommend a PHP acceleration module. Have you
tried it? Which one? Can you confirm that it's enabled? (Check
phpinfo() output for a section showing the module's version and
settings.)

> I have not configured LocalSettings.php at all, this is a stock
> installation. Just was wondering if this is a common problem with
> stock installations of mediawiki? I certainly cannot find the problem.
>
> I have tried your suggestions yet still no (noticeable) difference.

Did you enable profiling to see which functions are taking up how much
time? Could you post the output?

-- brion vibber (brion @ pobox.com)
Re: Regarding delay [ In reply to ]
It is a P 133. Has handled well under heavy mysql use. I can only assume
that there isn't a php acceleration module enabled because I have never
explicitly installed one (in fact I dont have much experience with
acceleration modules). I have enabled profiling but the logs do not appear
where they should. Either they aren't being generated because of some
syntactical error or another unknown error.

----- Original Message -----
From: "Brion Vibber" <brion@pobox.com>
To: "MediaWiki announcements and site admin list"
<mediawiki-l@Wikimedia.org>
Sent: Wednesday, November 03, 2004 1:36 PM
Subject: Re: [Mediawiki-l] Regarding delay
On Nov 3, 2004, at 5:41 AM, N. Mourtos wrote:
> Well as in my first post with the original problem, this machine is a
> little slow but can definitely handle the loads.

Can you be more specific as to how slow it is? From here we can't tell
whether you're running a 486 or a Pentium 4. If you're on the 486 end
of the scale, then I'm not too surprised that it's sluggish. :)

> mysql is local ( very small loads) and I am not using any php
> acceleration modules, there has never been a need.

I highly, highly, highly recommend a PHP acceleration module. Have you
tried it? Which one? Can you confirm that it's enabled? (Check
phpinfo() output for a section showing the module's version and
settings.)

> I have not configured LocalSettings.php at all, this is a stock
> installation. Just was wondering if this is a common problem with
> stock installations of mediawiki? I certainly cannot find the problem.
>
> I have tried your suggestions yet still no (noticeable) difference.

Did you enable profiling to see which functions are taking up how much
time? Could you post the output?

-- brion vibber (brion @ pobox.com)


> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l@Wikimedia.org
> http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
>
Re: Regarding delay [ In reply to ]
On Nov 3, 2004, at 1:54 PM, N. Mourtos wrote:
> It is a P 133.

Yeah, that's your problem. :)

> Has handled well under heavy mysql use. I can only assume that there
> isn't a php acceleration module enabled because I have never
> explicitly installed one (in fact I dont have much experience with
> acceleration modules).

This was my primary suggestion, and you did say you followed my
suggestions and didn't see any difference. I highly, highly recommend
you do this first before trying anything else.

With a current PHP this should be pretty simple; the APC cache module
can be installed like this (run as root):

pear install apc

That will download the current APC source, compile it, and install the
module into PHP's extensions directory. Then edit php.ini and add a
line like:

extension = /usr/lib/php/extensions/no-debug-non-zts-20020429/apc.so

(this should be the actual location of the installed apc.so file.)
Restart Apache. Check Apache's error_log to make sure there aren't any
failure messages about shared memory allocation or inability to load
the module. Create a php file like this:

<?php phpinfo(); ?>

and browse to it. Make sure there is a section describing the apc
module.

> I have enabled profiling but the logs do not appear where they
> should. Either they aren't being generated because of some syntactical
> error or another unknown error.

Can you list exactly what you've added to LocalSettings.php, and
exactly where you've looked for the output? Did you see any error
messages?

-- brion vibber (brion @ pobox.com)
Re: Regarding delay [ In reply to ]
On Nov 3, 2004, at 6:19 AM, N. Mourtos wrote:
> The stats file is available at http://nerdinside.net/stats

Your Pentium 133 also has shockingly little memory (45MB, and heavy
swap file usage). If a PHP opcode cache doesn't do enough (and even if
it does it may eat much of your RAM), your best bet is to spend a few
dollars and upgrade. More RAM always helps, as will a faster processor.

An old box is generally fine for serving static content at low rates,
but for dynamic content is not so great.

-- brion vibber (brion @ pobox.com)
Re: Regarding delay [ In reply to ]
Is it worth setting her up if in the end she will run to slow? I really
never thought that this engine could ever be so CPU intensive.
----- Original Message -----
From: "Brion Vibber" <brion@pobox.com>
To: "MediaWiki announcements and site admin list"
<mediawiki-l@Wikimedia.org>
Sent: Wednesday, November 03, 2004 5:24 PM
Subject: Re: [Mediawiki-l] Regarding delay


> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l@Wikimedia.org
> http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
>
Re: Regarding delay [ In reply to ]
On Wed, 3 Nov 2004 18:00:07 -0500, N. Mourtos <nmourtos@rogers.com> wrote:
> Is it worth setting her up if in the end she will run to slow? I really
> never thought that this engine could ever be so CPU intensive.
>

You've never looked at the source, have you?

As for whether or not it's worth it, that can only be decided by you.
It depends entirely on your needs and resources.

Even a toaster can serve static content. But it takes a webserver to
run MediaWiki. ;)
(And if you don't believe the toater bit, just ask my host.)

-- Jamie
-------------------------------------------------------------------
http://endeavour.zapto.org/astro73/
Thank you to JosephM for inviting me to Gmail!