[Solved] service consuming memory
AD Sync Service is consuming a lot of memory while running. We have to schedule service restart each night to release consumed memory.
Otherwise service won`t release memory and continue to eat more.
Can you please let me know what version you are running and how much memory it is consuming?
@jdixon Version is latest: 1.0.71.0 but was noticed also on previous version as well. Before scheduling service restarts it went up to 3-4Gb, now over one day time (24h) it may consume 1 GB of RAM.
It does appear there is a memory leak and we are looking into it trying to track it down. I will update you as soon as we find something and release an updated version.
We are still troubleshooting this and trying to track down the memory leak.
We are having some trouble narrowing down the exact cause of the memory leak due to it being in native libraries and not our .NET managed libraries. As a test, can you stop and disable the CloudPanel Sync Service on the server you are noticing the memory issue on, then go to C:\Program Files\Know More IT\Sync Service and right click on CloudPanel.SyncService.exe and run as administrator? This will cause it to run as a console app and will need you to leave a user logged in. What we are trying to determine is if it is only doing this when ran as a service.
@ad-it-dept That is growing way faster than ours is in our lab. We have a new build we are testing but how many users are in this domain and what sync interval do you currently have it set to?
@ad-it-dept We were able to reproduce this situation with various counts of users and have it fixed now. There was a memory leak because we were not properly disposing of an object containing the list of users. Do you have a server you can deploy the new version on? Code was changed, so I assume you want to test it on a server first.
@ad-it-dept Please stop the CloudPanel Sync Service, download this zip file and overwrite the files from this zip file with yours (you can merge them with explorer). Then start the sync service and keep an eye on the log file.
@ad-it-dept We sent you an email with the file, please let me know if you received it or not in case your spam caught it.
@jdixon Thank you, will do the replacement tomorrow, .NET Framework update required to run your file.
@jdixon did the installation on one of core servers in setup, will keep monitoring next few days.
First thing noticed thou, error messages keep to flood the log file since update:
[2022-01-28 09:45:13,963] | INFO | ProcessADPasswordChanges | Executing job: Sending local password changes to CloudPanel.
[2022-01-28 09:45:13,995] | INFO | GetCPUsers | Executing job: Updating Active Directory users with data from CloudPanel
[2022-01-28 09:45:14,026] | INFO | CloudPanel.SyncService.Tasks.CheckIn | Executing job: Checking in with CloudPanel.
[2022-01-28 09:45:14,026] | INFO | ProcessCPPasswordChanges | Executing job: Processing passwords that were changed in CloudPanel.
[2022-01-28 09:45:14,292] | INFO | CloudPanel.SyncService.Tasks.ProcessExcludePasswordFiles | Executing job: Processing excluded password files.
[2022-01-28 09:45:14,292] | INFO | SendADUsers | Executing job: Updating CloudPanel users with changes on Active Directory users.
[2022-01-28 09:45:14,542] | ERROR | ProcessADPasswordChanges | Error processing active directory password changes: System.NullReferenceException: Object reference not set to an instance of an object.
at RestSharp.RestClientExtensions.<ExecuteAsync>d__11`1.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at RestSharp.RestClientExtensions.<GetAsync>d__14`1.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at CloudPanel.SyncService.Tasks.ProcessADPasswordChanges.<GetUserCompanyCode>d__4.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at CloudPanel.SyncService.Tasks.ProcessADPasswordChanges.<Execute>d__1.MoveNext()
[2022-01-28 09:45:14,573] | ERROR | SendADUsers | Error retrieving CloudPanel users: System.InvalidOperationException: Nullable object must have a value.
at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
at CloudPanel.SyncService.Helpers.ADManager.GetUsers()
at CloudPanel.SyncService.Tasks.SendADUsers.<Execute>d__1.MoveNext()
@ad-it-dept Would you care to upgrade CloudPanel to 3.2.0350? The build for ADSync I sent you is basically 3.2.0350
did the upgrade of CP to version 3.2.350.0
but the ADSync Service still reporting following message:
[2022-02-03 10:30:53,385] | INFO | ProcessADPasswordChanges | Executing job: Sending local password changes to CloudPanel.
[2022-02-03 10:30:53,432] | INFO | GetCPUsers | Executing job: Updating Active Directory users with data from CloudPanel
[2022-02-03 10:30:53,448] | INFO | ProcessCPPasswordChanges | Executing job: Processing passwords that were changed in CloudPanel.
[2022-02-03 10:30:53,448] | INFO | SendADUsers | Executing job: Updating CloudPanel users with changes on Active Directory users.
[2022-02-03 10:30:53,885] | ERROR | SendADUsers | Error retrieving CloudPanel users: System.InvalidOperationException: Nullable object must have a value.
at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
at CloudPanel.SyncService.Helpers.ADManager.GetUsers()
at CloudPanel.SyncService.Tasks.SendADUsers.<Execute>d__1.MoveNext()
@ad-it-dept Argh, sorry about all this. I’m going to send you some files to replace. Simply stop the service and overwrite your files with these files. They include PBD files which should give us more details in the logs as well as the config file changing to DEBUG.
- 5 Forums
- 714 Topics
- 3,630 Posts
- 0 Online
- 253 Members