Finally I found what is/was causing these zero errors.
First of all, to locate what was spawning these errors I did a grep to all sites php files for the php function error_log()
(http://php.net/manual/en/function.error-log.php), which writes directly the string argument message without any other information like filename, line numbers etc. At the results I saw there was an error_log(0);
at a Joomla plugin that it was enabled. After opening the plugin php file, I figured out that it was my addition in order to debug something and I've had totally forgotten there. So, after deleting the line there was no more zero character errors. I don't even remember what I wanted to achieve by that call, it doesn't make any sense at all. Maybe I wanted to use error_reporting(0)
to disable all errors and mistyped.
And to make it clear, these errors were not related and responsible at all for the server crash/hang. I fixed the crashes by creating a new database and restoring the backup file, so, the old database was damaged.
Now, after 24 hours, there was no crashes/hangs and everything works perfect again.
EDIT:
After some further investigation, I have realized that this error_log(0)
was not my addition and it was already there when I installed the plugin! The plugin/component is Joooid, an Android client for Joomla (http://www.joooid.com). The code is located at the plg_joooidcontent inside joooidcontent.php:
...
/**
* @since 1.6
*/
public function onContentPrepare($context, &$row, &$params, $page=0)
{
error_log(0);
//echo "<pre>";
$row ->text = $this->executeTokens($row->text);
//print_r($row);
//die();
}
...
Even now it is there with the latest release. I will send them a link to this question so to inform them about it.