简体   繁体   中英

Joomla: JFactory::getApplication('site') returns error when refreshing much

When I switch pages to much on my website or refresh a couple of times fast, i get the 'Application Instantiation Error' of factory.php

Here is the code index.php

$app = JFactory::getApplication('site');

Here is the code in /libraries/joomla/factory.php

public static function getApplication($id = null, array $config = array(), $prefix = 'J')
{
    if (!self::$application)
    {
        if (!$id)
        {
            throw new Exception('Application Instantiation Error', 500);
        }

        self::$application = JApplication::getInstance($id, $config, $prefix);
    }
    return self::$application;
}

Is there a way to solve this? Is this a Joomla error or a database error?

Hope somebody can help.

This is likely a problem with the connection to the database (possibly some limit imposed by your host). Check your logs to see what is going on (this one /usr/local/apache/logs/error_log ). If you can't find anything in the logs then talk to your host about this problem (ask them to switch you to a higher plan if they try blaming the CMS).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM