How to control the memory size of continuously running windows service?
        Posted  
        
            by Snowill
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Snowill
        
        
        
        Published on 2010-03-18T06:40:45Z
        Indexed on 
            2010/03/18
            6:41 UTC
        
        
        Read the original article
        Hit count: 326
        
Hi, I have created a windows service which is continuously polling a database. For this purpose i have a timer in place. Ever time i am querying a database table i open a connection and close it immediately after my work is done. Right now i am doing this every 20 seconds for testing purpose, but later this time might increase to 5 - 10 minutes.
What happens is everytime the database table is polled there is an increase of 10-12 KB in the size of the memory of the service running. This i can see in the task manager. Is there any way to control this.
© Stack Overflow or respective owner