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

Analytics Startup logs an error after waking up from appPool time out #90

Closed
Chiel75 opened this issue Feb 9, 2024 · 4 comments · Fixed by #93
Closed

Analytics Startup logs an error after waking up from appPool time out #90

Chiel75 opened this issue Feb 9, 2024 · 4 comments · Fixed by #93
Assignees

Comments

@Chiel75
Copy link

Chiel75 commented Feb 9, 2024

We use the Analyics.CSharp in an ASP.Net project. After the appPool times out, the memory is cleared.
When the website is waking up again because of user activity, the Analytics StartUp() is called again (as it should because we registrered the Analytics as a singleton).
After waking up, in the StartUp() is tried to:
await Store.Provide(System.DefaultState(Configuration, Storage));
In the DefaultState method the cache is read from the storage (in this case the lost inmemorystream because of the appPool) and returns an empty string variable cache. After that, the empty cache string will generate an exception that is being logged.

Expected behavior
No uneccesary exception should be thrown. Maybe an info message the the state could not be found from the cache.

Platform (please complete the following information):

  • Library Version in use: 2.3.2
  • Platform being tested: ASP.Net
  • Integrations in use:
@wenxi-zeng
Copy link
Contributor

@Chiel75 just want o clarify, are you referring to this line that logs as an error should instead log as info?

@Chiel75
Copy link
Author

Chiel75 commented Feb 12, 2024

Hi @wenxi-zeng No, but if this line results in an empty string, there is no need to try and deserialize it into a settings object and let it throw an exception.

@wenxi-zeng
Copy link
Contributor

@Chiel75 sorry for the late response. after discussion, our team also feel we should log the empty string case as an info, but keep the deserialization case as an exception. we will push an update for this in the next release.

@wenxi-zeng
Copy link
Contributor

fixed in 2.3.4

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

Successfully merging a pull request may close this issue.

2 participants