I'm doing regular backups of the OSQA database, but I've noticed that the database is growing more rapidly than I would normally expect (1 to 3 megabytes per day). This is out of line with the amount of content being posted (although there are a lot of people who just create accounts to they can spam in their bio).

Are there logs in the database that I need to cleanup? Is there some data I can cleanup from time to time? What's the recommended practice?

asked 17 Sep '11, 11:24

Scott%20W's gravatar image

Scott W
1962411
accept rate: 25%


Hernani offered the following advice regarding cleaning up old sessions:

Periodically run:

python manage.py cleanup

Alternatively, in the MySQL database you can execute:

delete from django_session where expire_date < NOW();

I had to do the latter on Dreamhost because the first option took too much memory.

Note that the latter solution can take a long time, and the site could be unresponsive. You may want to put the site into maintenance mode while you do this.

link

answered 19 Oct '11, 20:29

Scott%20W's gravatar image

Scott W
1962411
accept rate: 25%

edited 19 Oct '11, 20:48

-1

All the data that is stored into the database is important and the fact that it is growing means that your community is growing, so instead of trying to find a way of removing data you should find a better place for the new one.

link

answered 17 Sep '11, 13:56

Jordan's gravatar image

Jordan ♦♦
3.1k618
accept rate: 39%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×62

Asked: 17 Sep '11, 11:24

Seen: 525 times

Last updated: 19 Oct '11, 20:48

powered by OSQA