<div dir="ltr"><div class="gmail_default" style="font-family:'courier new',monospace">Pierre, <span class="" id=":27f.1" tabindex="-1" style="background:yellow">Petko</span>, thank you for helpful answers.</div><div class="gmail_default" style="font-family:'courier new',monospace">I'm going to investigate and play more with $<span class="" id=":27f.2" tabindex="-1" style="background:yellow">PageIndexTime</span> variable although I feel the issue I'm facing happens prior to indexing.</div><div class="gmail_default" style="font-family:'courier new',monospace"><br></div><div class="gmail_default" style="font-family:'courier new',monospace">As of now, I say : after I import a big amount of new data (in <span class="" id=":27f.3" tabindex="-1" style="background:yellow">sqlite</span> recipe), <span class="" id=":27f.4" tabindex="-1" style="background:yellow">pmwiki</span> fails to start indexing and something runs out of memory before it starts indexing. Thereafter it's dead. Please note <span class="" id=":27f.5" tabindex="-1" style="background:yellow">PmWiki</span> is still working fine for printing out pages, for linking, etc., no matter the quantity of pages.</div><div class="gmail_default" style="font-family:'courier new',monospace">Fails happened several times to me this evening and the only working way was to limit the amount of new imported data. (do not import 60 mo of new data, but import 6 mo and do it 10 times).</div><div class="gmail_default" style="font-family:'courier new',monospace"><br></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex" class="gmail_quote"><div class="gmail_default" style="font-family:'courier new',monospace;display:inline">​(Pierre) ​</div>As far as I remember, PmWiki doesn't check to see if the amount of new<br>data is acceptable to index.  PmWiki simply has a list of pages that it<br>knows aren't in the index, indexes as many as it can in $PageIndexTime<br>seconds, and leaves the rest for a later request to index.</blockquote><div class="gmail_default" style="font-family:'courier new',monospace"><br></div><div class="gmail_default" style="font-family:'courier new',monospace">What if <span class="" id=":27f.6" tabindex="-1" style="background:yellow">PmWiki</span> has suddenly 10k new pages to index ? It may take time to list all of these new pages, and to get ready to index them in the next step. In my simulation case, new pages are very short in size, yet they are quite a lot (90000 quotes = 90000 pages ;)). How would I debug a bottleneck if ever in the very early task of indexation ? </div><div class="gmail_default" style="font-family:'courier new',monospace"><br></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex" class="gmail_quote"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px"><div class="gmail_default" style="font-family:'courier new',monospace;display:inline">​(Petko) ​</div>There is a 10 seconds default limit for the indexation work, that is, if there are more pages that haven't been indexed, they will be dropped and will be indexed on the next search.</span></blockquote><div class="gmail_default" style="font-family:'courier new',monospace"><br></div><div class="gmail_default" style="font-family:'courier new',monospace">Indeed. Yet in my case, when importing to much data, indexation <span class="" id=":27f.7" tabindex="-1" style="background:yellow">doesn't</span> start, because it's failing in the prior step. </div><div class="gmail_default" style="font-family:'courier new',monospace"><br></div><div class="gmail_default" style="font-family:'courier new',monospace">Tested just now : </div><div class="gmail_default" style="font-family:'courier new',monospace">I alter .<span class="" id=":27f.8" tabindex="-1" style="background:yellow">pageindex</span>, .flock and .<span class="" id=":27f.9" tabindex="-1" style="background:yellow">lastmod</span> 's names in wiki.d, so it's l<span class="" id=":27f.10" tabindex="-1" style="background:yellow">ike</span> there is nothing else the 100 mo <span class="" id=":27f.11" tabindex="-1" style="background:yellow">sqlite</span> database, and I run a search in the browser.</div><div class="gmail_default" style="font-family:'courier new',monospace"><span class="" id=":27f.12" tabindex="-1" style="background:yellow">PmWiki</span> has to index a <span class="" id=":27f.13" tabindex="-1" style="background:yellow">sql</span> database made of 100000 new pages ;) I see my hard drive led running fast, I feel temperature going higher, (really, some processing is happening), and <span class="" id=":27f.14" tabindex="-1" style="background:yellow">finally</span> error message is printed out on browser screen : Fatal error: Maximum execution time of 30 seconds exceeded in D:\xampp3\htdocs\abclf\scripts\xlpage-<span class="" id=":27f.15" tabindex="-1" style="background:yellow">utf</span>-8.<span class="" id=":27f.16" tabindex="-1" style="background:yellow">php</span> on line 75</div><div class="gmail_default" style="font-family:'courier new',monospace"><br></div><div class="gmail_default" style="font-family:'courier new',monospace">Checking in wiki.d : a new 0 byte .flock file is has been created. No new .pageindex</div><div class="gmail_default" style="font-family:'courier new',monospace"><br></div><div class="gmail_default" style="font-family:'courier new',monospace">I rerun a search. Hard drive rerun, and message error : Fatal error: Maximum execution time of 30 seconds exceeded in D:\xampp3\htdocs\abclf\pmwiki.<span class="" id=":27f.17" tabindex="-1" style="background:yellow">php</span> on line 2015</div><div class="gmail_default" style="font-family:'courier new',monospace"><br></div><div class="gmail_default" style="font-family:'courier new',monospace">No change in wiki.d folder.</div><div class="gmail_default" style="font-family:'courier new',monospace"><br></div><div class="gmail_default" style="font-family:'courier new',monospace">Last rerun, and last error message is : Fatal error: Maximum execution time of 30 seconds exceeded in D:\xampp3\htdocs\abclf\cookbook\sqlite.php on line 403</div><div class="gmail_default" style="font-family:'courier new',monospace"><br></div><div class="gmail_default" style="font-family:'courier new',monospace">Please note the hard drive looks like it's stressed. I experienced 2 forced reboots on my laptop (which doesnt like to get stressed).</div><div class="gmail_default" style="font-family:'courier new',monospace"><br></div><div class="gmail_default" style="font-family:'courier new',monospace">Of course I can share my 100 mo <span class="" id=":27f.18" tabindex="-1" style="background:yellow">sqlite</span> database for further testings. </div><div class="gmail_default" style="font-family:'courier new',monospace">In case you are interested, in Quote group, I'm inserting 90000 of that kind of data :<br></div><div class="gmail_default" style="font-family:'courier new',monospace"><br></div><div class="gmail_default" style="font-family:'courier new',monospace">--------------insert--------------------<br></div><div class="gmail_default" style><div class="gmail_default" style><font face="courier new, monospace">INSERT INTO pages (author, <span class="" id=":27f.19" tabindex="-1" style="background:yellow">charset</span>, name, targets, text)</font></div><div class="gmail_default" style><font face="courier new, monospace">VALUES ("<span class="" id=":27f.20" tabindex="-1" style="background:yellow">gb</span>", "<span class="" id=":27f.21" tabindex="-1" style="background:yellow">UTF</span>-8", "Citation.95463", "Bob.3580,Source.3957", "[[#citation]]</font></div><div class="gmail_default" style><font face="courier new, monospace"><span class="" id=":27f.22" tabindex="-1" style="background:yellow">Marcault</span> <span class="" id=":27f.23" tabindex="-1" style="background:yellow">crut</span> <span class="" id=":27f.24" tabindex="-1" style="background:yellow">voir</span> <span class="" id=":27f.25" tabindex="-1" style="background:yellow">le</span> <span class="" id=":27f.26" tabindex="-1" style="background:yellow">Corse</span> <span class="" id=":27f.27" tabindex="-1" style="background:yellow">blémir</span>. –Il nous <span class="" id=":27f.28" tabindex="-1" style="background:yellow">colle</span> la <span class="" id=":27f.29" tabindex="-1" style="background:yellow">trouille</span>, <span class="" id=":27f.30" tabindex="-1" style="background:yellow">ce</span> gars-<span class="" id=":27f.31" tabindex="-1" style="background:yellow">là</span>, <span class="" id=":27f.32" tabindex="-1" style="background:yellow">reconnut</span> <span class="" id=":27f.33" tabindex="-1" style="background:yellow">Filippi</span>.</font></div><div class="gmail_default" style><font face="courier new, monospace">[[#citation_]]</font></div><div class="gmail_default" style><font face="courier new, monospace"><br></font></div><div class="gmail_default" style><font face="courier new, monospace">bob:3580</font></div><div class="gmail_default" style><font face="courier new, monospace">source:3957");</font></div><div class="gmail_default" style><span style="font-family:'courier new',monospace">--------------<span class="" id=":27f.34" tabindex="-1" style="background:yellow">insertend</span>-----------------</span><font face="courier new, monospace"><br></font></div></div><div class="gmail_default" style="font-family:'courier new',monospace"><br></div><div class="gmail_default" style="font-family:'courier new',monospace">For Word group, here it is the kind of data (70000) :</div><div class="gmail_default" style="font-family:'courier new',monospace"><br></div><div class="gmail_default" style="font-family:'courier new',monospace">--------------insert--------------------</div><div class="gmail_default" style><div class="gmail_default" style><font face="courier new, monospace">INSERT INTO pages (author, <span class="" id=":27f.35" tabindex="-1" style="background:yellow">charset</span>, <span class="" id=":27f.36" tabindex="-1" style="background:yellow">ctime</span>, targets, name, title, text)</font></div><div class="gmail_default" style><font face="courier new, monospace">VALUES ("<span class="" id=":27f.37" tabindex="-1" style="background:yellow">gb</span>", "<span class="" id=":27f.38" tabindex="-1" style="background:yellow">UTF</span>-8", "1401924338", "<span class="" id=":27f.39" tabindex="-1" style="background:yellow">Synonyme</span>.81","Bob.73244","<span class="" id=":27f.40" tabindex="-1" style="background:yellow">qu'est</span>-<span class="" id=":27f.41" tabindex="-1" style="background:yellow">ce</span> <span class="" id=":27f.42" tabindex="-1" style="background:yellow">que</span> <span class="" id=":27f.43" tabindex="-1" style="background:yellow">vous</span> <span class="" id=":27f.44" tabindex="-1" style="background:yellow">voulez</span> <span class="" id=":27f.45" tabindex="-1" style="background:yellow">que</span> <span class="" id=":27f.46" tabindex="-1" style="background:yellow">ça</span> me <span class="" id=":27f.47" tabindex="-1" style="background:yellow">fasse</span> ?","(:title <span class="" id=":27f.48" tabindex="-1" style="background:yellow">qu'est</span>-<span class="" id=":27f.49" tabindex="-1" style="background:yellow">ce</span> <span class="" id=":27f.50" tabindex="-1" style="background:yellow">que</span> <span class="" id=":27f.51" tabindex="-1" style="background:yellow">vous</span> <span class="" id=":27f.52" tabindex="-1" style="background:yellow">voulez</span> <span class="" id=":27f.53" tabindex="-1" style="background:yellow">que</span> <span class="" id=":27f.54" tabindex="-1" style="background:yellow">ça</span> me <span class="" id=":27f.55" tabindex="-1" style="background:yellow">fasse</span> ?:)</font></div><div class="gmail_default" style><font face="courier new, monospace"><br></font></div><div class="gmail_default" style><font face="courier new, monospace">[[#<span class="" id=":27f.56" tabindex="-1" style="background:yellow">fpa</span>]]</font></div><div class="gmail_default" style><font face="courier new, monospace"><span class="" id=":27f.57" tabindex="-1" style="background:yellow">vedette</span>: <span class="" id=":27f.58" tabindex="-1" style="background:yellow">qu'est</span>-<span class="" id=":27f.59" tabindex="-1" style="background:yellow">ce</span> <span class="" id=":27f.60" tabindex="-1" style="background:yellow">que</span> <span class="" id=":27f.61" tabindex="-1" style="background:yellow">vous</span> <span class="" id=":27f.62" tabindex="-1" style="background:yellow">voulez</span> <span class="" id=":27f.63" tabindex="-1" style="background:yellow">que</span> <span class="" id=":27f.64" tabindex="-1" style="background:yellow">ça</span> me <span class="" id=":27f.65" tabindex="-1" style="background:yellow">fasse</span> ?</font></div><div class="gmail_default" style><font face="courier new, monospace"><span class="" id=":27f.66" tabindex="-1" style="background:yellow">variantes</span>: </font></div><div class="gmail_default" style><font face="courier new, monospace">[[#<span class="" id=":27f.67" tabindex="-1" style="background:yellow">fpa</span>_]]</font></div><div class="gmail_default" style><font face="courier new, monospace"><br></font></div><div class="gmail_default" style><font face="courier new, monospace">[[#fr]]</font></div><div class="gmail_default" style><font face="courier new, monospace"><span class="" id=":27f.68" tabindex="-1" style="background:yellow">Indifférence</span></font></div><div class="gmail_default" style><font face="courier new, monospace">[[#fr_]]</font></div><div class="gmail_default" style><font face="courier new, monospace"><br></font></div><div class="gmail_default" style><font face="courier new, monospace">[[#<span class="" id=":27f.69" tabindex="-1" style="background:yellow">etymologie</span>]]</font></div><div class="gmail_default" style><font face="courier new, monospace"><br></font></div><div class="gmail_default" style><font face="courier new, monospace">[[#<span class="" id=":27f.70" tabindex="-1" style="background:yellow">etymologie</span>_]]</font></div><div class="gmail_default" style><font face="courier new, monospace"><br></font></div><div class="gmail_default" style><font face="courier new, monospace">[[#<span class="" id=":27f.71" tabindex="-1" style="background:yellow">tlfi</span>]]</font></div><div class="gmail_default" style><font face="courier new, monospace"><br></font></div><div class="gmail_default" style><font face="courier new, monospace">[[#<span class="" id=":27f.72" tabindex="-1" style="background:yellow">tlfi</span>_]]</font></div><div class="gmail_default" style><font face="courier new, monospace"><br></font></div><div class="gmail_default" style><font face="courier new, monospace">[[#<span class="" id=":27f.73" tabindex="-1" style="background:yellow">traduction</span>]]</font></div><div class="gmail_default" style><font face="courier new, monospace"><br></font></div><div class="gmail_default" style><font face="courier new, monospace">[[#<span class="" id=":27f.74" tabindex="-1" style="background:yellow">traduction</span>_]]</font></div><div class="gmail_default" style><font face="courier new, monospace"><br></font></div><div class="gmail_default" style><font face="courier new, monospace">[[#<span class="" id=":27f.75" tabindex="-1" style="background:yellow">remarque</span>]]</font></div><div class="gmail_default" style><font face="courier new, monospace"><br></font></div><div class="gmail_default" style><font face="courier new, monospace">[[#<span class="" id=":27f.76" tabindex="-1" style="background:yellow">remarque</span>_]]</font></div><div class="gmail_default" style><font face="courier new, monospace"><br></font></div><div class="gmail_default" style><font face="courier new, monospace">[[#attestation]]</font></div><div class="gmail_default" style><font face="courier new, monospace"><br></font></div><div class="gmail_default" style><font face="courier new, monospace">[[#attestation_]]</font></div><div class="gmail_default" style><font face="courier new, monospace">attestation_c: </font></div><div class="gmail_default" style><font face="courier new, monospace"><span class="" id=":27f.77" tabindex="-1" style="background:yellow">grammaire</span>: </font></div><div class="gmail_default" style><font face="courier new, monospace"><span class="" id=":27f.78" tabindex="-1" style="background:yellow">synonyme</span>: 81</font></div><div class="gmail_default" style><font face="courier new, monospace"><span class="" id=":27f.79" tabindex="-1" style="background:yellow">morphologie</span>: </font></div><div class="gmail_default" style><font face="courier new, monospace">usage: </font></div><div class="gmail_default" style><font face="courier new, monospace"><span class="" id=":27f.80" tabindex="-1" style="background:yellow">famille</span>: </font></div><div class="gmail_default" style><font face="courier new, monospace"><span class="" id=":27f.81" tabindex="-1" style="background:yellow">registre</span>_<span class="" id=":27f.82" tabindex="-1" style="background:yellow">origine</span>: </font></div><div class="gmail_default" style><font face="courier new, monospace"><span class="" id=":27f.83" tabindex="-1" style="background:yellow">registre</span>_<span class="" id=":27f.84" tabindex="-1" style="background:yellow">actuel</span>: 5");</font></div></div><div class="gmail_default" style><div class="gmail_default" style><span style="font-family:'courier new',monospace">--------------<span class="" id=":27f.85" tabindex="-1" style="background:yellow">insertend</span>-----------------</span><br></div><div class="gmail_default" style><span style="font-family:'courier new',monospace"><br></span></div></div><div class="gmail_default" style="font-family:'courier new',monospace">I <span class="" id=":27f.86" tabindex="-1" style="background:yellow">dont</span> know if <span class="" id=":27f.87" tabindex="-1" style="background:yellow">PmWiki</span> is the most pertinent tool for this kind of job, and I know I'm not good enough to use it at its best. And I feel a little <span class="" id=":27f.89" tabindex="-1" style="background:yellow">ashame</span> to show my messy kitchen ;) Say I'm testing. I know <span class="" id=":27f.90" tabindex="-1" style="background:yellow">PmWiki</span> can not replace a <span class="" id=":27f.91" tabindex="-1" style="background:yellow">sql</span> database, yet it has a lot of power to give. </div><div class="gmail_default" style="font-family:'courier new',monospace"><br></div><div class="gmail_default" style="font-family:'courier new',monospace"><br></div><div class="gmail_default" style="font-family:'courier new',monospace">Gilles.</div><div class="gmail_default" style="font-family:'courier new',monospace"><br></div><div class="gmail_default" style="font-family:'courier new',monospace"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-01-28 23:16 GMT+01:00 Petko Yotov <span dir="ltr"><<a href="mailto:5ko@5ko.fr" target="_blank">5ko@5ko.fr</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 2015-01-28 22:10, ABClf wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Main issue encountered is how .pageindex is handling its indexation<br>
task. It sounds like it definitely stops working when the amount of<br>
_new_ data is too big.<br>
I mean, the process looks like it evaluates first the amount of new<br>
data, rather than starting to index, thus, in case there is too much<br>
new data, you get a memory error message, and the game is over. I wish<br>
the pageindexing would work, and work, and work, no matter how much<br>
new data there is to index, until its done.<br>
<br>
If the amount of new data is acceptable, then he will start making the<br>
index. Not in one time : you will have to ask him several times, but<br>
at the end (search 10 times, more or less), you know its done, and you<br>
have not encoutered memory issue.<br>
</blockquote>
<br></span>
This is done by the function PageIndexUpdate() in scripts/pagelist.php.<br>
<br>
There is a 10 seconds default limit for the indexation work, that is, if there are more pages that haven't been indexed, they will be dropped and will be indexed on the next search.<br>
<br>
While pages are indexed, there shouldn't be a huge need for memory. After the terms of a page are compacted, they are written into the ".pageindex,new" file and dropped from memory (actually the values are replaced). Same for the next pages up to 10 seconds. After, the contents of the old ".pageindex" file is copied to ".pageindex,new" and then ".pageindex,new" is renamed to ".pageindex", replacing the old file. None of these operations should require a lot of memory.<br>
<br>
The only place I see where the memory usage can grow, is on line 773 of pagelist.php. This line adds the processed page name to an array, so that PmWiki knows that the page was already processed. If you have a huge number of pages, only the characters composing the page names may go over the memory limit. If your error messages mention this line 773, the problem is there.<br>
<br>
You can reduce the number of pages indexed (actually the number of seconds of continued indexing) by adding this in config.php:<br>
<br>
  $PageIndexTime = 5; # 5 seconds instead of 10<br>
<br>
I'll review the functions next weekend in case we are missing something.<br>
<br>
See also the recipe SystemLimits, you may be able to increase the memory limits.<span class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Related question is : as I'm using sqlite for storing a big amount of<br>
short and very short pages, why use the pmwiki .pageindex process<br>
rather than performing a fulltext search ?<br>
</blockquote>
<br></span>
The SQLite PageStore() class only allows the "storage" of the pages into a single SQLite database file. The reasons, the pros and cons are explained in the recipe page.<br>
<br>
Other than "a fulltext search from the SQLite database is not yet written", I think the built-in search using .pageindex will perform much faster than a fulltext database search.<br>
<br>
Petko<br>
<br>
<br>
______________________________<u></u>_________________<br>
pmwiki-users mailing list<br>
<a href="mailto:pmwiki-users@pmichaud.com" target="_blank">pmwiki-users@pmichaud.com</a><br>
<a href="http://www.pmichaud.com/mailman/listinfo/pmwiki-users" target="_blank">http://www.pmichaud.com/<u></u>mailman/listinfo/pmwiki-users</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div><br></div><div>---------------------------------------</div>| A | de la langue française<br>| B | <a href="http://www.languefrancaise.net/" target="_blank">http://www.languefrancaise.net</a><br>| C | <a href="mailto:languefrancaise@gmail.com" target="_blank">languefrancaise@gmail.com</a><br>---------------------------------------<div>       @bobmonamour</div><div>---------------------------------------</div></div>
</div>