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

Application constantly creating/exiting threads, bogomips (ApplicationInsightsDiagnostics.json)? #624

Open
alystair opened this issue Nov 1, 2022 · 8 comments

Comments

@alystair
Copy link

alystair commented Nov 1, 2022

Context: Trying out tooling for a single domain, telemetry is turned off... and UI is totally closed.

I noticed the service.exe is never idling - wasting many cycles. The service is constantly creating/terminating a thread and attempting to access 'ApplicationInsightsDiagnostics.json' which as far as I can see doesn't exist.

image

This can be observed using procmon / procexp tools from Sysinternals, a set of Microsoft tools.

It's harder to justify using this SSL manager if it's wasting resources.

@webprofusion-chrisc
Copy link
Contributor

webprofusion-chrisc commented Nov 1, 2022

Thanks, I've definitely not seen that before, have you restarted the service since turning off telemetry? The reason I ask is the way our app is designed it will just have an null telemetry object so it won't even be able to access telemetry at all if it's disabled at startup.

@webprofusion-chrisc
Copy link
Contributor

Is outgoing https disabled via your firewall? The behavior obviously suggests it's trying to do something and failing. If the problem persists please also append the contents of C:\ProgramData\Certify\appsettings.json

@alystair
Copy link
Author

alystair commented Nov 1, 2022

You're absolutely correct, after restarting the service I'm now only seeing the thread creation/exit :)

image

{
  "SettingsSchemaVersion": 1,
  "CheckForUpdatesAtStartup": true,
  "EnableAppTelematics": false,
  "IgnoreStoppedSites": true,
  "EnableValidationProxyAPI": true,
  "EnableEFS": false,
  "EnableDNSValidationChecks": false,
  "RenewalIntervalDays": 30,
  "RenewalIntervalMode": "DaysAfterLastRenewal",
  "MaxRenewalRequests": 0,
  "EnableHttpChallengeServer": true,
  "LegacySettingsUpgraded": true,
  "IsInstanceRegistered": false,
  "InstanceId": "9a61df16-5cae-46e2-871c-56469e165934",
  "Language": null,
  "EnableCertificateCleanup": true,
  "EnableStatusReporting": true,
  "CertificateCleanupMode": 1,
  "DefaultCertificateAuthority": "letsencrypt.org",
  "CertificateAuthorityFallback": null,
  "DefaultKeyCredentials": null,
  "EnableAutomaticCAFailover": false,
  "IncludeExternalPlugins": false,
  "FeatureFlags": null,
  "NtpServer": "pool.ntp.org",
  "DefaultCertificateStore": null,
  "EnableExternalCertManagers": true
}

@alystair
Copy link
Author

alystair commented Nov 1, 2022

I think the most efficient way would be to use native windows scheduler and only activate the service around expiry dates? This way ~80mb RAM is also freed up :)

@webprofusion-chrisc
Copy link
Contributor

Thanks, we definitely still need to look at this issue as there is probably more we can do.

We want to try to trim the service down a little. We support a bunch of features that in turn have dependencies which are loaded at runtime (some due to .net reflection as part of plugin loads) so we do want to get the service smaller. The UI does need the service in order to operate as the UI itself does not do any of the real work.

If you're looking for a particularly lightweight option then you could consider Posh-ACME (PowerShell), win-acme or even certbot. Certify The Web does quite a lot more than some people need.

@webprofusion-chrisc
Copy link
Contributor

As a little bit of background to our service based approach, some users are actively managing up to 18,000 certs on a single server, so the service is frequently checking for work to do, however it does that hourly so I still need to check what else is creating this thread every 10 mins. I suspect its our log files being flushed periodically.

@alystair
Copy link
Author

alystair commented Nov 2, 2022

Thanks, I'll look into Posh-ACME for my use case.

@alystair
Copy link
Author

alystair commented Nov 6, 2022

It's actually every few seconds, not every 10 minutes. Hope this helps :)

image
image

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

No branches or pull requests

2 participants