# Long runtime moving posts / timeout errors

**URL:** https://meta.discourse.org/t/long-runtime-moving-posts-timeout-errors/351345
**Category:** Support
**Created:** [February 9, 2025, 4:09pm UTC](https://meta.discourse.org/t/long-runtime-moving-posts-timeout-errors/351345 "2025-02-09T16:09:09Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Thorsten](https://avatars.discourse-cdn.com/v4/letter/t/d2c977/32.png) [@Thorsten](https://meta.discourse.org/u/Thorsten)
#### Post date: [February 9, 2025, 4:09pm UTC](https://meta.discourse.org/t/long-runtime-moving-posts-timeout-errors/351345/1 "2025-02-09T16:09:09Z")

</div>

We are running a self-hosted Discourse forum ([tff-forum.de](https://tff-forum.de)) with more than 4 million posts and a lot of large threads.

Since the last update to version 3.4.0.beta3 we are experiencing long runtimes of 15 to 20 seconds when moving posts from one thread to another.

In some cases the function terminates with an error and the log shows the following message:

`Unicorn worker received USR2 signal indicating it is about to timeout, dumping backtrace for main thread`

Before the update we had only problems moving posts between very large threads. Now the function terminates sometimes when the threads only contain a few posts.

Do you have any advice what we can check to find the cause for this problem? Is it possible that we have an issue with the database (missing index/statistics)?

Thank you in advance for your support.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [February 9, 2025, 4:29pm UTC](https://meta.discourse.org/t/long-runtime-moving-posts-timeout-errors/351345/2 "2025-02-09T16:29:59Z")

</div>

There were some commits in beta3 that had some performance issue. You should probably upgrade.

Note: [PostgreSQL 15 update](https://meta.discourse.org/t/postgresql-15-update/349515) complicates the upgrade.

---

<div class="post-metadata">

### Author: ![Thorsten](https://avatars.discourse-cdn.com/v4/letter/t/d2c977/32.png) [@Thorsten](https://meta.discourse.org/u/Thorsten)
#### Post date: [February 9, 2025, 5:41pm UTC](https://meta.discourse.org/t/long-runtime-moving-posts-timeout-errors/351345/3 "2025-02-09T17:41:58Z")

</div>

Thank you for the advice to update to 3.4.0.beta4. Because of the PostgreSQL change to version 15 we need a longer maintenance timeslot. But it makes sense to do the update in the next days to see if this solves our problem.

We were a little bit surprised about the PostgreSQL update. We did the update of our test system to 3.4.0.beta3 a few days earlier and had no problems. When we did the update of the production system the database update was suddenly part of the process. We were not prepared for that and skipped the database update. So we have to do it either together with version 3.4.0.beta4 or as a separate step before.

Is it possible that the skipped database update causes our performance issues? Is there an easy way to check if the database indexes and statistics are correct?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [February 9, 2025, 6:43pm UTC](https://meta.discourse.org/t/long-runtime-moving-posts-timeout-errors/351345/4 "2025-02-09T18:43:24Z")

</div>

> [@Thorsten](#):
>
> Is it possible that the skipped database update causes our performance issues?

Probably not.

> [@Thorsten](#):
>
> Is there an easy way to check if the database indexes and statistics are correct?

You can do the vacuum and reindex commands suggested in the PG update topic at any time.
