sdelements / lets-chat

Self-hosted chat app for small teams
http://sdelements.github.io/lets-chat
MIT License
9.76k stars 1.58k forks source link

Each REST API call results in a new session #726

Open Cyberwizzard opened 7 years ago

Cyberwizzard commented 7 years ago

I have a script which polls for new rooms for hubot to join every 30 seconds. This is done using the REST API and a Bearer token for authentication.

But at some point I noticed my session table has 30000+ entries, a few dozen belonging to users and the rest do not have a user account associated with them. Also, a new entry appears every 30 seconds - right after the REST API was used to get the list of rooms on the server.

The last time we went up to 50000 sessions before the server ran out of memory and crashed... Am I the only one with this problem?

I am using version 4.8.0.