-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds a timeout for user globals #18
Conversation
So performance degradation that some users have reported is likely due to this, not LokiJS issues? |
I've still seen slowdowns in the storage module itself, usually seems like the db traffic just becomes too much for it to handle after users grow. But, that said, this could be the cause of slowdowns people are seeing where a restart results in fast speeds again. |
In our cluster setup all |
Not sure, this has been reliable on S+ for the past few months, I'm about to attempt to setup a set of servers with a few bots and let them run for a day or two. One with current npm code, one with this patch, and one with hourly runner/processor restarts. (All three using the stock storage) Although on that note, I haven't issues that required the processors to be restarted unless its caused by redis going readonly or something. (That was a result of memory gaining 16GB of history data and redis running out of RAM) Lately its actually been the backend-local module I have to restart, after which everything else is still going fine. |
Yes, it's mostly about |
Thanks, this is interesting. As for memory leaks in driver code, any help identifying them is welcome. |
Currently, the private server only resets globals if code is uploaded or if the global doesn't exist. This can cause performance issues on longer running servers. This PR adds timeouts to help maintain performance. The timeout is currently 6 minutes + a random addition of up to 30 seconds. The extra random time causes the resets to be spread out so all users reset at different times.
This is a direct port from screepsmod-mongo, which has been using this since early on.
It was originally added due to early issues on the ScreepsPlus server with runners dragging down performance.