PDOException (1203)
SQLSTATE[HY000] [1203] User web1063 already has more than 'max_user_connections' active connections PDOException thrown with message "SQLSTATE[HY000] [1203] User web1063 already has more than 'max_user_connections' active connections" Stacktrace: #28 PDOException in /usr/share/nginx/html/bootstrap/service.php:150 #27 Phalcon\Db\Adapter\Pdo:__construct in /usr/share/nginx/html/bootstrap/service.php:150 #26 Framework:{closure} in [internal]:0 #25 Phalcon\Di\Service:resolve in [internal]:0 #24 Phalcon\Di:get in [internal]:0 #23 Phalcon\Di:getShared in [internal]:0 #22 Phalcon\Mvc\Model\Manager:_getConnection in [internal]:0 #21 Phalcon\Mvc\Model\Manager:getReadConnection in [internal]:0 #20 Phalcon\Mvc\Model:getReadConnection in [internal]:0 #19 Phalcon\Mvc\Model\MetaData\Strategy\Introspection:getMetaData in [internal]:0 #18 Phalcon\Mvc\Model\MetaData:_initialize in [internal]:0 #17 Phalcon\Mvc\Model\MetaData:writeMetaDataIndex in [internal]:0 #16 Phalcon\Mvc\Model\MetaData:setEmptyStringAttributes in [internal]:0 #15 Phalcon\Mvc\Model:allowEmptyStringValues in /usr/share/nginx/html/app/Http/Models/FbConfig.php:22 #14 App\Http\Models\FbConfig:initialize in [internal]:0 #13 Phalcon\Mvc\Model\Manager:initialize in [internal]:0 #12 Phalcon\Mvc\Model:__construct in [internal]:0 #11 Phalcon\Mvc\Model\Manager:load in [internal]:0 #10 Phalcon\Mvc\Model\Query:_prepareSelect in [internal]:0 #9 Phalcon\Mvc\Model\Query:parse in [internal]:0 #8 Phalcon\Mvc\Model\Query:execute in [internal]:0 #7 Phalcon\Mvc\Model:find in /usr/share/nginx/html/app/Http/Controllers/Controller.php:94 #6 App\Http\Controllers\Controller:getGlobalConfigs in /usr/share/nginx/html/app/Http/Controllers/Controller.php:43 #5 App\Http\Controllers\Controller:initialize in /usr/share/nginx/html/app/Http/Controllers/MatchController.php:28 #4 App\Http\Controllers\MatchController:initialize in [internal]:0 #3 Phalcon\Dispatcher:dispatch in [internal]:0 #2 Phalcon\Mvc\Application:handle in /usr/share/nginx/html/bootstrap/kernel.php:100 #1 Framework:kernel in /usr/share/nginx/html/bootstrap/kernel.php:30 #0 Framework:boot in /usr/share/nginx/html/public/index.php:23
Stack frames (29)
28
PDOException
/bootstrap/service.php150
27
Phalcon\Db\Adapter\Pdo __construct
/bootstrap/service.php150
26
Framework {closure}
[internal]0
25
Phalcon\Di\Service resolve
[internal]0
24
Phalcon\Di get
[internal]0
23
Phalcon\Di getShared
[internal]0
22
Phalcon\Mvc\Model\Manager _getConnection
[internal]0
21
Phalcon\Mvc\Model\Manager getReadConnection
[internal]0
20
Phalcon\Mvc\Model getReadConnection
[internal]0
19
Phalcon\Mvc\Model\MetaData\Strategy\Introspection getMetaData
[internal]0
18
Phalcon\Mvc\Model\MetaData _initialize
[internal]0
17
Phalcon\Mvc\Model\MetaData writeMetaDataIndex
[internal]0
16
Phalcon\Mvc\Model\MetaData setEmptyStringAttributes
[internal]0
15
Phalcon\Mvc\Model allowEmptyStringValues
/app/Http/Models/FbConfig.php22
14
App\Http\Models\FbConfig initialize
[internal]0
13
Phalcon\Mvc\Model\Manager initialize
[internal]0
12
Phalcon\Mvc\Model __construct
[internal]0
11
Phalcon\Mvc\Model\Manager load
[internal]0
10
Phalcon\Mvc\Model\Query _prepareSelect
[internal]0
9
Phalcon\Mvc\Model\Query parse
[internal]0
8
Phalcon\Mvc\Model\Query execute
[internal]0
7
Phalcon\Mvc\Model find
/app/Http/Controllers/Controller.php94
6
App\Http\Controllers\Controller getGlobalConfigs
/app/Http/Controllers/Controller.php43
5
App\Http\Controllers\Controller initialize
/app/Http/Controllers/MatchController.php28
4
App\Http\Controllers\MatchController initialize
[internal]0
3
Phalcon\Dispatcher dispatch
[internal]0
2
Phalcon\Mvc\Application handle
/bootstrap/kernel.php100
1
Framework kernel
/bootstrap/kernel.php30
0
Framework boot
/public/index.php23
/usr/share/nginx/html/bootstrap/service.php
    return new FileCache($frontCache, ['cacheDir' => ROOT_DIR . 'storage/cache/', 'prefix' => 'cache_']);
}, true);


$di->set('cache', function () use ($di) {
    $redis = new Redis();
    $redis->connect($di["config"]->path("cache.host"), $di["config"]->path("cache.port"));
    $redis->select($di["config"]->path("cache.db"));
    return $redis;
}, true);


$di->set('db', function () use ($di) {
    $connection = new Mysql([
        'host'     => $di["config"]->path("database.mysql.host"),
        'port'     => $di["config"]->path("database.mysql.port"),
        'username' => $di["config"]->path("database.mysql.user"),
        'password' => $di["config"]->path("database.mysql.pass"),
        'dbname'   => $di["config"]->path("database.mysql.db"),
        'charset'  => $di["config"]->path("database.mysql.charset"),
    ]);
    $connection->setEventsManager($di['eventsManager']);
    return $connection;
}, true);


$di->set('redis', function () use ($di) {
    $redis = new Redis();
    $redis->connect($di["config"]->path("database.redis.host"), $di["config"]->path("database.redis.port"));
    $redis->select($di["config"]->path("database.redis.db"));
    return $redis;
}, true);


$di->set('mongodb', function () use ($di) {
    return new MongoDBClient(
        "mongodb://" . $di["config"]->path('database.mongodb.host') . ':' . $di["config"]->path('database.mongodb.port'),
        array_filter([
            'username'   => $di["config"]->path('database.mongodb.user'),
            'password'   => $di["config"]->path('database.mongodb.pass'),
Arguments
  1. "SQLSTATE[HY000] [1203] User web1063 already has more than 'max_user_connections' active connections"
    
/usr/share/nginx/html/bootstrap/service.php
    return new FileCache($frontCache, ['cacheDir' => ROOT_DIR . 'storage/cache/', 'prefix' => 'cache_']);
}, true);


$di->set('cache', function () use ($di) {
    $redis = new Redis();
    $redis->connect($di["config"]->path("cache.host"), $di["config"]->path("cache.port"));
    $redis->select($di["config"]->path("cache.db"));
    return $redis;
}, true);


$di->set('db', function () use ($di) {
    $connection = new Mysql([
        'host'     => $di["config"]->path("database.mysql.host"),
        'port'     => $di["config"]->path("database.mysql.port"),
        'username' => $di["config"]->path("database.mysql.user"),
        'password' => $di["config"]->path("database.mysql.pass"),
        'dbname'   => $di["config"]->path("database.mysql.db"),
        'charset'  => $di["config"]->path("database.mysql.charset"),
    ]);
    $connection->setEventsManager($di['eventsManager']);
    return $connection;
}, true);


$di->set('redis', function () use ($di) {
    $redis = new Redis();
    $redis->connect($di["config"]->path("database.redis.host"), $di["config"]->path("database.redis.port"));
    $redis->select($di["config"]->path("database.redis.db"));
    return $redis;
}, true);


$di->set('mongodb', function () use ($di) {
    return new MongoDBClient(
        "mongodb://" . $di["config"]->path('database.mongodb.host') . ':' . $di["config"]->path('database.mongodb.port'),
        array_filter([
            'username'   => $di["config"]->path('database.mongodb.user'),
            'password'   => $di["config"]->path('database.mongodb.pass'),
Arguments
  1. array:6 [
      "host" => "10.130.91.250"
      "port" => "3306"
      "username" => "web1063"
      "password" => "V_YWR<~Puw%-Y^DM-+JY,Sn98CTAVq"
      "dbname" => "football"
      "charset" => "utf8mb4"
    ]
    
[internal]
[internal]
Arguments
  1. null
    
  2. Phalcon\Di\FactoryDefault {#5}
    
[internal]
Arguments
  1. "db"
    
  2. null
    
[internal]
Arguments
  1. "db"
    
[internal]
Arguments
  1. App\Http\Models\FbConfig {#134}
    
  2. null
    
[internal]
Arguments
  1. App\Http\Models\FbConfig {#134}
    
[internal]
[internal]
Arguments
  1. App\Http\Models\FbConfig {#134}
    
  2. Phalcon\Di\FactoryDefault {#5}
    
[internal]
Arguments
  1. App\Http\Models\FbConfig {#134}
    
  2. "app\http\models\fbconfig-fb_config"
    
  3. "fb_config"
    
  4. ""
    
[internal]
Arguments
  1. App\Http\Models\FbConfig {#134}
    
  2. 13
    
  3. array:2 [
      "value" => true
      "description" => true
    ]
    
[internal]
Arguments
  1. App\Http\Models\FbConfig {#134}
    
  2. array:2 [
      "value" => true
      "description" => true
    ]
    
/usr/share/nginx/html/app/Http/Models/FbConfig.php
namespace App\Http\Models;
 
/**
 * Config Entity
 * @author phuctd <[email protected]>
 * @version 1.0
 * @since 20/11/2019
 *    ___    __          __
 *   / _ \  / /  ___ _  / / ____ ___   ___
 *  / ___/ / _ \/ _ `/ / / / __// _ \ / _ \
 * /_/    /_//_/\_,_/ /_/  \__/ \___//_//_/
 * 
 * High performance, PHP framework
 */
class FbConfig extends AbstractEntity {
 
    public function initialize() {
 
        $this->keepSnapshots(true);
        $this->allowEmptyStringValues(['value', 'description']);
        // Bỏ comment dòng sau để chống update config_name
        $this->skipAttributesOnUpdate(['name']);
    }
 
    public function beforeUpdate() {
        $this->updated = date('Y-m-d H:i:s');
    }
 
    /**
     *
     * @var integer
     * @Primary
     * @Identity
     * @Column(type="integer", length=11, nullable=false)
     */
    public $id;
 
    /**
     *
     * @var string
Arguments
  1. array:2 [
      0 => "value"
      1 => "description"
    ]
    
[internal]
[internal]
Arguments
  1. App\Http\Models\FbConfig {#134}
    
[internal]
Arguments
  1. null
    
  2. Phalcon\Di\FactoryDefault {#5}
    
  3. Phalcon\Mvc\Model\Manager {#116}
    
[internal]
Arguments
  1. "App\Http\Models\FbConfig"
    
  2. true
    
[internal]
[internal]
[internal]
/usr/share/nginx/html/app/Http/Controllers/Controller.php
    public function getAds() {
        $ads = FbAds::find([
                    'columns' => 'html_id,embed_code,default_code,start_date,end_date',
                    'conditions' => 'active=' . FbAds::YES,
                     'cache' => [
                         'key' => 'ads'
                     ]
        ]);
        $adsJSON = [];
        foreach ($ads as $ad) {
            $adsJSON[] = $ad;
        }
        $this->view->ads = json_encode($adsJSON, JSON_UNESCAPED_SLASHES);
    }
 
    /**
     * Load glocal configs from database | cache
     */
    public function getGlobalConfigs() {
        $configs = FbConfig::find();
 
        foreach ($configs as $config) {
            $this->configs[$config->name] = $config->value;
        }
    }
 
    public function setPageMeta() {
        $currentUrl = $this->router->getRewriteUri();
        $pageMeta = FbPageMeta::findFirstByUrl($currentUrl);
        if (!$pageMeta) {
            $this->view->setVars([
                'title' => $this->getConfig('default_title'),
                'keywords' => $this->getConfig('default_keywords'),
                'description' => $this->getConfig('default_description'),
                'ogImage' => $this->getConfig('default_og_image'),
                
            ]);
        } else {
            $this->view->setVars([
                'title' => $pageMeta->meta_title,
/usr/share/nginx/html/app/Http/Controllers/Controller.php
use App\Http\Models\FbRank;
use App\Http\Models\FbArticle;
use App\Http\Models\FbCountry;
use App\Http\Models\FbTeam;
use App\Http\Models\FbAds;
use App\Http\Models\FbNhaCai;
use App\Http\Models\FbPageMeta;
use App\Http\Models\FbAffliateLink;
 
/**
 * Base Controller
 * @package App\Http\Controllers
 */
class Controller extends BaseController {
 
    private $configs = [];
 
    public function initialize() {
        $this->getAds();
        $this->getGlobalConfigs();
        $this->getFavoriteClubs();
        $this->setPageMeta();
 
        # Default vars
        $this->view->setVars([
            'siteName' => $this->getConfig('site_name'),
            'footerHtml' => $this->getConfig('footer_html'),
            'currentUrl' => rtrim($this->url->getBaseUri(), '/') . $this->router->getRewriteUri(),
            'rootUrl' => $this->url->getBaseUri(),
            'facebookPage' => $this->getConfig('facebook_page'),
            'twitterPage' => $this->getConfig('twitter_page'),
            'pinterestPage' => $this->getConfig('pinterest_page'),
            'instagramPage' => $this->getConfig('instagram_page'),
            'linkedPage' => $this->getConfig('linkedin_page'),
            'aboutMePage' => $this->getConfig('aboutme_page'),
            'contactEmail' => $this->getConfig('contact_email'),
            'contactTele' => $this->getConfig('contact_telegram'),
            'headerCode' => $this->getConfig('header_code'),
            'footerMobileHtml' => $this->getConfig('footer_mobile_html'),
            'dmcaCode' => $this->getConfig('dmca_code'),
/usr/share/nginx/html/app/Http/Controllers/MatchController.php
 *   / _ \  / /  ___ _  / / ____ ___   ___
 *  / ___/ / _ \/ _ `/ / / / __// _ \ / _ \
 * /_/    /_//_/\_,_/ /_/  \__/ \___//_//_/
 * 
 * High performance, PHP framework
 */
 
namespace App\Http\Controllers;
 
use App\Http\Models\FbMatchs;
use App\Http\Models\FbMatchReport;
use App\Http\Models\FbLeagua;
use App\Http\Models\FbMatchDetail;
use App\Http\Models\FbLeaguaSeason;
use App\Http\Models\FbHandicap;
 
class MatchController extends Controller {
 
    public function initialize() {
        parent::initialize();
    }
 
    /**
     * Chi tiết trận đấu
     * @param string $homeSlug
     * @param string $guessSlug
     * @param integer $id
     */
    public function detailAction($homeSlug, $guessSlug, $id) {
        if (!is_numeric($id)) {
            return $this->response->redirect($this->url->getBaseUri(), false, 301);
        }
        
        $this->getLeftSideBar();
        $this->getRightSideBar();
 
        $match = FbMatchs::findFirst($id);
 
        if (!$match) {
            return $this->show404();
[internal]
[internal]
/usr/share/nginx/html/bootstrap/kernel.php
        /*
          | Setting Listeners
          |------------------------------------------------------------------
          |
          | config/app.php listeners
          |
         */
        foreach ($this->di['config']->path('app.listeners') as $name => $listener) {
            $this->di['eventsManager']->attach($name, new $listener);
        }
    }

    public function kernel() {
        $application = new Application($this->di);
        $application->setEventsManager($this->di['eventsManager']);
        if ($this->di['config']->path('app.disableView')) {
            $application->useImplicitView(false);
        }
        $application->handle()->send();
    }

}

$app = new Framework;

return $app;
 
/usr/share/nginx/html/bootstrap/kernel.php
 * @link https://github.com/xxtime/phalcon
 */
use Phalcon\Loader;
use Phalcon\Logger;
use Phalcon\Mvc\Application;

/**
 * Class Framework
 * @property \Phalcon\Di|\Phalcon\DiInterface $di
 */
class Framework {

    public $di;

    public function boot() {
        $this->loader();

        $this->setting();

        $this->kernel();
    }

    public function loader() {
        $loader = new Loader();
        $loader->registerNamespaces(array(
            'App' => APP_DIR,
        ))->register();

        require_once ROOT_DIR . 'vendor/autoload.php';
        require_once ROOT_DIR . 'bootstrap/helpers.php';
        $this->di = require_once ROOT_DIR . 'bootstrap/service.php';

        loadEnv();
    }

    public function setting() {

        ini_set("date.timezone", 'Asia/Ho_Chi_Minh');
        date_default_timezone_set('Asia/Ho_Chi_Minh');

/usr/share/nginx/html/public/index.php
 *    ___    __          __
 *   / _ \  / /  ___ _  / / ____ ___   ___
 *  / ___/ / _ \/ _ `/ / / / __// _ \ / _ \
 * /_/    /_//_/\_,_/ /_/  \__/ \___//_//_/
 *
 * @link https://www.xxtime.com
 * @link https://github.com/xxtime/phalcon
 */
 
define('SYSTEM_START', microtime(true));
 
define('ROOT_DIR', dirname(__DIR__) . '/');
 
define('APP_DIR', ROOT_DIR . 'app/');
 
define('CONFIG_DIR', ROOT_DIR . 'config/');
 
$app = require_once ROOT_DIR . "bootstrap/kernel.php";
 
$app->boot();
 

Environment & details:

Key Value
_url
"/tuong-thuat/valmiera---bss-valbss-jelgava-jelg-90595.html"
empty
empty
empty
empty
Key Value
USER
"nginx"
HOME
"/var/lib/nginx"
HTTP_CF_IPCOUNTRY
"US"
HTTP_CDN_LOOP
"cloudflare"
HTTP_CF_CONNECTING_IP
"3.227.239.9"
HTTP_REFERER
"https://kqbongda.pro/tuong-thuat/valmiera---bss-valbss-jelgava-jelg-90595.html"
HTTP_USER_AGENT
"claudebot"
HTTP_ACCEPT
"*/*"
HTTP_CF_VISITOR
"{"scheme":"https"}"
HTTP_X_FORWARDED_PROTO
"https"
HTTP_CF_RAY
"86b89725cf116fe3-SIN"
HTTP_X_FORWARDED_FOR
"3.227.239.9"
HTTP_ACCEPT_ENCODING
"gzip, br"
HTTP_CONNECTION
"Keep-Alive"
HTTP_HOST
"kqbongda.co"
REDIRECT_STATUS
"200"
SERVER_NAME
"_"
SERVER_PORT
"80"
SERVER_ADDR
"165.22.106.3"
REMOTE_PORT
"17422"
REMOTE_ADDR
"162.158.189.101"
SERVER_SOFTWARE
"nginx/1.16.1"
GATEWAY_INTERFACE
"CGI/1.1"
REQUEST_SCHEME
"http"
SERVER_PROTOCOL
"HTTP/1.1"
DOCUMENT_ROOT
"/usr/share/nginx/html/public"
DOCUMENT_URI
"/index.php"
REQUEST_URI
"/tuong-thuat/valmiera---bss-valbss-jelgava-jelg-90595.html"
SCRIPT_NAME
"/index.php"
CONTENT_LENGTH
""
CONTENT_TYPE
""
REQUEST_METHOD
"GET"
QUERY_STRING
"_url=/tuong-thuat/valmiera---bss-valbss-jelgava-jelg-90595.html&"
SCRIPT_FILENAME
"/usr/share/nginx/html/public/index.php"
FCGI_ROLE
"RESPONDER"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
1711639085.7843
REQUEST_TIME
1711639085
empty
0. Whoops\Handler\PrettyPageHandler