Skip to content
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

Fix and point out several handle leaks #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

peace-maker
Copy link

The store-backend was unloaded due to lots of open handles.
L 12/26/2014 - 18:46:06: [SM] MEMORY LEAK DETECTED IN PLUGIN (file "store\store-backend.smx")
L 12/26/2014 - 18:46:06: [SM] Unloading plugin to free 14756 handles.
L 12/26/2014 - 18:46:06: [SM] Contact the author(s) of this plugin to correct this error.
L 12/26/2014 - 18:46:06: --------------------------------------------------------------------------
L 12/26/2014 - 18:46:06: TypeIDatabase |Count7413
L 12/26/2014 - 18:46:06: TypeDataPack |Count7340
L 12/26/2014 - 18:46:06: TypeGlobalFwd |Count3
L 12/26/2014 - 18:46:06: -- Approximately 96 bytes of memory are in use by (14756) Handles.

I doubt the fixes in this PR really avoid all the leaks. I've pointed out several places in the code which still leak handles but require changes to the API. The backend callbacks should really be called when the query failed too. With some "success" boolean set to false or 0 data being returned.

All the plugins that use the backend and pass a handle through the any:data callback leak that handle if the query of the method in question fails.

All the open IDatabase handles are threaded queries. A possible cause could be the database connection going away and the plugin firing far too many queries. The DBI system can't process them fast enough, so they stack up. Maybe add some more caching or use the cache more often?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant