A
A
alex5e2016-05-09 10:42:50
Yii
alex5e, 2016-05-09 10:42:50

Why does Yii2 create a bunch of sessions on the server with __flash|a:0:{}?

On the server, I encounter periodic overflow of the temporary folder. I found a bunch of sess_ files in the tmp folder with content like __flash|a:0:{} Tell me what could be the problem?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Melkij, 2016-05-09
@melkij

It's quite obvious from the name that the session starts when using \Yii::$app->session->setFlash
Maybe it always starts in general - you have to dig into the framework code. The piece, most likely, is necessary for your application.
How to live with it: check the session lifetime, what it is and whether you need it.
What generally means "overflow of a temporary folder"?
Do you have limited disk space and do not fit data? Or are there too many files, causing them to slow down?
In the second case, the session.save_path setting will help you , PHP natively knows how to shard session files along a directory tree.

R
Ruslan, 2020-12-14
@Tiasar

I had a similar problem because of the custom UrlManager manager - codemix\localeurls\UrlManager, it started sessions

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question