admvuzopedia57180
admvuzopedia57180

Hello. I am developing a site on October CMS. The site has high traffic, up to 150,000 unique visitors per day. However, there is a problem. A 500 error pops up chaotically and Unserialize error offset is written to the logs. There are isolated cases, but it so happens that the entire site crashes and does not rise until the cache is cleared. Each error leads to a different file and I don't understand why this might be the case. After clearing the cache, the global 500 disappears, and the single ones are still saved. Does anyone have this? And how to decide

LukeTowers
LukeTowers

Do you have a stack trace of the error?

admvuzopedia57180
admvuzopedia57180

yes. i see different nubmer in errors

ErrorException: unserialize(): Error at offset 2 of 32758 bytes in /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php:78
ErrorException: unserialize(): Error at offset 2 of 24566 bytes in /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php:78

and other

trace for example:

ErrorException: unserialize(): Error at offset 2 of 24566 bytes in /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php:78
Stack trace:
#0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(8, 'unserialize(): ...', '/var/www/site...', 78, Array)
#1 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php(78): unserialize('s:37424:"YTo4MD...')
#2 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php(47): Illuminate\Cache\FileStore->getPayload('cms-php-file-da...')
#3 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Cache/Repository.php(98): Illuminate\Cache\FileStore->get('cms-php-file-da...')
#4 [internal function]: Illuminate\Cache\Repository->get('cms-php-file-da...', false)
#5 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php(318): call_user_func_array(Array, Array)
#6 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(217): Illuminate\Cache\CacheManager->__call('get', Array)
#7 /var/www/site.ru/public_html/modules/cms/classes/CodeParser.php(251): Illuminate\Support\Facades\Facade::__callStatic('get', Array)
#8 /var/www/site.ru/public_html/modules/cms/classes/CodeParser.php(269): Cms\Classes\CodeParser->getCachedInfo()
#9 /var/www/site.ru/public_html/modules/cms/classes/CodeParser.php(83): Cms\Classes\CodeParser->getCachedFileInfo()
#10 /var/www/site.ru/public_html/modules/cms/classes/CodeParser.php(169): Cms\Classes\CodeParser->parse()
#11 /var/www/site.ru/public_html/modules/cms/classes/Controller.php(524): Cms\Classes\CodeParser->source(Object(Cms\Classes\Page), Object(Cms\Classes\Layout), Object(Cms\Classes\Controller))
#12 /var/www/site.ru/public_html/modules/cms/classes/Controller.php(302): Cms\Classes\Controller->initCustomObjects()
#13 /var/www/site.ru/public_html/modules/cms/classes/Controller.php(213): Cms\Classes\Controller->runPage(Object(Cms\Classes\Page))
#14 /var/www/site.ru/public_html/modules/cms/classes/CmsController.php(50): Cms\Classes\Controller->run('news/')
#15 [internal function]: Cms\Classes\CmsController->run('news/1210')
#16 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(256): call_user_func_array(Array, Array)
#17 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(164): Illuminate\Routing\Controller->callAction('run', Array)
#18 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(112): Illuminate\Routing\ControllerDispatcher->call(Object(Cms\Classes\CmsController), Object(Illuminate\Routing\Route), 'run')
#19 [internal function]: Illuminate\Routing\ControllerDispatcher->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#20 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(139): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#21 /var/www/site.ru/public_html/plugins/alxy/captcha/middleware/CaptchaMiddleware.php(51): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#22 [internal function]: Alxy\Captcha\Middleware\CaptchaMiddleware->handle(Object(Illuminate\Http\Request), Object(Closure))
#23 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#24 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#25 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#26 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(114): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#27 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(68): Illuminate\Routing\ControllerDispatcher->callWithinStack(Object(Cms\Classes\CmsController), Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'run')
#28 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(203): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'Cms\\Classes\\Cms...', 'run')
#29 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(134): Illuminate\Routing\Route->runWithCustomDispatcher(Object(Illuminate\Http\Request))
#30 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(708): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))
#31 [internal function]: Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#32 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(139): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#33 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#34 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#35 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(710): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#36 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(674): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#37 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(635): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#38 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(236): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#39 [internal function]: Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))
#40 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(139): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#41 /var/www/site.ru/public_html/plugins/offline/speedy/classes/middleware/CDNMiddleware.php(40): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#42 [internal function]: OFFLINE\Speedy\Classes\Middleware\CDNMiddleware->handle(Object(Illuminate\Http\Request), Object(Closure))
#43 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#44 /var/www/site.ru/public_html/plugins/offline/speedy/classes/middleware/Http2Middleware.php(38): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#45 [internal function]: OFFLINE\Speedy\Classes\Middleware\Http2Middleware->handle(Object(Illuminate\Http\Request), Object(Closure))
#46 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#47 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#48 [internal function]: Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#49 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#50 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(62): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#51 [internal function]: Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#52 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#53 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#54 [internal function]: Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))
#55 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#56 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(59): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#57 [internal function]: Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))
#58 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#59 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(44): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#60 [internal function]: Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#61 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#62 /var/www/site.ru/public_html/plugins/popcornphp/redirecttohttps/classes/HTTPSMiddleware.php(13): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#63 [internal function]: PopcornPHP\RedirectToHTTPS\Classes\HTTPSMiddleware->handle(Object(Illuminate\Http\Request), Object(Closure))
#64 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#65 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#66 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#67 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(122): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#68 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(87): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#69 /var/www/site.ru/public_html/index.php(43): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#70 {main}

using file cache. maybe change to database?

Last updated

LukeTowers
LukeTowers

You can try changing it to database, although it seems like your cache is getting corrupted somehow. Are you able to post the contents of a cache file that triggers the error?

admvuzopedia57180
admvuzopedia57180

but all errors in logs offset 2. only offset 2 of different nubmers.

ErrorException: unserialize(): Error at offset 2 of 32758 bytes in /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php:78
ErrorException: unserialize(): Error at offset 2 of 69622 bytes in /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php:78

for example random trace

ErrorException: unserialize(): Error at offset 2 of 69622 bytes in /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php:78
Stack trace:
#0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(8, 'unserialize(): ...', '/var/www/site...', 78, Array)
#1 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php(78): unserialize('s:73760:"YToxNT...')
#2 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php(47): Illuminate\Cache\FileStore->getPayload('cms-php-file-da...')
#3 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Cache/Repository.php(98): Illuminate\Cache\FileStore->get('cms-php-file-da...')
#4 [internal function]: Illuminate\Cache\Repository->get('cms-php-file-da...', false)
#5 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php(318): call_user_func_array(Array, Array)
#6 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(217): Illuminate\Cache\CacheManager->__call('get', Array)
#7 /var/www/site.ru/public_html/modules/cms/classes/CodeParser.php(251): Illuminate\Support\Facades\Facade::__callStatic('get', Array)
#8 /var/www/site.ru/public_html/modules/cms/classes/CodeParser.php(269): Cms\Classes\CodeParser->getCachedInfo()
#9 /var/www/site.ru/public_html/modules/cms/classes/CodeParser.php(83): Cms\Classes\CodeParser->getCachedFileInfo()
#10 /var/www/site.ru/public_html/modules/cms/classes/CodeParser.php(169): Cms\Classes\CodeParser->parse()
#11 /var/www/site.ru/public_html/modules/cms/classes/Controller.php(896): Cms\Classes\CodeParser->source(Object(Cms\Classes\Page), Object(Cms\Classes\Layout), Object(Cms\Classes\Controller))
#12 /var/www/site.ru/public_html/modules/cms/twig/Extension.php(117): Cms\Classes\Controller->renderPartial('new/header', Array)
#13 /var/www/site.ru/public_html/storage/cms/twig/d7/d7771c1e16d57afaa48331c9445e65471b8b95852ad41361c02f306698f8edb4.php(71): Cms\Twig\Extension->partialFunction('new/header', Array)
#14 /var/www/site.ru/public_html/vendor/twig/twig/lib/Twig/Template.php(432): __TwigTemplate_e3368e791ec891ffdc61f1efe7cf7b439253c6b4698a3aa93136dd0d627df920->doDisplay(Array, Array)
#15 /var/www/site.ru/public_html/vendor/twig/twig/lib/Twig/Template.php(403): Twig_Template->displayWithErrorHandling(Array, Array)
#16 /var/www/site.ru/public_html/vendor/twig/twig/lib/Twig/Template.php(411): Twig_Template->display(Array)
#17 /var/www/site.ru/public_html/modules/cms/classes/Controller.php(376): Twig_Template->render(Array)
#18 /var/www/site.ru/public_html/modules/cms/classes/Controller.php(213): Cms\Classes\Controller->runPage(Object(Cms\Classes\Page))
#19 /var/www/site.ru/public_html/modules/cms/classes/CmsController.php(50): Cms\Classes\Controller->run('page/4315')
#20 [internal function]: Cms\Classes\CmsController->run('page/4315')
#21 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(256): call_user_func_array(Array, Array)
#22 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(164): Illuminate\Routing\Controller->callAction('run', Array)
#23 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(112): Illuminate\Routing\ControllerDispatcher->call(Object(Cms\Classes\CmsController), Object(Illuminate\Routing\Route), 'run')
#24 [internal function]: Illuminate\Routing\ControllerDispatcher->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#25 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(139): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#26 /var/www/site.ru/public_html/plugins/alxy/captcha/middleware/CaptchaMiddleware.php(51): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#27 [internal function]: Alxy\Captcha\Middleware\CaptchaMiddleware->handle(Object(Illuminate\Http\Request), Object(Closure))
#28 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#29 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#30 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#31 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(114): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#32 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(68): Illuminate\Routing\ControllerDispatcher->callWithinStack(Object(Cms\Classes\CmsController), Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'run')
#33 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(203): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'Cms\\Classes\\Cms...', 'run')
#34 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(134): Illuminate\Routing\Route->runWithCustomDispatcher(Object(Illuminate\Http\Request))
#35 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(708): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))
#36 [internal function]: Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#37 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(139): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#38 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#39 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#40 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(710): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#41 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(674): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#42 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(635): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#43 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(236): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#44 [internal function]: Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))
#45 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(139): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#46 /var/www/site.ru/public_html/plugins/offline/speedy/classes/middleware/CDNMiddleware.php(40): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#47 [internal function]: OFFLINE\Speedy\Classes\Middleware\CDNMiddleware->handle(Object(Illuminate\Http\Request), Object(Closure))
#48 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#49 /var/www/site.ru/public_html/plugins/offline/speedy/classes/middleware/Http2Middleware.php(38): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#50 [internal function]: OFFLINE\Speedy\Classes\Middleware\Http2Middleware->handle(Object(Illuminate\Http\Request), Object(Closure))
#51 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#52 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#53 [internal function]: Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#54 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#55 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(62): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#56 [internal function]: Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#57 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#58 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#59 [internal function]: Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))
#60 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#61 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(59): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#62 [internal function]: Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))
#63 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#64 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(44): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#65 [internal function]: Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#66 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#67 /var/www/site.ru/public_html/plugins/popcornphp/redirecttohttps/classes/HTTPSMiddleware.php(13): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#68 [internal function]: PopcornPHP\RedirectToHTTPS\Classes\HTTPSMiddleware->handle(Object(Illuminate\Http\Request), Object(Closure))
#69 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#70 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#71 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#72 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(122): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#73 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(87): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#74 /var/www/site.ru/public_html/index.php(43): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#75 {main}
Next Twig_Error_Runtime: An exception has been thrown during the rendering of a template ("unserialize(): Error at offset 2 of 69622 bytes") in "/var/www/site.ru/public_html/themes/site/layouts/new.htm" at line 18. in /var/www/site.ru/public_html/vendor/twig/twig/lib/Twig/Template.php:447
Stack trace:
#0 /var/www/site.ru/public_html/vendor/twig/twig/lib/Twig/Template.php(403): Twig_Template->displayWithErrorHandling(Array, Array)
#1 /var/www/site.ru/public_html/vendor/twig/twig/lib/Twig/Template.php(411): Twig_Template->display(Array)
#2 /var/www/site.ru/public_html/modules/cms/classes/Controller.php(376): Twig_Template->render(Array)
#3 /var/www/site.ru/public_html/modules/cms/classes/Controller.php(213): Cms\Classes\Controller->runPage(Object(Cms\Classes\Page))
#4 /var/www/site.ru/public_html/modules/cms/classes/CmsController.php(50): Cms\Classes\Controller->run('site/4315')
#5 [internal function]: Cms\Classes\CmsController->run('site/4315')
#6 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(256): call_user_func_array(Array, Array)
#7 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(164): Illuminate\Routing\Controller->callAction('run', Array)
#8 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(112): Illuminate\Routing\ControllerDispatcher->call(Object(Cms\Classes\CmsController), Object(Illuminate\Routing\Route), 'run')
#9 [internal function]: Illuminate\Routing\ControllerDispatcher->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#10 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(139): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#11 /var/www/site.ru/public_html/plugins/alxy/captcha/middleware/CaptchaMiddleware.php(51): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#12 [internal function]: Alxy\Captcha\Middleware\CaptchaMiddleware->handle(Object(Illuminate\Http\Request), Object(Closure))
#13 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#14 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#15 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#16 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(114): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#17 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(68): Illuminate\Routing\ControllerDispatcher->callWithinStack(Object(Cms\Classes\CmsController), Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'run')
#18 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(203): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'Cms\\Classes\\Cms...', 'run')
#19 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(134): Illuminate\Routing\Route->runWithCustomDispatcher(Object(Illuminate\Http\Request))
#20 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(708): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))
#21 [internal function]: Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#22 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(139): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#23 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#24 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#25 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(710): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#26 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(674): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#27 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(635): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#28 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(236): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#29 [internal function]: Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))
#30 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(139): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#31 /var/www/site.ru/public_html/plugins/offline/speedy/classes/middleware/CDNMiddleware.php(40): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#32 [internal function]: OFFLINE\Speedy\Classes\Middleware\CDNMiddleware->handle(Object(Illuminate\Http\Request), Object(Closure))
#33 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#34 /var/www/site.ru/public_html/plugins/offline/speedy/classes/middleware/Http2Middleware.php(38): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#35 [internal function]: OFFLINE\Speedy\Classes\Middleware\Http2Middleware->handle(Object(Illuminate\Http\Request), Object(Closure))
#36 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#37 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#38 [internal function]: Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#39 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#40 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(62): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#41 [internal function]: Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#42 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#43 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#44 [internal function]: Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))
#45 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#46 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(59): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#47 [internal function]: Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))
#48 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#49 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(44): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#50 [internal function]: Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#51 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#52 /var/www/site.ru/public_html/plugins/popcornphp/redirecttohttps/classes/HTTPSMiddleware.php(13): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#53 [internal function]: PopcornPHP\RedirectToHTTPS\Classes\HTTPSMiddleware->handle(Object(Illuminate\Http\Request), Object(Closure))
#54 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#55 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#56 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#57 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(122): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#58 /var/www/site.ru/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(87): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#59 /var/www/site.ru/public_html/index.php(43): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#60 {main}
admvuzopedia57180
admvuzopedia57180

unfortunately, the logs do not record the complete path to the problem file, so I cannot see the specific file that it refers to. but now I'll try to find and throw it off. thank you very much for helping

admvuzopedia57180
admvuzopedia57180

if use the cache from the database, then the load on the server increases very much. per day, the site currently has more than 1.5 million views per day and probably this will not allow switching from the file. even when deleting the cache via the widget, part of the cache is automatically part of the framework's cache is not deleted, but remains (approximately 13 megabytes). I'll try to find problem files

admvuzopedia57180
admvuzopedia57180

and the unserialize error appears exactly when the number of visitors grows. at 40000-50000 this is a very rare error

admvuzopedia57180
admvuzopedia57180

I thought that automatically deleting the cache by cron every 5 minutes would help to avoid the site crash, but when you delete the cache, some users get a 500 error due to

Symfony \ Component \ Debug \ Exception \ FatalErrorException: Uncaught Error: Class 'Cms5f21e6f2e09ac200691047_77e148bb34bbe3deb7 varc63' /www/site.ru/public_html/modules/cms/classes/CodeParser.php:180

Last updated

admvuzopedia57180
admvuzopedia57180

apparently the problem was solved by removing the plugin from Speedy. site on nginx, and the plugin works with apache. there have been no errors for 20 minutes. finally a mistake costing 40,000 visitors per month has been resolved. really hope that helps someone

LukeTowers
LukeTowers

What was the problem plugin that you had to remove?

admvuzopedia57180
admvuzopedia57180

this is the speedy.cache plugin. it worked with htaccess and was installed when the site was on apache. a year ago, when the site was being optimized for high load, they switched to nginx and only out of their stupidity did not delete this plugin, which was provoked by errors with the cache. because of my stupidity, I lost a lot of visitors and customers, but they only learn from their mistakes, so thank you very much that only by posting the problem here I could analyze it from the outside. and hope it will be useful to someone in the future

Last updated

admvuzopedia57180
admvuzopedia57180

although now I saw this error again. but this is already 1 error serialize in 2 hours, and not 100+ as it was before. I will continue to analyze and write on this topic. previously wrote in the telegram chat october - no one could help. apparently a very rare mistake. there are hundreds of views and partials on the site and 1,500,000+ requests per day for them. something is wrong. it is very annoying

admvuzopedia57180
admvuzopedia57180

the problem was solved by switching the file cache to memcache. maybe the powers couldn't handle the processes though like ssd. thanks for the help

1-14 of 14