Ask Your Question
1

Settings gone after upgrade

asked 2012-10-30 00:36:26 -0600

siovene gravatar image

Hi, I installed 0.7.42 via pypy and configured it.

After I was happy, I decided I should upgrade to git master, so I:

  1. Cloned askbot-devel
  2. Installed it
  3. Ran all the migrations
  4. Collected static files

Everything seemed to be successful, besides the static files, as I mentioned in another question, but the settings are gone; and if I try to, say, change the skin, I get database errors because of duplicate keys.

Any idea?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2012-10-30 13:50:59 -0600

siovene gravatar image

The problem was stale memcached cache. I restarted it and things are fine now.

edit flag offensive delete link more
1

answered 2012-10-30 11:50:27 -0600

Evgeny gravatar image

updated 2012-10-30 11:51:12 -0600

This sounds like a bug in our settings module or a sequence corruption in the database, however there are solutions to these issues.

If you are using multiple processes to run your webapp, the issue could be caused by two or more processes trying to save the same value into the database, which would in this case violate a unique constraint. This can be worked around by installing a common cache system like "redis" or reducing number of processes on your app to one until we find the real fix.

Another possibility (if you are using postgresql database) is that the primary key sequence became corrupted. This could be that the current value for the primary key sequence in that table livesettings_setting is below the ID of some existing row. In this case you will get a duplicate key violation also.

edit flag offensive delete link more

Comments

Thanks Evgeny. Any idea if I can actually recover the settings? I've looked at the livesetting_setting and _longsetting tables in mysql, and they are there.

siovene gravatar imagesiovene ( 2012-10-30 13:23:23 -0600 )edit

See if the values are there, i.e. that the tables are not empty.

Evgeny gravatar imageEvgeny ( 2012-10-30 13:33:42 -0600 )edit

The values are there.

siovene gravatar imagesiovene ( 2012-10-30 13:43:48 -0600 )edit
1

Ah! Restarting memcached solved the problem! :)

siovene gravatar imagesiovene ( 2012-10-30 13:50:24 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-10-30 00:36:26 -0600

Seen: 97 times

Last updated: Oct 30 '12