# Session lost after log file rotation

**URL:** https://discuss.elastic.co/t/session-lost-after-log-file-rotation/273531
**Category:** Kibana
**Tags:** elastic-stack-security
**Created:** [May 20, 2021, 12:22pm UTC](https://discuss.elastic.co/t/session-lost-after-log-file-rotation/273531 "2021-05-20T12:22:34Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Harm](https://avatars.discourse-cdn.com/v4/letter/h/b4bc9f/32.png) [@Harm](https://discuss.elastic.co/u/Harm)
#### Post date: [May 20, 2021, 12:22pm UTC](https://discuss.elastic.co/t/session-lost-after-log-file-rotation/273531/1 "2021-05-20T12:22:34Z")

</div>

Hi,

I have recently upgraded from Kibana 7.10.0 to 7.12.1 and since then I'm observing an issue where all user sessions are getting lost after a logfile rotation.

My current logging settings are:

> logging.dest: "/var/log/kibana/kibana.log"  
> logging.rotate.enabled: true  
> logging.quiet: true  
> logging.verbose: false

My session settings are:

> xpack.security.session.idleTimeout: "7d"  
> xpack.security.session.lifespan: "1Y"

The last log lines in the kibana.log (before rotation) look like this:

> {"type":"log","@timestamp":"2021-05-18T12:47:20+02:00","tags":["info","cli","config"],"pid":440,"message":"Reloading logging configuration due to SIGHUP."}  
> {"type":"log","@timestamp":"2021-05-18T12:47:20+02:00","tags":["info","config"],"pid":440,"message":"New logging configuration:\n{\n "ops": {\n "interval": 5000\n },\n "logging": {\n "dest": "/var/log/kibana/kibana.log",\n "rotate": {\n "enabled": true,\n "everyBytes": 10485760,\n "keepFiles": 7,\n "pollingInterval": 10000,\n "usePolling": false\n },\n "verbose": false,\n "silent": false,\n "quiet": false,\n "events": {},\n "filter": {},\n "json": true\n }\n}"}

The timestamp of the last log rotation matches exacly with (multiple) users complaining that there working session gets lost.

Is this a known issue? Or can I submit it on github?

Tnx, Harm

---

<div class="post-metadata">

### Author: ![bhavyarm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhavyarm/32/22392_2.png) [@bhavyarm](https://discuss.elastic.co/u/bhavyarm)
#### Post date: [May 20, 2021, 6:01pm UTC](https://discuss.elastic.co/t/session-lost-after-log-file-rotation/273531/2 "2021-05-20T18:01:46Z")

</div>

Hello,

I did find an open issue - [Kibana logs and Kibana pid configuration settings seem to be ignored in 7.11 · Issue #91885 · elastic/kibana · GitHub](https://github.com/elastic/kibana/issues/91885)  
Do you want add your details here?

Thanks  
Bhavya

---

<div class="post-metadata">

### Author: ![Harm](https://avatars.discourse-cdn.com/v4/letter/h/b4bc9f/32.png) [@Harm](https://discuss.elastic.co/u/Harm)
#### Post date: [May 21, 2021, 7:02am UTC](https://discuss.elastic.co/t/session-lost-after-log-file-rotation/273531/3 "2021-05-21T07:02:42Z")

</div>

Sure I will add it. I don't see them mentioning session issues during log file rotations, but the issues could be introduced by updates in the same logging mechanism...

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [June 18, 2021, 7:03am UTC](https://discuss.elastic.co/t/session-lost-after-log-file-rotation/273531/4 "2021-06-18T07:03:20Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
