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

migrations fail with #573 #577

Closed
aamerik opened this issue Oct 9, 2013 · 18 comments
Closed

migrations fail with #573 #577

aamerik opened this issue Oct 9, 2013 · 18 comments
Labels
Milestone

Comments

@aamerik
Copy link

aamerik commented Oct 9, 2013

rake db::migrate

rake aborted!
An error has occurred, 20110422152027 and all later migrations canceled:

The operation: "GET MORE"
failed with error "cursor 1552437928771220 not found"/var/www/errbit/lib/tasks/errbit/database.rake:9:in block (3 levels) in <top (required)>' /var/www/errbit/db/migrate/20110422152027_move_notices_to_separate_collection.rb:32:inup'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)

@shingara
Copy link
Member

This issue arrived when you launch the task errbit:db:update_problem_attrs. I suppose you have a lot of Problems save in your errbit instance.

Have you a simple mongoDB database or have you a replicatSet configuration ?

@aamerik
Copy link
Author

aamerik commented Oct 11, 2013

Hi,

I'm using a simple mongodb instance.

Thank you!
On Oct 11, 2013 11:41 AM, "Cyril Mougel" notifications@github.com wrote:

This issue arrived when you launch the task errbit:db:update_problem_attrs.
I suppose you have a lot of Problems save in your errbit instance.

Have you a simple mongoDB database or have you a replicatSet configuration
?


Reply to this email directly or view it on GitHubhttps://github.com//issues/577#issuecomment-26147316
.

@arthurnn
Copy link
Member

@aamerik could you run db::migrate with trace enable? something like this: bundle exec rake db:migrate --trace
and post the full stacktrace on a gist?
thanks

@aamerik
Copy link
Author

aamerik commented Oct 11, 2013

@aamerik
Copy link
Author

aamerik commented Oct 17, 2013

any update on this bug? thank you

@arthurnn
Copy link
Member

@aamerik Can you explain better the scenario in here? Were you trying to update a errbit project? is that a brand new project? How big is the database? Mongodb version?
I really need to simulate this error in local before attempting to fix it.

thanks

@aamerik
Copy link
Author

aamerik commented Oct 17, 2013

I attempted to upgrade errbit to commit #573 and followed the upgrade procedure outlined in the readme.

{
"db" : "errbit",
"collections" : 10,
"objects" : 154350,
"avgObjSize" : 9513.360699708455,
"dataSize" : 1468387224,
"storageSize" : 1595682816,
"numExtents" : 49,
"indexes" : 25,
"indexSize" : 26817280,
"fileSize" : 4226809856,
"nsSizeMB" : 16,
"dataFileVersion" : {
"major" : 4,
"minor" : 5
},
"ok" : 1
}

MongoDB version:
mongo-10gen-server-2.4.6-mongodb_1.x86_64

Thank you

@shingara
Copy link
Member

I think you can reproduce this issue by launch the rake task

rake errbit:db:update_problem_attrs

shingara added a commit that referenced this issue Oct 17, 2013
@shingara
Copy link
Member

@aamerik Can you test the new branch I do ? https://github.com/errbit/errbit/tree/fix/577

I think it can be fix your issue but I am not sure. I have another solution if not work. The problem is really because you have a lot of data in your application.

@aamerik
Copy link
Author

aamerik commented Oct 30, 2013

@shingara Thank you. Can you tell me if it's possible to purge all exceptions older than X number of days? All of my exceptions in Errbit are "unresolved".

@arthurnn
Copy link
Member

@aamerik did that branch worked for you?

in order to remove old problems, you can do something like this from mongodb console:

var d = new Date(2010, 3, 1);
db.problems.remove( { created_at: {"$lt": d} })

@shingara
Copy link
Member

@aamerik please open a new issue about your question. because it's not related to this issue. You can maybe create a admin task to do this works. open an issue. And please say if the branch fix work to merged it if it works.

@arthurnn warning to delete a problem. there are a ServiceLayer to do that. If you do in mongodb console you not delete document associate to this problem.

In rails console you can do :

ProblemDestroy.execute(
   Problem.where(:created_at => 1.month.ago)
)

@arthurnn
Copy link
Member

arthurnn commented Nov 2, 2013

@aamerik i will be closing this ticket for now, as it seems the issue is resolved. Let us know if you have any further problems. thanks

@arthurnn arthurnn closed this as completed Nov 2, 2013
shingara added a commit that referenced this issue Nov 4, 2013
Try fix isse #577 if a lot of problem
@shingara
Copy link
Member

shingara commented Nov 4, 2013

I merge the fix

@aamerik
Copy link
Author

aamerik commented Nov 4, 2013

@arthurnn I was unable to complete the db migration because rake dbmigrate exhausted all system memory, activating kernel OOM killer. The instance has 8gb ram, so it was a little strange.

@shingara
Copy link
Member

shingara commented Nov 5, 2013

So the problem is not fix.

If I try to do another fix, can you test it ?

@shingara shingara reopened this Nov 5, 2013
@aamerik
Copy link
Author

aamerik commented Nov 5, 2013

@shingara I purged all problems older than 1 month, total of 11,000. My dataset is not so large anymore.

@shingara
Copy link
Member

shingara commented Apr 4, 2014

I close this issue if we have no more update. Reopen it if someone has the same problem

@shingara shingara closed this as completed Apr 4, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants