$e Exception#412 (7) "Исчерпан суточный лимит запросов"
  • Source
  • Properties (7)
  • Methods (11)
  • toString
  • try {
    // ПРОВЕРКА ЛИМИТОВ ПЕРЕД ОТПРАВКОЙ ЗАПРОСА
    if (!ApiRateLimiter::checkAndThrottle()) {
    // Лимит исчерпан! Возвращаем безопасный "пустой" ответ,
    // чтобы сайт не упал с фатальной ошибкой, а просто показал 0 результатов
    $httpCode = 429;
    throw new Exception("Исчерпан суточный лимит запросов", 429);
    }
    // Выбор доступного API-сервера через пул Битрикса
    $server = $serverManager->getAvailableServer();
    if ($server === null) {
    throw new Exception("Нет доступных API серверов для выполнения запроса.", 503);
    }
  • protected message -> UTF-8 string (61) "Исчерпан суточный лимит запросов"
    private string -> string (0) ""
    protected code -> integer 429
    protected file -> string (68) "/home/bitrix/www/public/local/modules/tggo.api/lib/api/apifacade.php"
    • File (19.8KB)
    • -rw-r--r-- 600 600 20303 May 25 04:50 /home/bitrix/www/public/local/modules/tggo.api/lib/api/apifacade.php
      
    protected line -> integer 382
    private trace -> Debug Backtrace (19)
    <ROOT>/local/modules/tggo.api/lib/api/apifacade.php:37 Tggo\Api\ApiFacade::request(string $endpoint, array $params, bool $useCache = true, ?int $cacheTtl = null, ?int &$httpCode = 200)
    • Source
    • * @param string $identifier Username, телефон, ID или хэш ссылки.
      * @param bool $debug Если true, возвращает сырые данные от Telethon.
      * @return array
      * @throws Exception
      */
      public static function getEntityFullInfo(string $identifier, bool $debug = false, bool $useCache = true, ?int $cacheTtl = null, ?int &$httpCode = 200): array
      {
      return self::request('/entity/info', ['identifier' => $identifier, 'detailed' => true, 'debug' => $debug], $useCache, $cacheTtl, $httpCode);
      }
      /**
      * Получает публичную информацию по пригласительной ссылке.
      * @param string $invite_hash Хэш из пригласительной ссылки.
      * @return array
      * @throws Exception
    <ROOT>/local/modules/tggo.api/lib/telegramrepository.php:59 Tggo\Api\ApiFacade::getEntityFullInfo(string $identifier, bool $debug = false, bool $useCache = true, ?int $cacheTtl = null, ?int &$httpCode = 200)
    • Source
    • self::saveEntityError($identifier, $statusCode);
      return null;
      }
      // 1. Делаем запрос к API через фасад
      // Устанавливаем useCache=false, так как ApiFacade использует свой кеш (memcached),
      // а мы строим свой, более долгосрочный, на уровне БД.
      $entityInfo = ApiFacade::getEntityFullInfo($identifier, false, true, $cacheTtl, $httpCode);
      d($entityInfo, $httpCode);
      $entityId = (int)$entityInfo['id'];
      $mainUsername = $entityInfo['username'] ?? null;
      if (empty($entityInfo) || empty($entityInfo['id'])) {
      self::saveEntityError($identifier, $httpCode);
      return null;
    <ROOT>/local/modules/tggo.api/lib/entitymanager.php:81 Tggo\TelegramRepository::fetchAndSaveEntity(string $identifier, $cacheTtl = 86400)
    • Source
    • // СИНХРОННЫЙ РЕЖИМ (прямой вызов API)
      $freshData = null;
      if ($isInvite) {
      $freshData = \Tggo\TelegramRepository::fetchFromInvite($identifier, $cacheTtl);
      } else {
      $freshData = \Tggo\Username::isValid($identifier)
      ? \Tggo\TelegramRepository::fetchAndSaveEntity($identifier, $cacheTtl)
      : null;
      }
      if ($freshData) {
      return \Tggo\User::getById($freshData['id']);
      }
      }
    <ROOT>/local/components/tggo/channel.post/class.php:151 Tggo\EntityManager::getEntity(string $identifier, int $cacheTtl = 86400, bool $async = false)
    • Source
    • /**
      * Основной метод для получения и подготовки данных.
      */
      protected function prepareResult(): bool
      {
      // 1. Получаем информацию о канале через EntityManager
      $this->arResult = EntityManager::getEntity($this->arParams['USERNAME'], $this->arParams['CACHE_TIME']);
      if ((int)$this->arResult['BLOCKED']) {
      return false;
      }
      if (empty($this->arResult['ID']) || !in_array($this->arResult['TYPE'], ['channel', 'megagroup', 'gigagroup'])) {
      return false; // Канал не найден или это не канал
    <ROOT>/local/components/tggo/channel.post/class.php:63 TggoChannelPost::prepareResult()
    • Source
    • if (!$this->checkRequiredParams()) {
      // Если обязательные параметры не переданы, показываем 404
      $this->show404();
      return;
      }
      // Вся логика получения данных теперь инкапсулирована здесь
      if ($this->prepareResult()) {
      // Если это виджет, подключаем специальный шаблон 'embed', иначе дефолтный
      $templatePage = $this->arResult['IS_EMBED'] ? 'embed' : '';
      $this->IncludeComponentTemplate($templatePage);
      } else {
      $this->show404();
      return;
      }
    <ROOT>/bitrix/modules/main/classes/general/component.php:675 TggoChannelPost::executeComponent()
    • Source
    • if($returnResult)
      {
      $component->executeComponent();
      $result = $component->arResult;
      }
      else
      {
      $result = $component->executeComponent();
      }
      $this->__arIncludeAreaIcons = $component->__arIncludeAreaIcons;
      $frameMode = $component->getFrameMode();
      $componentFrame->end();
      }
    <ROOT>/bitrix/modules/main/classes/general/main.php:1188 CBitrixComponent::includeComponent($componentTemplate, $arParams, $parentComponent, $returnResult = false)
    • Source
    • {
      if (($arParams['AJAX_MODE'] ?? '') == 'Y')
      {
      $obAjax = new CComponentAjax($componentName, $componentTemplate, $arParams, $parentComponent);
      }
      $this->__componentStack[] = $component;
      $result = $component->IncludeComponent($componentTemplate, $arParams, $parentComponent, $returnResult);
      array_pop($this->__componentStack);
      }
      if ($bDrawIcons)
      {
      $panel = new CComponentPanel($component, $componentName, $componentTemplate, $parentComponent, $bComponentEnabled);
    <ROOT>/local/components/tggo/main/templates/.default/post.php:6 CAllMain::IncludeComponent($componentName, $componentTemplate, $arParams = array(), $parentComponent = null, $arFunctionParams = array(), $returnResult = false)
    • Source
    • <?
      if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();
      //d($arResult);
      define("HIDE_FOOTER", true);
      $APPLICATION->IncludeComponent(
      "tggo:channel.post",
      "",
      array(
      "USERNAME" => $arResult['VARIABLES']['USERNAME'],
      "POST_ID" => $arResult['VARIABLES']['POST_ID'],
      "SEF_FOLDER" => $arParams["SEF_FOLDER"],
      "SEF_URL_TEMPLATES" => $arParams["SEF_URL_TEMPLATES"],
    <ROOT>/bitrix/modules/main/classes/general/component_template.php:790
    • Source
    • Arguments (1)
    • {
      include($_SERVER["DOCUMENT_ROOT"].$this->__fileAlt);
      return null;
      }
      $templateData = false;
      include($_SERVER["DOCUMENT_ROOT"].$this->__file);
      for ($i = count($this->frames) - 1; $i >= 0; $i--)
      {
      $frame = $this->frames[$i];
      if ($frame->isStarted() && !$frame->isEnded())
      {
      $frame->end();
    • 0 => string (78) "/home/bitrix/www/public/local/components/tggo/main/templates/.default/post.php"
      • File (460B)
      • -rw-r--r-- 600 600 460 May 19 18:20 /home/bitrix/www/public/local/components/tggo/main/templates/.default/post.php
        
    <ROOT>/bitrix/modules/main/classes/general/component_template.php:885 CBitrixComponentTemplate::__IncludePHPTemplate(&$arResult, &$arParams, $parentTemplateFolder = '')
    • Source
    • $this->__folder,
      $parentTemplateFolder,
      $this
      );
      }
      else
      {
      $result = $this->__IncludePHPTemplate($arResult, $arParams, $parentTemplateFolder);
      }
      return $result;
      }
      /**
      * Includes template language file.
    <ROOT>/bitrix/modules/main/classes/general/component.php:791 CBitrixComponentTemplate::IncludeTemplate(&$arResult)
    • Source
    • */
      final public function showComponentTemplate()
      {
      if (!$this->__bInited)
      return null;
      if ($this->__template)
      $this->__template->includeTemplate($this->arResult);
      if(is_array($this->arResultCacheKeys))
      {
      $arNewResult = array();
      foreach($this->arResultCacheKeys as $key)
      if(array_key_exists($key, $this->arResult))
      $arNewResult[$key] = $this->arResult[$key];
    <ROOT>/bitrix/modules/main/classes/general/component.php:731 CBitrixComponent::showComponentTemplate()
    • Source
    • final public function includeComponentTemplate($templatePage = "", $customTemplatePath = "")
      {
      if (!$this->__bInited)
      return null;
      if ($this->initComponentTemplate($templatePage, $this->getSiteTemplateId(), $customTemplatePath))
      {
      $this->showComponentTemplate();
      if($this->__component_epilog)
      $this->includeComponentEpilog($this->__component_epilog);
      }
      else
      {
      $this->abortResultCache();
      $this->__showError(str_replace(
    <ROOT>/local/components/tggo/main/component.php:63 CBitrixComponent::includeComponentTemplate($templatePage = '', $customTemplatePath = '')
    • Source
    • $arResult = array(
      "FOLDER" => $SEF_FOLDER,
      "URL_TEMPLATES" => $arUrlTemplates,
      "VARIABLES" => $arVariables,
      "ALIASES" => $arVariableAliases
      );
      //d($componentPage);
      $this->IncludeComponentTemplate($componentPage);
    <ROOT>/bitrix/modules/main/classes/general/component.php:622
    • Source
    • Arguments (1)
    • else
      {
      $parentComponentName = "";
      $parentComponentPath = "";
      $parentComponentTemplate = "";
      }
      return include($_SERVER["DOCUMENT_ROOT"].$this->__path."/component.php");
      }
      /**
      * Function executes the component. Returns the result of it's execution.
      *
      * <p>Note: component must be inited by initComponent method.</p>
      * @param string $componentTemplate
      * @param array $arParams
    • 0 => string (64) "/home/bitrix/www/public/local/components/tggo/main/component.php"
      • File (1.9KB)
      • -rw-r--r-- 600 600 1960 May 19 18:20 /home/bitrix/www/public/local/components/tggo/main/component.php
        
    <ROOT>/bitrix/modules/main/classes/general/component.php:699 CBitrixComponent::__includeComponent()
    • Source
    • if($returnResult)
      {
      $this->__IncludeComponent();
      $result = $this->arResult;
      }
      else
      {
      $result = $this->__IncludeComponent();
      }
      $frameMode = $this->getFrameMode();
      $componentFrame->end();
      }
    <ROOT>/bitrix/modules/main/classes/general/main.php:1188 CBitrixComponent::includeComponent($componentTemplate, $arParams, $parentComponent, $returnResult = false)
    • Source
    • {
      if (($arParams['AJAX_MODE'] ?? '') == 'Y')
      {
      $obAjax = new CComponentAjax($componentName, $componentTemplate, $arParams, $parentComponent);
      }
      $this->__componentStack[] = $component;
      $result = $component->IncludeComponent($componentTemplate, $arParams, $parentComponent, $returnResult);
      array_pop($this->__componentStack);
      }
      if ($bDrawIcons)
      {
      $panel = new CComponentPanel($component, $componentName, $componentTemplate, $parentComponent, $bComponentEnabled);
    <ROOT>/username/index.php:5 CAllMain::IncludeComponent($componentName, $componentTemplate, $arParams = array(), $parentComponent = null, $arFunctionParams = array(), $returnResult = false)
    • Source
    • <?
      require($_SERVER["DOCUMENT_ROOT"]."/bitrix/header.php");
      $APPLICATION->SetTitle("Telegram global search");
      ?>
      <?$APPLICATION->IncludeComponent(
      "tggo:main",
      ".default",
      array(
      "COMPONENT_TEMPLATE" => ".default",
      "SEF_MODE" => "Y",
      "SEF_FOLDER" => "/",
      "AJAX_MODE" => "N",
    <ROOT>/bitrix/modules/main/include/urlrewrite.php:128
    • Source
    • Arguments (1)
    • }
      else
      {
      header($_SERVER["SERVER_PROTOCOL"] . " 200 OK");
      }
      $_SERVER["REAL_FILE_PATH"] = $url;
      include_once $io->GetPhysicalName($_SERVER['DOCUMENT_ROOT'] . $url);
      die();
      }
      }
      }
      //admin section 404
      if (str_starts_with($requestUri, "/bitrix/admin/"))
    • 0 => string (42) "/home/bitrix/www/public/username/index.php"
      • File (858B)
      • -rw-r--r-- 600 600 858 May 19 18:28 /home/bitrix/www/public/username/index.php
        
    <ROOT>/bitrix/urlrewrite.php:2
    • Source
    • Arguments (1)
    • <?
      include_once($_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/main/include/urlrewrite.php');
      if(file_exists($_SERVER['DOCUMENT_ROOT'].'/404.php'))
      include_once($_SERVER['DOCUMENT_ROOT'].'/404.php');
      ?>
    • 0 => string (66) "/home/bitrix/www/public/bitrix/modules/main/include/urlrewrite.php"
      • File (3.6KB)
      • -rw-r--r-- 600 600 3650 May 19 18:19 /home/bitrix/www/public/bitrix/modules/main/include/urlrewrite.php
        
    private previous -> null
  • private __clone(): void
    public __construct(string $message = '', int $code = 0, ?Throwable $previous = null)
    new \Exception()
    public __wakeup()
    final public getMessage(): string
    $e->getMessage()
    final public getCode()
    $e->getCode()
    final public getFile(): string
    $e->getFile()
    final public getLine(): int
    $e->getLine()
    final public getTrace(): array
    $e->getTrace()
    final public getPrevious(): ?Throwable
    $e->getPrevious()
    final public getTraceAsString(): string
    $e->getTraceAsString()
    public __toString(): string
    (string) $e
  • $e UTF-8 string (2305) "Exception: Исчерпан суточный лимит запросов in /home/bitrix/www/public/local...
    (string) $e
    Exception: Исчерпан суточный лимит запросов in /home/bitrix/www/public/local/modules/tggo.api/lib/api/apifacade.php:382
    Stack trace:
    #0 /home/bitrix/www/public/local/modules/tggo.api/lib/api/apifacade.php(37): Tggo\Api\ApiFacade::request()
    #1 /home/bitrix/www/public/local/modules/tggo.api/lib/telegramrepository.php(59): Tggo\Api\ApiFacade::getEntityFullInfo()
    #2 /home/bitrix/www/public/local/modules/tggo.api/lib/entitymanager.php(81): Tggo\TelegramRepository::fetchAndSaveEntity()
    #3 /home/bitrix/www/public/local/components/tggo/channel.post/class.php(151): Tggo\EntityManager::getEntity()
    #4 /home/bitrix/www/public/local/components/tggo/channel.post/class.php(63): TggoChannelPost->prepareResult()
    #5 /home/bitrix/www/public/bitrix/modules/main/classes/general/component.php(675): TggoChannelPost->executeComponent()
    #6 /home/bitrix/www/public/bitrix/modules/main/classes/general/main.php(1188): CBitrixComponent->includeComponent()
    #7 /home/bitrix/www/public/local/components/tggo/main/templates/.default/post.php(6): CAllMain->IncludeComponent()
    #8 /home/bitrix/www/public/bitrix/modules/main/classes/general/component_template.php(790): include('...')
    #9 /home/bitrix/www/public/bitrix/modules/main/classes/general/component_template.php(885): CBitrixComponentTemplate->__IncludePHPTemplate()
    #10 /home/bitrix/www/public/bitrix/modules/main/classes/general/component.php(791): CBitrixComponentTemplate->IncludeTemplate()
    #11 /home/bitrix/www/public/bitrix/modules/main/classes/general/component.php(731): CBitrixComponent->showComponentTemplate()
    #12 /home/bitrix/www/public/local/components/tggo/main/component.php(63): CBitrixComponent->includeComponentTemplate()
    #13 /home/bitrix/www/public/bitrix/modules/main/classes/general/component.php(622): include('...')
    #14 /home/bitrix/www/public/bitrix/modules/main/classes/general/component.php(699): CBitrixComponent->__includeComponent()
    #15 /home/bitrix/www/public/bitrix/modules/main/classes/general/main.php(1188): CBitrixComponent->includeComponent()
    #16 /home/bitrix/www/public/username/index.php(5): CAllMain->IncludeComponent()
    #17 /home/bitrix/www/public/bitrix/modules/main/include/urlrewrite.php(128): include_once('...')
    #18 /home/bitrix/www/public/bitrix/urlrewrite.php(2): include_once('...')
    #19 {main}
    
$httpCode integer 429
avatar
Тарас Григорович пише! (Факти, історії, поезія, цікаве!)
@obodrenieUkraine
16.04.2026 15:19
Розрив між Північчю та Півднем Італії — так званий Mezzogiorno — є одним із найяскравіших прикладів того, як географія формує не лише економіку, а й психологію, соціальні структури та повсякденний побут цілої нації.

Ця межа проходить не по карті, а через спосіб життя.

⬆️ Північ (Рівнини та Альпи)

Наявність величезної Паданської рівнини та близькість до Центральної Європи зробили цей регіон промисловим серцем.

Річки та доступ до європейських ринків через Альпійські перевали сприяли ранній індустріалізації.

Тут зосереджені штаб-квартири світових гігантів (Ferrari, Prada, UniCredit).

Життя тут динамічне, засноване на ефективності, суворій робочій етиці та високих доходах.

Це світ «європейської» Італії.

Мешканці Мілана чи Турина більше цінують приватність, пунктуальність та кар'єрні досягнення.

Соціальні структури тут більш формальні.

⬇️ Південь (Гори та Море)

Південь — це переважно гористий ландшафт (Апенніни) та посушливий клімат.

Віддаленість від європейських торгових шляхів перетворила його на аграрний край, орієнтований на море, що історично робило його вразливим до нападів та колонізацій.

Економіка досі значною мірою залежить від сільського господарства, туризму та державних субсидій.

Рівень безробіття (особливо серед молоді) тут значно вищий, що спричиняє постійну міграцію робочої сили на північ.

Через історичну нестабільність та аграрний уклад, на Півдні виник культ сім'ї та клановості.

Соціальні зв'язки тут є «клеєм», що замінює слабкі державні інститути.

Це джерело як неймовірної гостинності, так і, на жаль, підґрунтя для організованої злочинності.

---
@obodrenieUkraine
👍 5
1
🙏 1
1 158

Обсуждение 0

Обсуждение не доступно в веб-версии. Чтобы написать комментарий, перейдите в приложение Telegram.

Обсудить в Telegram