Symptoms
Site cannot be published through Sitebuilder wizard {Sitebuilder -> Sites -> SITE.ALIAS -> Open Site In Wizard -> Publish}.The following error is shown in Sitebuilder wizard:
The site has been published with errors.
Cannot update modules data.
in Sitebuilder logs {Sitebuilder -> Logs}:
System
And this fatal error can be found in Apache log:
/var/log/apache/error_log
---
FATAL: emalloc(): Unable to allocate 142401972731904 bytes
FATAL: emalloc(): Unable to allocate 142401972731904 bytes
FATAL: emalloc(): Unable to allocate 142401972731904 bytes
FATAL: emalloc(): Unable to allocate 142401972731904 bytes
---
Cause
The problem is caused by SQLite function sqlite_escape_string that causes memory leak.Resolution
It may be caused by either SQLite or PHP. To resolve the problem you should recompile PHP and SQLite v2.During recompilation of SQLite v2 do not forget to include support of UTF-8 encoding. For details see article [Info] Sitebuilder fails to publish because of missing SQLite 2.x support
Note: If the publishing location is a virtual environment you need to double-check its system resources. You may use the following command to check failcounts of Virtuozzo UBC resources:
~# cat /proc/user_beancounters|grep -v " 0$"
If counder for some limit is not 0 then login to hardware node and increase the limit with command 'vzctl'.
Additional information
To check SQLite used by published host copy file /usr/local/sitebuilder/resources/publish/check.php (/opt/sitebuilder/resources/publish/check.php for Debian/Ubuntu) from Sitebuilder server to domain's root directory on publishing host. And execute the script from URL:~# curl -s http://<published site>/check.php | grep ^sqlite
sqlite=2.8.16
sqliteEncoding=UTF-8
~#
For default about script check.php see article http://kb.parallels.com/en/1812.