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

expireAfterSeconds not working? #43

Open
NTTAKR opened this issue Aug 5, 2016 · 1 comment
Open

expireAfterSeconds not working? #43

NTTAKR opened this issue Aug 5, 2016 · 1 comment

Comments

@NTTAKR
Copy link

NTTAKR commented Aug 5, 2016

Hi, I have just discovered your log4mongo-net and it looks awesome so far.

I have configured the expireAfterSeconds property and checked the created DB/Collection that an index is created with the correct ExpireAfter value in it.
But the documents are never being expired.
I tried with 60 seconds, 10 seconds, 1 second, nothing.

I saw that the timestamp field is written in Timezone +0000 (so UTC), can this be the source of this problem?

Thanks
Andreas

@seanfitzg
Copy link
Contributor

Hi Andreas, I'm not sure why this isn't happening.

Some suggestions:

  • MongoDB doesn't immediately delete the records, but will do so eventually in a non-deterministic fashion.
  • Can you take a look at your MongoDb instance and see if the index is being created on the logs colection (Robomongo is a good client to use for this)?

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