Raised This Month: $51 Target: $400
 12% 

what happens if we forget closehandle


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
sukodaime
Junior Member
Join Date: May 2021
Old 07-15-2021 , 16:46   what happens if we forget closehandle
Reply With Quote #1

lets say i did new Handle:file = OpenFile( ssFilePath, "r" );
then i forgot closehandle it and handled new file like 30-50 times what happens will my server lose performance and can i close the previous open ones
sukodaime is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 07-16-2021 , 03:49   Re: what happens if we forget closehandle
Reply With Quote #2

Memory usage increase.
Maybe opening too many connections in database, in SQL thing.
https://wiki.alliedmods.net/Handles_...Mod_Scripting)

You can check, when server have start.
Server command: sm_dump_handles handles.txt

Then, server have running long time, there have been players and admins playing.
Plugins have working in this time.
sm_dump_handles handles2.txt

Compare between these two txt files.
__________________
Do not Private Message @me

Last edited by Bacardi; 07-16-2021 at 03:50.
Bacardi is offline
MAGNAT2645
Senior Member
Join Date: Nov 2015
Location: AlliedMods.net
Old 07-16-2021 , 05:04   Re: what happens if we forget closehandle
Reply With Quote #3

SourceMod can also detect possible memory leaks and will unload plugins with too many handles.
Memory leaks will be logged to sourcemod_fatal.log (in root folder of your game) and to errors_XXXXXXXX.log (relative to SM's logs folder).
__________________

Last edited by MAGNAT2645; 07-16-2021 at 05:10.
MAGNAT2645 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:25.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode