This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

glideagency
glideagency

Hi there,

Every once in a while, our client's website is showing 500 error message saying there was a cache issue (You can see full error message below). The error will then automatically disappear about 10 mins afterwards and the website is back online again.

Any chance you could let us know how we can address this issue permanently? For the time being, we have changed the default cache driver from 'File' to 'Database'.

Please let us know. Many thanks.

=========== Full Error Messages ===========
ErrorException: unserialize(): Error at offset 8171 of 8182 bytes in /home/studyper/public_html/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php:187
Stack trace:
#0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(8, 'unserialize(): ...', '/home/studyper/...', 187, Array)
#1 /home/studyper/public_html/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php(187): unserialize('a:1:{s:15:"live...')
#2 /home/studyper/public_html/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php(49): Illuminate\Cache\FileStore->getPayload('content/static-...')
#3 /home/studyper/public_html/vendor/laravel/framework/src/Illuminate/Cache/Repository.php(86): Illuminate\Cache\FileStore->get('content/static-...')
#4 /home/studyper/public_html/vendor/october/rain/src/Halcyon/MemoryRepository.php(39): Illuminate\Cache\Repository->get('content/static-...', NULL)
#5 /home/studyper/public_html/vendor/laravel/framework/src/Illuminate/Cache/Repository.php(70): October\Rain\Halcyon\MemoryRepository->get('content/static-...')
#6 /home/studyper/public_html/vendor/october/rain/src/Halcyon/Builder.php(638): Illuminate\Cache\Repository->has('content/static-...')
#7 /home/studyper/public_html/vendor/october/rain/src/Halcyon/Builder.php(250): October\Rain\Halcyon\Builder->getCached(Array)
#8 /home/studyper/public_html/vendor/october/rain/src/Halcyon/Builder.php(238): October\Rain\Halcyon\Builder->get()
#9 /home/studyper/public_html/vendor/october/rain/src/Halcyon/Builder.php(228): October\Rain\Halcyon\Builder->first()
#10 /home/studyper/public_html/modules/cms/classes/CmsObject.php(110): October\Rain\Halcyon\Builder->find('live-safety.htm')
#11 /home/studyper/public_html/modules/cms/classes/CmsObject.php(133): Cms\Classes\CmsObject::loadCached(Object(Cms\Classes\Theme), 'live-safety.htm')
#12 /home/studyper/public_html/plugins/rainlab/pages/classes/PageList.php(40): Cms\Classes\CmsObject::listInTheme(Object(Cms\Classes\Theme), false)
#13 /home/studyper/public_html/plugins/rainlab/pages/classes/Router.php(112): RainLab\Pages\Classes\PageList->listPages()
#14 /home/studyper/public_html/plugins/rainlab/pages/classes/Router.php(86): RainLab\Pages\Classes\Router->loadUrlMap()
#15 /home/studyper/public_html/plugins/rainlab/pages/classes/Router.php(57): RainLab\Pages\Classes\Router->getUrlMap()
#16 /home/studyper/public_html/plugins/rainlab/pages/classes/Controller.php(42): RainLab\Pages\Classes\Router->findByUrl('/')
#17 /home/studyper/public_html/plugins/rainlab/pages/Plugin.php(117): RainLab\Pages\Classes\Controller->initCmsPage('/')
#18 [internal function]: RainLab\Pages\Plugin->RainLab\Pages\{closure}('/', Object(Cms\Classes\Router))
#19 /home/studyper/public_html/vendor/october/rain/src/Events/Dispatcher.php(233): call_user_func_array(Object(Closure), Array)
#20 /home/studyper/public_html/vendor/october/rain/src/Events/Dispatcher.php(197): October\Rain\Events\Dispatcher->dispatch('cms.router.befo...', Array, true)
#21 /home/studyper/public_html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(221): October\Rain\Events\Dispatcher->fire('cms.router.befo...', Array, true)
#22 /home/studyper/public_html/modules/cms/classes/Router.php(93): Illuminate\Support\Facades\Facade::__callStatic('fire', Array)
#23 /home/studyper/public_html/modules/cms/classes/Controller.php(153): Cms\Classes\Router->findByUrl('/')
#24 /home/studyper/public_html/modules/cms/classes/CmsController.php(50): Cms\Classes\Controller->run('/')
#25 [internal function]: Cms\Classes\CmsController->run('/')
#26 /home/studyper/public_html/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): call_user_func_array(Array, Array)
#27 /home/studyper/public_html/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\Routing\Controller->callAction('run', Array)
#28 /home/studyper/public_html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(212): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Cms\Classes\CmsController), 'run')
#29 /home/studyper/public_html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(169): Illuminate\Routing\Route->runController()
#30 /home/studyper/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(658): Illuminate\Routing\Route->run()
#31 /home/studyper/public_html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#32 /home/studyper/public_html/plugins/rainlab/translate/classes/LocaleMiddleware.php(29): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#33 /home/studyper/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): RainLab\Translate\Classes\LocaleMiddleware->handle(Object(Illuminate\Http\Request), Object(Closure))
#34 /home/studyper/public_html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#35 /home/studyper/public_html/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(41): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#36 /home/studyper/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Routing\Middleware\SubstituteBindings->handle(Object(Illuminate\Http\Request), Object(Closure))
#37 /home/studyper/public_html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#38 /home/studyper/public_html/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#39 /home/studyper/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#40 /home/studyper/public_html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#41 /home/studyper/public_html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(63): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#42 /home/studyper/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#43 /home/studyper/public_html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#44 /home/studyper/public_html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#45 /home/studyper/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))
#46 /home/studyper/public_html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#47 /home/studyper/public_html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(66): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#48 /home/studyper/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))
#49 /home/studyper/public_html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#50 /home/studyper/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#51 /home/studyper/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(660): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#52 /home/studyper/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(635): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#53 /home/studyper/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(601): Illuminate\Routing\Router->runRoute(Object(Illuminate\Http\Request), Object(Illuminate\Routing\Route))
#54 /home/studyper/public_html/vendor/october/rain/src/Router/CoreRouter.php(20): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#55 /home/studyper/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(176): October\Rain\Router\CoreRouter->dispatch(Object(Illuminate\Http\Request))
#56 /home/studyper/public_html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))
#57 /home/studyper/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(46): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#58 /home/studyper/public_html/vendor/october/rain/src/Foundation/Http/Middleware/CheckForMaintenanceMode.php(24): Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#59 /home/studyper/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): October\Rain\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#60 /home/studyper/public_html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#61 /home/studyper/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#62 /home/studyper/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(151): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#63 /home/studyper/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(116): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#64 /home/studyper/public_html/index.php(43): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#65 {main}

Last updated

JenniferLopez
JenniferLopez

@glideagency Do you have an example of the actual cache file content when this error occurs? From what I can see, it appears to be an error with the unserialize command, so it's likely the content of the cache file is corrupted in some way.

glideagency
glideagency

@BennoThommo Thanks for looking into the issue and the updates. We were unable to retain the actual cache file as the error came up unpredictably. By the time we notice, the website already go back online.

The website seems to be very stable after we switched to database drive so I'm assuming we can keep using it?

Kind regards.

1-3 of 3

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.