User can't post: 500 internal server error


#1

My users come in at trust level 1, so they should have all basic user functions, correct?

But they can’t create posts. Am I missing something?

i’ve looked at other 500/internal server error posts in ‘support’, but haven’t found anything i can translate into “what next”.

Thanks.


(Kane York) #2

This kind of thing should show up in /logs, what do you see there?


#3

nothing that i can interpret. can i copy that into here?


(Kane York) #4

Yup, be sure to look at all three tabs at the bottom and redactv sensitive info.


#5

Info tab:

Redis::CommandError (ERR Error running script (call to f_edb941c8f601fd6d7546b6603d5a03df60cc2d04): @user_script:9: user_script:9: attempt to perform arithmetic on a nil value )
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.5/lib/redis/client.rb:121:in `call'

backtrace: (won’t come up in a code field… :confused: would you rather have a screen shot? )

`/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.5/lib/redis/client.rb:121:in `call' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.5/lib/redis.rb:2399:in `block in _eval' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.5/lib/redis.rb:58:in `block in synchronize' /usr/local/rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.5/lib/redis.rb:58:in `synchronize' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.5/lib/redis.rb:2398:in `_eval' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.5/lib/redis.rb:2450:in `evalsha' /var/www/discourse/lib/rate_limiter.rb:146:in `eval_lua' /var/www/discourse/lib/rate_limiter.rb:86:in `performed!' /var/www/discourse/lib/rate_limiter/on_create_record.rb:42:in `block in rate_limit' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:413:in `instance_exec' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:413:in `block in make_lambda' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:511:in `block in invoke_after' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:511:in `each' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:511:in `invoke_after' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:132:in `run_callbacks' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:827:in `_run_create_callbacks' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/callbacks.rb:340:in `_create_record' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/timestamp.rb:95:in `_create_record' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/persistence.rb:563:in `create_or_update' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/callbacks.rb:336:in `block in create_or_update' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:131:in `run_callbacks' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:827:in `_run_save_callbacks' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/callbacks.rb:336:in `create_or_update' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/persistence.rb:129:in `save' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/validations.rb:44:in `save' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/attribute_methods/dirty.rb:35:in `save' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/transactions.rb:308:in `block (2 levels) in save' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/transactions.rb:384:in `block in with_transaction_returning_status' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:233:in `transaction' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/transactions.rb:210:in `transaction' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/transactions.rb:381:in `with_transaction_returning_status' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/transactions.rb:308:in `block in save' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/transactions.rb:323:in `rollback_active_record_state!' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/transactions.rb:307:in `save' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/suppressor.rb:42:in `save' /var/www/discourse/lib/topic_creator.rb:182:in `save_topic' /var/www/discourse/lib/topic_creator.rb:48:in `create' /var/www/discourse/lib/post_creator.rb:396:in `create_topic' /var/www/discourse/lib/post_creator.rb:164:in `block in create' /var/www/discourse/lib/post_creator.rb:315:in `block in transaction' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction' /usr/local/rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/transactions.rb:210:in `transaction' /var/www/discourse/lib/post_creator.rb:313:in `transaction' /var/www/discourse/lib/post_creator.rb:162:in `create' /var/www/discourse/lib/new_post_manager.rb:183:in `perform_create_post' /var/www/discourse/lib/new_post_manager.rb:157:in `perform' /var/www/discourse/app/controllers/posts_controller.rb:149:in `create' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.4/lib/abstract_controller/base.rb:186:in `process_action' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_controller/metal/rendering.rb:30:in `process_action' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.4/lib/abstract_controller/callbacks.rb:20:in `block in process_action' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:131:in `run_callbacks' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.4/lib/abstract_controller/callbacks.rb:19:in `process_action' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_controller/metal/rescue.rb:20:in `process_action' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/notifications.rb:166:in `block in instrument' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/notifications/instrumenter.rb:21:in `instrument' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/notifications.rb:166:in `instrument' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_controller/metal/instrumentation.rb:30:in `process_action' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_controller/metal/params_wrapper.rb:252:in `process_action' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/railties/controller_runtime.rb:22:in `process_action' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.4/lib/abstract_controller/base.rb:124:in `process' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionview-5.1.4/lib/action_view/rendering.rb:30:in `process' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rack-mini-profiler-0.10.7/lib/mini_profiler/profiling_methods.rb:76:in `block in profile_method' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_controller/metal.rb:189:in `dispatch' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_controller/metal.rb:253:in `dispatch' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:49:in `dispatch' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:31:in `serve' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/journey/router.rb:50:in `block in serve' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/journey/router.rb:33:in `each' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/journey/router.rb:33:in `serve' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:834:in `call' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rack-protection-2.0.0/lib/rack/protection/frame_options.rb:31:in `call' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb:189:in `call!' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb:167:in `call' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb:189:in `call!' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb:167:in `call' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb:189:in `call!' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb:167:in `call' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb:189:in `call!' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb:167:in `call' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb:189:in `call!' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb:167:in `call' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb:189:in `call!' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb:167:in `call' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb:189:in `call!' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb:167:in `call' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/omniauth-1.6.1/lib/omniauth/builder.rb:63:in `call' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/conditional_get.rb:38:in `call' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/head.rb:12:in `call' /var/www/discourse/lib/middleware/anonymous_cache.rb:149:in `call' /var/www/discourse/config/initializers/008-rack-cors.rb:25:in `call' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/session/abstract/id.rb:232:in `context' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/session/abstract/id.rb:226:in `call' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/cookies.rb:613:in `call' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/callbacks.rb:26:in `block in call' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:97:in `run_callbacks' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/callbacks.rb:24:in `call' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/debug_exceptions.rb:59:in `call' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/logster-1.2.9/lib/logster/middleware/reporter.rb:31:in `call' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/rack/logger.rb:36:in `call_app' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/rack/logger.rb:26:in `call' /var/www/discourse/config/initializers/100-quiet_logger.rb:16:in `call' /var/www/discourse/config/initializers/100-silence_logger.rb:29:in `call' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/remote_ip.rb:79:in `call' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/request_id.rb:25:in `call' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/method_override.rb:22:in `call' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/runtime.rb:22:in `call' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rails_multisite-1.1.2/lib/rails_multisite/connection_management.rb:243:in `call' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/sendfile.rb:111:in `call' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rack-mini-profiler-0.10.7/lib/mini_profiler/profiler.rb:171:in `call' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/message_bus-2.1.1/lib/message_bus/rack/middleware.rb:63:in `call' /var/www/discourse/lib/middleware/request_tracker.rb:138:in `call' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/engine.rb:522:in `call' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/railtie.rb:185:in `public_send' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/railtie.rb:185:in `method_missing' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/urlmap.rb:68:in `block in call' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/urlmap.rb:53:in `each' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/urlmap.rb:53:in `call' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/unicorn-5.3.1/lib/unicorn/http_server.rb:606:in `process_client' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/unicorn-5.3.1/lib/unicorn/http_server.rb:702:in `worker_loop' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/unicorn-5.3.1/lib/unicorn/http_server.rb:549:in `spawn_missing_workers' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/unicorn-5.3.1/lib/unicorn/http_server.rb:142:in `start' /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/unicorn-5.3.1/bin/unicorn:126:in `<top (required)>' /var/www/discourse/vendor/bundle/ruby/2.3.0/bin/unicorn:23:in `load' /var/www/discourse/vendor/bundle/ruby/2.3.0/bin/unicorn:23:in `<main>'`

(Rafael dos Santos Silva) #6

That’s an old version of Discourse, can you upgrade to latest?


#7

nope. that’s in the hands of Discourse Hosting.
is it very old?


(Rafael dos Santos Silva) #8

We moved to Ruby 2.4 in Oct 11, 2017.


#9

then i’ll contact Richard. will that solve the issue?


(Rafael dos Santos Silva) #10

2 posts were split to a new topic: Error when posting quote block


(Richard - DiscourseHosting.com) #11

To be honest, I don’t think that the Ruby version is the issue here. This is happening inside Redis and it’s on a large multisite installation where the error is only happening with this forum.
This must be something in data that is specific to this forum or category.


(Richard - DiscourseHosting.com) #14

Update:

The site setting max_topics_per_day was set to zero which was causing this problem.

This site is running version 1.9.5-something (which is not an “old” version of Discourse, only two days old)

This bug is fixed already but the fix is not backported to stable.


(Jeff Atwood) #15