Ask Your Question
1

Settings gone after upgrade

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

siovene gravatar image siovene flag of Finland
381 7 4 24
http://www.astrobin.com/

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?

delete close flag offensive retag edit

2 Answers

Sort by ยป oldest newest most voted
1

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

siovene gravatar image siovene flag of Finland
381 7 4 24
http://www.astrobin.com/

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

link publish delete flag offensive edit
1

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

Evgeny gravatar image Evgeny flag of Chile
11074 50 84 182
http://askbot.org/

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

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.

link publish delete flag offensive edit

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 ( 2012-10-30 13:23:23 -0500 )edit

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

Evgeny ( 2012-10-30 13:33:42 -0500 )edit

The values are there.

siovene ( 2012-10-30 13:43:48 -0500 )edit
1

Ah! Restarting memcached solved the problem! :)

siovene ( 2012-10-30 13:50:24 -0500 )edit

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Reliable Askbot Hosting

Create your Q&A site at askbot.com. Managed Askbot hosting at just $15/mo. Dedicated hosting, support contracts, consulting services.

create your Q&A site
30 days free trial

Question tools

Follow

subscribe to rss feed

Stats

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

Seen: 42 times

Last updated: Oct 30 '12