Laravel Session files not cleaning from the framework/sessions folder

送分小仙女□ 提交于 2019-12-06 04:49:27

There some step that you can find what's problem is first

  1. Make sure session ID is fixed in every page (echo session id)

if session id was changed every page , you need to check your session config domain setting is correct.

if session id didn't change maybe you need change storage folder premision to 777.

I hope that can help you.

marlo

If you are using haproxy, consider this answer:

Session files may be created by the haproxy's http health checks.

  1. Check your web access logs to fixed interval access.

111.11.111.1 - - [28/Jul/2016:10:40:30 -0400] 200 "GET / HTTP/1.0" 4 "-" "-" "-"

111.11.111.1 - - [28/Jul/2016:10:40:32 -0400] 200 "GET / HTTP/1.0" 4 "-" "-" "-"

111.11.111.1 - - [28/Jul/2016:10:40:34 -0400] 200 "GET / HTTP/1.0" 4 "-" "-" "-"

  1. Update option httpchk GET / to point to some routes that you could set the session driver to be array on your haproxy.cfg.

  2. add the Config::set('session.driver', 'array'); line to disable creation of session files.


Reference:

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!