New index on post_custom_fields can not be created


#1

Hi everyone !

When I use the docker manager to upgrade Discourse, I have an error during the db migrate part since thursday or friday. Tonight I tried to rebuild app to see what happens (why not right ? :sweat_smile: ) and it always fail on bootstrap, here the message :

FAILED
--------------------
RuntimeError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 510 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:105:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"bundle_exec", "cmd"=>["su discourse -c 'bundle install --deployment --verbose --without test --without development'", "su discourse -c 'bundle exec rake db:migrate'", "su discourse -c 'bundle exec rake assets:precompile'"]}
d296ee0c0364464ffaaad8aaa34ece7826d517dde1326e3f068dd68b9b8c354c

When I reboot the droplet on Digital Ocean, my forum is fine, and it seems that my discourse version is actually upgrading (currently v1.4.0.beta6 +93) but this problem intrigue me.

I have some plugin : spoiler alert, discourse details and some personal plugins (based on the creations of the community) : some organized emojis, a complete toolbar, and some bbcodes, but it doesn’t seem to be the problem considering the report. I didn’t add any plugins in the last 2 or 3 weeks.

Do you have an idea of the cause of that problem ? This error message is enough or do you need more info ?

Again, sorry for my english, I hope i’m pretty clear :stuck_out_tongue_winking_eye:


(Jeff Atwood) #2

Almost certainly unsupported plugins. Unless we ship them, disable them and try again. Also you would need to look much further upstream in the logs for the actual error.


#3

Hello again, thanks for the reply. Tonight, I edited the app.yml and delete my plugins, leaving only the Docker Manager plugin, it failed again during the rebuild app.

I copied the process :

Nothing urgent here, my problem is not a priority, Discourse is up to date via Docker Manager and with a reboot it’s running fine. But if someone has an idea, I’ll take it :wink:


(Jeff Atwood) #4

We would need the full logs your error is deeper upstream


#5

Where can I find the full logs ?

Is it the production log in /var/discourse/shared/standalone/log/rails ?


(Sam Saffron) #6

The full output of launcher rebuild…


#7

That’s what I did in this file : http://www.iunctis.ovh/rebuild_app.txt

Something’s missing ?


(Kane York) #8
PG::ProgramLimitExceeded: ERROR:  index row size 5640 exceeds maximum 2712 for index "index_post_custom_fields_on_name_and_value"
HINT:  Values larger than 1/3 of a buffer page cannot be indexed.
Consider a function index of an MD5 hash of the value, or use full text indexing.
: CREATE  INDEX  "index_post_custom_fields_on_name_and_value" ON "post_custom_fields"  ("name", "value")/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-mini-profiler-0.9.6/lib/patches/db/pg.rb:90:in `exec'

Do we need to kill that index?


(Jeff Atwood) #9

Hmm is this your index @eviltrout?


(Robin Ward) #10

Yes I added it because @sam asked me to. Maybe we should only index the first few characters of value?


(Sam Saffron) #11

aha … probably, we need to do something here.

I have a feeling that this is going to be tricky


#12

I hope it’ll not be a big trouble.

Tonight, I upgraded discourse to the latest version and I cannot access any topic : http://iunctis.fr/

Topic failed to load

Sorry, we couldn't load that topic, possibly due to a connection 
problem. Please try again. If the problem persists, let us know.

I shutdown the server, restarted it, It doesn’t work

Could it be connected ? Or should I open a new topic ?


(Sam Saffron) #13

This should fix you up:

https://github.com/discourse/discourse/commit/ea5ef3bcf69b70f9b68edd2aeb3b2122a61b2b45

Wait till it hits tests-passed


#14

It works ! Thanks @sam !

I tried to rebuild app first, it didn’t work. But a few minutes ago, the new version appeared in my docker manager and It worked

http://iunctis.fr/uploads/default/_emoji/obama6.png


(Sam Saffron) #15