service consuming m…
 
Notifications
Clear all

[Solved] service consuming memory

38 Posts
2 Users
0 Reactions
2,207 Views
Posts: 71
Topic starter
Estimable Member
Joined: 5 years ago

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.

37 Replies
Posts: 1600
Admin
Noble Member
Joined: 10 years ago

Can you please let me know what version you are running and how much memory it is consuming?

Reply
2 Replies
Joined: 5 years ago

Estimable Member
Posts: 71

@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.

Reply
Admin
Joined: 10 years ago

Noble Member
Posts: 1600

@ad-it-dept Please give me until tomorrow to respond while we look it over.

Reply
Posts: 1600
Admin
Noble Member
Joined: 10 years ago

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.

Reply
Posts: 1600
Admin
Noble Member
Joined: 10 years ago

We are still troubleshooting this and trying to track down the memory leak.

Reply
Posts: 1600
Admin
Noble Member
Joined: 10 years ago

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.

Reply
19 Replies
Joined: 5 years ago

Estimable Member
Posts: 71

@jdixon did that, waiting for results, will revert within next 2-3 days.

Reply
Joined: 5 years ago

Estimable Member
Posts: 71

it consumed 3,5GB of RAM since previous comment.

Reply
Joined: 5 years ago

Estimable Member
Posts: 71

now it is up to ~7GB of consumed RAM.

Reply
Admin
Joined: 10 years ago

Noble Member
Posts: 1600

@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?

Reply
Joined: 5 years ago

Estimable Member
Posts: 71

@jdixon User account count is under 2000, sync interval currently set to 5 minutes.

Reply
Admin
Joined: 10 years ago

Noble Member
Posts: 1600

@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.

Reply
Joined: 5 years ago

Estimable Member
Posts: 71

@jdixon Great news! Ready to install, we do have one server prepared to test.

Thank you.

Reply
Admin
Joined: 10 years ago

Noble Member
Posts: 1600

@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.

Reply
Joined: 5 years ago

Estimable Member
Posts: 71
Admin
Joined: 10 years ago

Noble Member
Posts: 1600

@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.

Reply
Joined: 5 years ago

Estimable Member
Posts: 71

@jdixon Thank you, will do the replacement tomorrow, .NET Framework update required to run your file.

Reply
Admin
Joined: 10 years ago

Noble Member
Posts: 1600

@ad-it-dept Sorry about that :-\

Reply
Joined: 5 years ago

Estimable Member
Posts: 71

@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()

Reply
Admin
Joined: 10 years ago

Noble Member
Posts: 1600

@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

Reply
Joined: 5 years ago

Estimable Member
Posts: 71

@jdixon ok, will schedule upgrade.

Reply
Joined: 5 years ago

Estimable Member
Posts: 71

@jdixon

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()

Reply
Admin
Joined: 10 years ago

Noble Member
Posts: 1600

@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.

Reply
Admin
Joined: 10 years ago

Noble Member
Posts: 1600

@ad-it-dept Actually is it possible for me to connect to your server and do this for you?

Reply
Joined: 5 years ago

Estimable Member
Posts: 71

@jdixon sure, if we can do this now.

Reply
Page 1 / 2
Share: