Ask Your Question
0

duplicate key value violates unique constraint "livesettings_setting_site_id_key"

asked 2011-09-14 16:40:37 -0500

mether gravatar image mether flag of India
1312 33 18 47
http://fedoraproject.org/

I get the following error. Any idea whats wrong here?

IntegrityError at /settings/SIDEBAR_MAIN/

duplicate key value violates unique constraint "livesettingssettingsiteidkey"

Request Method: POST Request URL: http://ask.stg.fedoraproject.org/settings/SIDEBARMAIN/ Django Version: 1.2.6 Exception Type: IntegrityError Exception Value:

duplicate key value violates unique constraint "livesettingssettingsiteidkey"

delete close flag offensive retag edit

Comments

@mether, do you remember how we solved this?

Evgeny ( 2011-12-05 11:10:14 -0500 )edit
1

You logged in and fixed something and then later fixed it in Askbot as well. It was some bug.

mether ( 2011-12-05 11:11:52 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2011-12-07 07:43:13 -0500

drpoovilleorg gravatar image drpoovilleorg
51 1 2 5

The result? 'impossible to use livesettings without memcached' ... we found it out on our own, but the livesettings author confirms it to be the case too.

https://bitbucket.org/bkroeze/django-livesettings/issue/32/impossible-to-easy-use-livesettings

"If the cache backend configuration is "locmem", it works good only with development server. For production with multiprocess deployment it is necessary to use memcached, otherwise old values can be randomly used so long, until the CACHE_TIMEOUT expires. It is very annoying if a change have been saved and shortly other change should be submitted, because the old vaue can remain in the form and be resubmitted back."

link publish delete flag offensive edit
0

answered 2011-09-14 21:13:00 -0500

Evgeny gravatar image Evgeny flag of Chile
11314 50 84 183
http://askbot.org/

We'll help you with more detail tomorrow, but possibly you are behind on migrations or dependencies. Did you take code from github?

link publish delete flag offensive edit

Comments

No. This is the latest release, Not git snapshot

mether ( 2011-09-14 22:09:47 -0500 )edit

Please try python manage.py migrate --list that will show the list of migrations and which ones are pending, there must be some that have not been applied after you updated the code. And to apply any pending migrations - just type python manage.py migrate.

Evgeny ( 2011-09-15 07:24:49 -0500 )edit

I'm seeing this issue too when trying to update settings. Did you ever find a root cause? I have a fresh install (followed instructions from your docs) , on a freshly installed system. Sometimes i don't see the error at all, but when i try to 'save' settings, the page appears to refresh but the setting doesn't appear to have actually changed... not sure what's going on, it's late but just wanted to see for now if you've seen this again since this question came up a while ago...

drpoovilleorg ( 2011-12-05 11:00:01 -0500 )edit

Did you use askbot-setup to create the project? Please feel free to email me your settings.py file at evgeny.fadeev@gmail.com. We had this problem before, but I don't remember how we overcame it. Possibly there is some missing dependency and the db transaction error is masking the real issue.

Evgeny ( 2011-12-05 11:13:28 -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: 2011-09-14 16:40:37 -0500

Seen: 232 times

Last updated: Dec 07 '11