For both MediaWiki 1.17 and 1.18, and for both SMW 1.6 and 1.6.1:
When set in LocalSettings.php:
error_reporting( E_ALL );
ini_set( 'display_errors', 1 );
This error is reported:
Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 4081043 bytes) in /home/coin/public_html/w/includes/parser/Parser.php on line 353
Notice that the memory available is 512MB, set in LocalSettings.php with:
ini_set( 'memory_limit', '512M' );
The error first appeared after I had accidentally saved an SMW-heavy template page to an article page. After making the error, I tried to edit and save the correct page text, and the save would not complete. It displayed the memory error after waiting for the script to time out.
The SMW installation has been working fine for months with mostly just me using it. Now, the only pages that are accessible that I know of are these pages:
http://www.coincompendium.com/w/index.php/Special:BlankPage
http://www.coincompendium.com/w/index.php?title=Main_Page&action=history
http://www.coincompendium.com/w/index.php?title=Special:UserLogin
I upgraded to MW 1.18 and SMW 1.6.1, but the problem persists. My web host says this:
Apache is spending a lot of time on this plugin:
SMWSQLStore2
The CPU also drives up doing a ton of SELECT (almost like an infinite loop) statements. How big is this database it is querying?
It seems to be stuck in this loop forever, eating up all the memory. It seems this plugin is broken or this plugin's database is not configured properly?
I say this about the database size:
Uncompressed, the SQL backup file is 129 234 879 bytes = 123.247985 megabytes, which is for something like 1000 to 2000 pages on the site. That's not a lot at all.
SMW_refreshData.php produces this error output:
Refreshing all semantic data in the database!
Some versions of PHP suffer from memory leaks in long-running scripts.
If your machine gets very slow after many pages (typically more than
- were refreshed, please abort with CTRL-C and resume this script at the last processed page id using the parameter -s (use -v to display page ids during refresh). Continue this until all pages were refreshed. ---
Processing all IDs from 1 to last ID ...
PHP Fatal error: Out of memory (allocated 1616379904) (tried to allocate 132515949 bytes) in /home/coin/public_html/w/includes/parser/Parser.php on line 353
Fatal error: Out of memory (allocated 1616379904) (tried to allocate 132515949 bytes) in /home/user/public_html/w/includes/parser/Parser.php on line 353
user@nail:~/public_html/w/extensions/SemanticMediaWiki/maintenance$
SMW_setup.php produces this output:
Setting up standard database configuration for SMW ...
Selected storage engine is "SMWSQLStore2" (or an extension thereof)
Checking table wiki_smw_ids ...
Table already exists, checking structure ... ... field smw_id is fine. ... field smw_namespace is fine. ... field smw_title is fine. ... changing type of field smw_iw from 'VARBINARY(32) NOT NULL' to 'VARCHAR(32) binary NOT NULL' ... done. ... changing type of field smw_subobject from 'VARBINARY(32) NOT NULL' to 'VARCHAR(32) binary NOT NULL' ... done. ... field smw_sortkey is fine. ... done.
Checking table wiki_smw_conccache ...
Table already exists, checking structure ... ... field s_id is fine. ... field o_id is fine. ... done.
Checking table wiki_smw_rels2 ...
Table already exists, checking structure ... ... field s_id is fine. ... field p_id is fine. ... field o_id is fine. ... done.
Checking table wiki_smw_atts2 ...
Table already exists, checking structure ... ... field s_id is fine. ... field p_id is fine. ... field value_xsd is fine. ... field value_num is fine. ... done.
Checking table wiki_smw_text2 ...
Table already exists, checking structure ... ... field s_id is fine. ... field p_id is fine. ... field value_blob is fine. ... done.
Checking table wiki_smw_spec2 ...
Table already exists, checking structure ... ... field s_id is fine. ... field p_id is fine. ... field value_string is fine. ... done.
Checking table wiki_smw_subs2 ...
Table already exists, checking structure ... ... field s_id is fine. ... field o_id is fine. ... done.
Checking table wiki_smw_subp2 ...
Table already exists, checking structure ... ... field s_id is fine. ... field o_id is fine. ... done.
Checking table wiki_smw_inst2 ...
Table already exists, checking structure ... ... field s_id is fine. ... field o_id is fine. ... done.
Checking table wiki_smw_redi2 ...
Table already exists, checking structure ... ... field s_title is fine. ... field s_namespace is fine. ... field o_id is fine. ... done.
Checking table wiki_smw_conc2 ...
Table already exists, checking structure ... ... changing type of field s_id from 'INT(8) UNSIGNED NOT NULL KEY' to 'INT(8) UNSIGNED NOT NULL' ... done. ... field concept_txt is fine. ... field concept_docu is fine. ... field concept_features is fine. ... field concept_size is fine. ... field concept_depth is fine. ... field cache_date is fine. ... field cache_count is fine. ... done.
Checking table wiki_sm_coords ...
Table already exists, checking structure ... ... field s_id is fine. ... field p_id is fine. ... field lat is fine. ... field lon is fine. ... done.
Database initialised successfully.
Setting up internal property indices ...
... space for internal properties already allocated. ... writing entries for internal properties ... done.
Internal properties initialised successfully.
Done.
Version: unspecified
Severity: critical