# 500 Error While Posting a Topic

**URL:** https://meta.discourse.org/t/500-error-while-posting-a-topic/159756
**Category:** Bug
**Created:** [August 4, 2020, 7:52am UTC](https://meta.discourse.org/t/500-error-while-posting-a-topic/159756 "2020-08-04T07:52:31Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![KranthiKiranGude](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kranthikirangude/32/135387_2.png) [@KranthiKiranGude](https://meta.discourse.org/u/KranthiKiranGude)
#### Post date: [August 4, 2020, 7:52am UTC](https://meta.discourse.org/t/500-error-while-posting-a-topic/159756/1 "2020-08-04T07:52:31Z")

</div>

I get a 500 Error while trying to post a new Topic. I am the Admin and have posted and am able to post multiple other topics. But, only few set of topics are throwing me an error.  
**Title:**  
Why should I learn computer programming even though I am a commerce student? How can computer programming help me?  
**Post:**  
First of all in couple of years everything will be programmable so it will be useful thing to know. But you might not care about that since you will be only consumer - and that is fine to be clear.Even though you do not know every law in the book like professional lawyer you still know few of your basic rights so why not learn some basics of computer programming?As a commerce student I expect that you will be working with a bunch of numbers and if you have repetitive tasks having them automated can save you a bunch of time.Last but not least you should never turn down opportunity to learn s Continue ReadingFirst of all in couple of years everything will be programmable so it will be useful thing to know. But you might not care about that since you will be only consumer - and that is fine to be clear.Even though you do not know every law in the book like professional lawyer you still know few of your basic rights so why not learn some basics of computer programming?As a commerce student I expect that you will be working with a bunch of numbers and if you have repetitive tasks having them automated can save you a bunch of time.Last but not least you should never turn down opportunity to learn something new: be it playing instrument, new language or just good old programming.

Could someone help me understand what could possible go wrong here

---

<div class="post-metadata">

### Author: ![IAmGav](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iamgav/32/235598_2.png) [@IAmGav](https://meta.discourse.org/u/IAmGav)
#### Post date: [August 4, 2020, 8:14am UTC](https://meta.discourse.org/t/500-error-while-posting-a-topic/159756/2 "2020-08-04T08:14:46Z")

</div>

It could be you topic character limit. You might be exceeding the limit

---

<div class="post-metadata">

### Author: ![KranthiKiranGude](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kranthikirangude/32/135387_2.png) [@KranthiKiranGude](https://meta.discourse.org/u/KranthiKiranGude)
#### Post date: [August 4, 2020, 8:31am UTC](https://meta.discourse.org/t/500-error-while-posting-a-topic/159756/3 "2020-08-04T08:31:36Z")

</div>

Hi @IAmGav,

I have kept the topic character limit to the maximum.  
I have increase the max post length to 150000.  
Max Topic Title Length to 255.  
Title max word length to 2000000000  
Any other possible reason.

---

<div class="post-metadata">

### Author: ![KranthiKiranGude](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kranthikirangude/32/135387_2.png) [@KranthiKiranGude](https://meta.discourse.org/u/KranthiKiranGude)
#### Post date: [August 4, 2020, 2:57pm UTC](https://meta.discourse.org/t/500-error-while-posting-a-topic/159756/4 "2020-08-04T14:57:39Z")

</div>

The Number of 500 Errors have been increasing considerably. Not able to identify the exact reason. This is severely affecting my forum. Could you someone please help me here.

---

<div class="post-metadata">

### Author: ![IAmGav](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iamgav/32/235598_2.png) [@IAmGav](https://meta.discourse.org/u/IAmGav)
#### Post date: [August 4, 2020, 4:11pm UTC](https://meta.discourse.org/t/500-error-while-posting-a-topic/159756/5 "2020-08-04T16:11:29Z")

</div>

I went ahead and took your article and posted it on one of my discourse server without even touching any limits.

It posted fine.

You might want to look at your server errors.

This is not a discourse related error

---

<div class="post-metadata">

### Author: ![KranthiKiranGude](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kranthikirangude/32/135387_2.png) [@KranthiKiranGude](https://meta.discourse.org/u/KranthiKiranGude)
#### Post date: [August 4, 2020, 5:31pm UTC](https://meta.discourse.org/t/500-error-while-posting-a-topic/159756/6 "2020-08-04T17:31:35Z")

</div>

Thank You Gavin.  
Not sure why all of a sudden this has started to happen

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [August 4, 2020, 5:37pm UTC](https://meta.discourse.org/t/500-error-while-posting-a-topic/159756/7 "2020-08-04T17:37:56Z")

</div>

Visit the `/logs` page on your forum and check for errors.

---

<div class="post-metadata">

### Author: ![KranthiKiranGude](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kranthikirangude/32/135387_2.png) [@KranthiKiranGude](https://meta.discourse.org/u/KranthiKiranGude)
#### Post date: [August 4, 2020, 6:10pm UTC](https://meta.discourse.org/t/500-error-while-posting-a-topic/159756/8 "2020-08-04T18:10:51Z")

</div>

/logs page does not exist in the domain. ([mpl.co/logs](http://mpl.co/logs))  
Could you please help me understand how to access.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [August 4, 2020, 6:11pm UTC](https://meta.discourse.org/t/500-error-while-posting-a-topic/159756/9 "2020-08-04T18:11:38Z")

</div>

You must be logged in as the forum admin.

---

<div class="post-metadata">

### Author: ![KranthiKiranGude](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kranthikirangude/32/135387_2.png) [@KranthiKiranGude](https://meta.discourse.org/u/KranthiKiranGude)
#### Post date: [August 4, 2020, 6:19pm UTC](https://meta.discourse.org/t/500-error-while-posting-a-topic/159756/10 "2020-08-04T18:19:48Z")

</div>

I am a forum Admin. Do we have to configure it?

---

<div class="post-metadata">

### Author: ![KranthiKiranGude](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kranthikirangude/32/135387_2.png) [@KranthiKiranGude](https://meta.discourse.org/u/KranthiKiranGude)
#### Post date: [August 4, 2020, 7:17pm UTC](https://meta.discourse.org/t/500-error-while-posting-a-topic/159756/11 "2020-08-04T19:17:58Z")

</div>

Is it true that this might be caused due to similar body content, as mentioned here,

> **[500s and "Body is too similar to what you recently posted" errors](https://discourse.mozilla.org/t/500s-and-body-is-too-similar-to-what-you-recently-posted-errors/8591)**
>
> When posting, I sometimes get a “500” error and then the message “Body is too similar to what you recently posted” when I retry. Nothing is successfully posted in such cases.

If yes, how to disable this feature. I’m comfortable having a Check for duplicate titles. But, I don’t want Discourse to throw and error for similar body

---

<div class="post-metadata">

### Author: ![IAmGav](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iamgav/32/235598_2.png) [@IAmGav](https://meta.discourse.org/u/IAmGav)
#### Post date: [August 4, 2020, 7:32pm UTC](https://meta.discourse.org/t/500-error-while-posting-a-topic/159756/12 "2020-08-04T19:32:24Z")

</div>

you could try these

settings \> posting

 ![image](https://global.discourse-cdn.com/meta/original/3X/0/c/0cb189c5b4383f600c2555e6e910ee057dcc9d21.png)

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [August 4, 2020, 11:57pm UTC](https://meta.discourse.org/t/500-error-while-posting-a-topic/159756/13 "2020-08-04T23:57:55Z")

</div>

We can not really help much without seeing the `/logs` visit `YOURSITENAME.COM/logs` after triggering the issue, copy the error you get and paste it here.

---

<div class="post-metadata">

### Author: ![KranthiKiranGude](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kranthikirangude/32/135387_2.png) [@KranthiKiranGude](https://meta.discourse.org/u/KranthiKiranGude)
#### Post date: [August 5, 2020, 6:15am UTC](https://meta.discourse.org/t/500-error-while-posting-a-topic/159756/14 "2020-08-05T06:15:53Z")

</div>

Error Message:

```plaintext
ActiveRecord::ValueTooLong (PG::StringDataRightTruncation: ERROR: value too long for type character varying(1000) ) lib/post_creator.rb:496:in `update_topic_stats' lib/post_creator.rb:199:in `block i

```

Error Info:

```plaintext
ActiveRecord::ValueTooLong (PG::StringDataRightTruncation: ERROR: value too long for type character varying(1000)
)
lib/post_creator.rb:496:in `update_topic_stats'
lib/post_creator.rb:199:in `block in create'
lib/post_creator.rb:375:in `block in transaction'
lib/post_creator.rb:374:in `transaction'
lib/post_creator.rb:191:in `create'
lib/new_post_manager.rb:271:in `perform_create_post'
lib/new_post_manager.rb:209:in `perform'
app/controllers/posts_controller.rb:173:in `block in create'
lib/distributed_memoizer.rb:30:in `memoize'
app/controllers/posts_controller.rb:172:in `create'
app/controllers/application_controller.rb:340:in `block in with_resolved_locale'
app/controllers/application_controller.rb:340:in `with_resolved_locale'
lib/middleware/omniauth_bypass_middleware.rb:68:in `call'
lib/content_security_policy/middleware.rb:12:in `call'
lib/middleware/anonymous_cache.rb:328:in `call'
config/initializers/100-quiet_logger.rb:19:in `call'
config/initializers/100-silence_logger.rb:31:in `call'
lib/middleware/enforce_hostname.rb:22:in `call'
lib/middleware/request_tracker.rb:176:in `call'

Error Back Trace:
rack-mini-profiler (2.0.3) lib/patches/db/pg.rb:69:in `exec_params'

rack-mini-profiler (2.0.3) lib/patches/db/pg.rb:69:in `exec_params'

activerecord (6.0.3.2) lib/active_record/connection_adapters/postgresql_adapter.rb:675:in `block (2 levels) in exec_no_cache'

activesupport (6.0.3.2) lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'

activesupport (6.0.3.2) lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'

activesupport (6.0.3.2) lib/active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads'

activerecord (6.0.3.2) lib/active_record/connection_adapters/postgresql_adapter.rb:674:in `block in exec_no_cache'

activerecord (6.0.3.2) lib/active_record/connection_adapters/abstract_adapter.rb:722:in `block (2 levels) in log'

activesupport (6.0.3.2) lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'

activesupport (6.0.3.2) lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'

activesupport (6.0.3.2) lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'

activesupport (6.0.3.2) lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'

activesupport (6.0.3.2) lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'

activerecord (6.0.3.2) lib/active_record/connection_adapters/abstract_adapter.rb:721:in `block in log'

activesupport (6.0.3.2) lib/active_support/notifications/instrumenter.rb:24:in `instrument'

activerecord (6.0.3.2) lib/active_record/connection_adapters/abstract_adapter.rb:712:in `log'

activerecord (6.0.3.2) lib/active_record/connection_adapters/postgresql_adapter.rb:673:in `exec_no_cache'

activerecord (6.0.3.2) lib/active_record/connection_adapters/postgresql_adapter.rb:654:in `execute_and_clear'

activerecord (6.0.3.2) lib/active_record/connection_adapters/postgresql/database_statements.rb:111:in `exec_delete'

activerecord (6.0.3.2) lib/active_record/connection_adapters/abstract/database_statements.rb:174:in `update'

activerecord (6.0.3.2) lib/active_record/connection_adapters/abstract/query_cache.rb:22:in `update'

activerecord (6.0.3.2) lib/active_record/persistence.rb:385:in `_update_record'

activerecord (6.0.3.2) lib/active_record/persistence.rb:681:in `update_columns'

lib/post_creator.rb:496:in `update_topic_stats'

lib/post_creator.rb:199:in `block in create'

lib/post_creator.rb:375:in `block in transaction'

activerecord (6.0.3.2) lib/active_record/connection_adapters/abstract/database_statements.rb:280:in `block in transaction'

activerecord (6.0.3.2) lib/active_record/connection_adapters/abstract/transaction.rb:280:in `block in within_new_transaction'

activesupport (6.0.3.2) lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'

activesupport (6.0.3.2) lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'

activesupport (6.0.3.2) lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'

activesupport (6.0.3.2) lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'

activesupport (6.0.3.2) lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'

activerecord (6.0.3.2) lib/active_record/connection_adapters/abstract/transaction.rb:278:in `within_new_transaction'

activerecord (6.0.3.2) lib/active_record/connection_adapters/abstract/database_statements.rb:280:in `transaction'

activerecord (6.0.3.2) lib/active_record/transactions.rb:212:in `transaction'

lib/post_creator.rb:374:in `transaction'

lib/post_creator.rb:191:in `create'

lib/new_post_manager.rb:271:in `perform_create_post'

lib/new_post_manager.rb:209:in `perform'

app/controllers/posts_controller.rb:173:in `block in create'

lib/distributed_memoizer.rb:30:in `memoize'

app/controllers/posts_controller.rb:172:in `create'

actionpack (6.0.3.2) lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'

actionpack (6.0.3.2) lib/abstract_controller/base.rb:195:in `process_action'

actionpack (6.0.3.2) lib/action_controller/metal/rendering.rb:30:in `process_action'

actionpack (6.0.3.2) lib/abstract_controller/callbacks.rb:42:in `block in process_action'

activesupport (6.0.3.2) lib/active_support/callbacks.rb:112:in `block in run_callbacks'

app/controllers/application_controller.rb:340:in `block in with_resolved_locale'

i18n (1.8.3) lib/i18n.rb:313:in `with_locale'

app/controllers/application_controller.rb:340:in `with_resolved_locale'

activesupport (6.0.3.2) lib/active_support/callbacks.rb:121:in `block in run_callbacks'

activesupport (6.0.3.2) lib/active_support/callbacks.rb:139:in `run_callbacks'

actionpack (6.0.3.2) lib/abstract_controller/callbacks.rb:41:in `process_action'

actionpack (6.0.3.2) lib/action_controller/metal/rescue.rb:22:in `process_action'

actionpack (6.0.3.2) lib/action_controller/metal/instrumentation.rb:33:in `block in process_action'

activesupport (6.0.3.2) lib/active_support/notifications.rb:180:in `block in instrument'

activesupport (6.0.3.2) lib/active_support/notifications/instrumenter.rb:24:in `instrument'

activesupport (6.0.3.2) lib/active_support/notifications.rb:180:in `instrument'

actionpack (6.0.3.2) lib/action_controller/metal/instrumentation.rb:32:in `process_action'

actionpack (6.0.3.2) lib/action_controller/metal/params_wrapper.rb:245:in `process_action'

activerecord (6.0.3.2) lib/active_record/railties/controller_runtime.rb:27:in `process_action'

actionpack (6.0.3.2) lib/abstract_controller/base.rb:136:in `process'

actionview (6.0.3.2) lib/action_view/rendering.rb:39:in `process'

rack-mini-profiler (2.0.3) lib/mini_profiler/profiling_methods.rb:78:in `block in profile_method'

actionpack (6.0.3.2) lib/action_controller/metal.rb:190:in `dispatch'

actionpack (6.0.3.2) lib/action_controller/metal.rb:254:in `dispatch'

actionpack (6.0.3.2) lib/action_dispatch/routing/route_set.rb:50:in `dispatch'

actionpack (6.0.3.2) lib/action_dispatch/routing/route_set.rb:33:in `serve'

actionpack (6.0.3.2) lib/action_dispatch/journey/router.rb:49:in `block in serve'

actionpack (6.0.3.2) lib/action_dispatch/journey/router.rb:32:in `each'

actionpack (6.0.3.2) lib/action_dispatch/journey/router.rb:32:in `serve'

actionpack (6.0.3.2) lib/action_dispatch/routing/route_set.rb:834:in `call'

lib/middleware/omniauth_bypass_middleware.rb:68:in `call'

rack (2.2.3) lib/rack/tempfile_reaper.rb:15:in `call'

rack (2.2.3) lib/rack/conditional_get.rb:40:in `call'

rack (2.2.3) lib/rack/head.rb:12:in `call'

lib/content_security_policy/middleware.rb:12:in `call'

lib/middleware/anonymous_cache.rb:328:in `call'

rack (2.2.3) lib/rack/session/abstract/id.rb:266:in `context'

rack (2.2.3) lib/rack/session/abstract/id.rb:260:in `call'

actionpack (6.0.3.2) lib/action_dispatch/middleware/cookies.rb:648:in `call'

actionpack (6.0.3.2) lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'

activesupport (6.0.3.2) lib/active_support/callbacks.rb:101:in `run_callbacks'

actionpack (6.0.3.2) lib/action_dispatch/middleware/callbacks.rb:26:in `call'

actionpack (6.0.3.2) lib/action_dispatch/middleware/actionable_exceptions.rb:17:in `call'

actionpack (6.0.3.2) lib/action_dispatch/middleware/debug_exceptions.rb:32:in `call'

actionpack (6.0.3.2) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'

logster (2.9.1) lib/logster/middleware/reporter.rb:43:in `call'

railties (6.0.3.2) lib/rails/rack/logger.rb:37:in `call_app'

railties (6.0.3.2) lib/rails/rack/logger.rb:28:in `call'

config/initializers/100-quiet_logger.rb:19:in `call'

config/initializers/100-silence_logger.rb:31:in `call'

actionpack (6.0.3.2) lib/action_dispatch/middleware/remote_ip.rb:81:in `call'

actionpack (6.0.3.2) lib/action_dispatch/middleware/request_id.rb:27:in `call'

lib/middleware/enforce_hostname.rb:22:in `call'

rack (2.2.3) lib/rack/method_override.rb:24:in `call'

actionpack (6.0.3.2) lib/action_dispatch/middleware/executor.rb:14:in `call'

rack (2.2.3) lib/rack/sendfile.rb:110:in `call'

actionpack (6.0.3.2) lib/action_dispatch/middleware/host_authorization.rb:76:in `call'

rack-mini-profiler (2.0.3) lib/mini_profiler/profiler.rb:200:in `call'

message_bus (3.3.1) lib/message_bus/rack/middleware.rb:61:in `call'

lib/middleware/request_tracker.rb:176:in `call'

railties (6.0.3.2) lib/rails/engine.rb:527:in `call'

railties (6.0.3.2) lib/rails/railtie.rb:190:in `public_send'

railties (6.0.3.2) lib/rails/railtie.rb:190:in `method_missing'

rack (2.2.3) lib/rack/urlmap.rb:74:in `block in call'

rack (2.2.

```

Error Env:

| hostname | discourse-app |
| --- | --- |
| process\_id | 21623 |
| application\_version | 8a9e4504fea9edd693ceecf314308cd08e99f0ca |
| HTTP\_HOST | [mpl.co](http://mpl.co) |
| REQUEST\_URI | /posts.json |
| REQUEST\_METHOD | POST |
| HTTP\_USER\_AGENT | python-requests/2.22.0 |
| HTTP\_ACCEPT | application/json |
| HTTP\_X\_FORWARDED\_FOR | 183.82.159.193 |
| HTTP\_X\_REAL\_IP | 183.82.159.193 |
| username | Nideesh |
| time | 11:41 am |

Please suggest next steps.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [August 5, 2020, 6:21am UTC](https://meta.discourse.org/t/500-error-while-posting-a-topic/159756/15 "2020-08-05T06:21:47Z")

</div>

This is happening due to excerpts.

Please change the Site Setting `topic_excerpt_maxlength` to 999.

[https://github.com/discourse/discourse/commit/ee10002e207344106e90240fb46811e92aef45a8](https://github.com/discourse/discourse/commit/ee10002e207344106e90240fb46811e92aef45a8)

---

<div class="post-metadata">

### Author: ![KranthiKiranGude](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kranthikirangude/32/135387_2.png) [@KranthiKiranGude](https://meta.discourse.org/u/KranthiKiranGude)
#### Post date: [August 5, 2020, 12:37pm UTC](https://meta.discourse.org/t/500-error-while-posting-a-topic/159756/16 "2020-08-05T12:37:41Z")

</div>

Thanks @sam…Issue got resolved

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [August 6, 2020, 8:00am UTC](https://meta.discourse.org/t/500-error-while-posting-a-topic/159756/17 "2020-08-06T08:00:01Z")

</div>

This topic was automatically closed after 25 hours. New replies are no longer allowed.
