使用laravel会话与文件驱动程序时出错

时间:2016-09-09 15:24:41

标签: php laravel session

我们使用laravel 4.2.19实现了一个webapp。

一切运作良好,除非在极少数情况下我们得到错误:

462 production.ERROR: exception 'ErrorException' with message 'file_put_contents(): Exclusive locks are not supported for this stream' in /var/www/webapp/src/backend/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:70
 463 Stack trace:
 464 #0 [internal function]: Illuminate\Exception\Handler->handleError(2, 'file_put_conten...', '/var/www/weba...', 70, Array)
 465 #1 /var/www/webapp/src/backend/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(70): file_put_contents('/var/www/weba...', 'a:3:{s:6:"_toke...', 2)
 466 #2 /var/www/webapp/src/backend/vendor/laravel/framework/src/Illuminate/Session/FileSessionHandler.php(69): Illuminate\Filesystem\Filesystem->put('/var/www/weba...', 'a:3:{s:6:"_toke...', true)
 467 #3 /var/www/webapp/src/backend/vendor/laravel/framework/src/Illuminate/Session/Store.php(236): Illuminate\Session\FileSessionHandler->write('ac4a0ff71ea5f0e...', 'a:3:{s:6:"_toke...')
 468 #4 /var/www/webapp/src/backend/vendor/laravel/framework/src/Illuminate/Session/Middleware.php(126): Illuminate\Session\Store->save()
 469 #5 /var/www/webapp/src/backend/vendor/laravel/framework/src/Illuminate/Session/Middleware.php(79): Illuminate\Session\Middleware->closeSession(Object(Illuminate\Session\Store))
 470 #6 /var/www/webapp/src/backend/vendor/laravel/framework/src/Illuminate/Cookie/Queue.php(47): Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request), 1, true)
 471 #7 /var/www/webapp/src/backend/vendor/laravel/framework/src/Illuminate/Cookie/Guard.php(51): Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1, true)
 472 #8 /var/www/webapp/src/backend/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true)
 473 #9 /var/www/webapp/src/backend/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(641): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request))
 474 #10 /var/www/webapp/src/backend/public/index.php(49): Illuminate\Foundation\Application->run()
 475 #11 {main} [] []

它显示为laravel将会话保存到文件。

这种情况每月只发生10次,但仍然会给这些用户带来问题。

我的猜测是系统上发生了一些导致此错误的事情。 像运行另一个进程打开太多文件的东西。

关于我如何调查此事的任何想法或想法?

感谢。

0 个答案:

没有答案