# RocketChat 7 slow API responses with default docker deployment

**URL:** <https://forums.rocket.chat/t/rocketchat-7-slow-api-responses-with-default-docker-deployment/21620>\
**Category:** Community Support\
**Tags:** docker\
**Created:** [February 13, 2025, 5:01pm UTC](https://forums.rocket.chat/t/rocketchat-7-slow-api-responses-with-default-docker-deployment/21620 "2025-02-13T17:01:27Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![michal.mocnak](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@michal.mocnak](https://forums.rocket.chat/u/michal.mocnak)\
**Post date:** [February 13, 2025, 5:01pm UTC](https://forums.rocket.chat/t/rocketchat-7-slow-api-responses-with-default-docker-deployment/21620/1 "2025-02-13T17:01:27Z")

</div>

### Description

Default docker deployment with rocker.server v7 (7.2.2 and 7.3.1 tested) is super slow on each API request = approx 7-12 seconds to response.  
Checked same configuration on v6 and it does work properly without any issue.

### Server Setup Information

- Version of Rocket.Chat Server: 7.2.2
- Operating System: Docker 27.01 / Ubuntu 22.04 / Swarm
- Deployment Method: docker
- Number of Running Instances: 1
- DB Replicaset Oplog: 1
- NodeJS Version: 20.18.3 - x64
- MongoDB Version: 6.0.13
- Proxy: traefik
- Firewalls involved:

### Any additional Information

```auto
x-default-opts:
  &default-opts
  logging:
    options:
      max-size: "10m"

services:
  mongodb:
    <<: *default-opts
    image: bitnami/mongodb:6.0
    volumes:
     - mongodb:/bitnami/mongodb
    environment:
      MONGODB_REPLICA_SET_MODE: primary
      MONGODB_REPLICA_SET_NAME: rs0
      MONGODB_PORT_NUMBER: 27017
      MONGODB_INITIAL_PRIMARY_HOST: mongodb
      MONGODB_INITIAL_PRIMARY_PORT_NUMBER: 27017
      MONGODB_ADVERTISED_HOSTNAME: mongodb
      MONGODB_ENABLE_JOURNAL: 'true'
      ALLOW_EMPTY_PASSWORD: 'yes'
    networks:
      - traefik_proxy

  rocketchat:
    <<: *default-opts
    image: rocket.chat:7.2.2
    volumes:
      - uploads:/app/uploads
    environment:
      PORT: 3000
      ROOT_URL: https://chat.my.domain
      MONGO_URL: mongodb://mongodb:27017/rocketchat?replicaSet=rs0
      MONGO_OPLOG_URL: mongodb://mongodb:27017/local?replicaSet=rs0
      DEPLOY_METHOD: docker
      Accounts_UseDNSDomainCheck: 'false'
    networks:
      - chat_internal
      - traefik_proxy
    deploy:
      mode: replicated
      replicas: 1
      labels:
        - traefik.enable=true
        - traefik.docker.network=traefik_proxy
        - traefik.http.routers.rocketchat.rule=Host(`chat.my.domain`)
        - traefik.http.routers.rocketchat.entrypoints=websecure
        - traefik.http.routers.rocketchat.tls.certresolver=resolver
        - traefik.http.services.rocketchat.loadbalancer.server.port=3000  
    depends_on:
      - mongodb
 
networks:
  traefik_proxy:
    external: true
  chat_internal:
    external: true

volumes:
  uploads:
  mongodb:

```

---

<div class="post-metadata">

**Author:** ![reetp](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/reetp/32/5546_2.png) [@reetp](https://forums.rocket.chat/u/reetp)\
**Post date:** [February 13, 2025, 9:41pm UTC](https://forums.rocket.chat/t/rocketchat-7-slow-api-responses-with-default-docker-deployment/21620/2 "2025-02-13T21:41:36Z")

</div>

You’ll have to tell us what you are actually trying to do.

What API calls?

---

<div class="post-metadata">

**Author:** ![michal.mocnak](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@michal.mocnak](https://forums.rocket.chat/u/michal.mocnak)\
**Post date:** [February 13, 2025, 9:53pm UTC](https://forums.rocket.chat/t/rocketchat-7-slow-api-responses-with-default-docker-deployment/21620/3 "2025-02-13T21:53:33Z")

</div>

I am sorry. Literally every single API call is that slow. Checking via Chrome debug tools.

---

<div class="post-metadata">

**Author:** ![michal.mocnak](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@michal.mocnak](https://forums.rocket.chat/u/michal.mocnak)\
**Post date:** [February 14, 2025, 9:09am UTC](https://forums.rocket.chat/t/rocketchat-7-slow-api-responses-with-default-docker-deployment/21620/4 "2025-02-14T09:09:12Z")

</div>

For example endpoint `/api/v1/settings.public` took 5.76s in v7.3.1 but in v6.13 it took 10ms

 ![image](https://us1.discourse-cdn.com/flex021/uploads/rocketchat/original/2X/6/6448e3848b471e16f6757e4ad8c489d0c887e666.png)

---

<div class="post-metadata">

**Author:** ![reetp](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/reetp/32/5546_2.png) [@reetp](https://forums.rocket.chat/u/reetp)\
**Post date:** [February 14, 2025, 6:22pm UTC](https://forums.rocket.chat/t/rocketchat-7-slow-api-responses-with-default-docker-deployment/21620/5 "2025-02-14T18:22:59Z")

</div>

What do your server logs tell you is going on?

What file storage are you using?

---

<div class="post-metadata">

**Author:** ![michal.mocnak](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@michal.mocnak](https://forums.rocket.chat/u/michal.mocnak)\
**Post date:** [February 15, 2025, 7:51am UTC](https://forums.rocket.chat/t/rocketchat-7-slow-api-responses-with-default-docker-deployment/21620/6 "2025-02-15T07:51:59Z")

</div>

Nothing wrong in logs seems to me and storage is now local SSD.

```auto
LocalStore: store created at  
LocalStore: store created at  
LocalStore: store created at  
{"level":40,"time":"2025-02-15T07:38:16.227Z","pid":1,"hostname":"5bf00cf20b15","name":"VoIPAsteriskService","msg":"Voip is not enabled. Cant start the service"} 
{"level":51,"time":"2025-02-15T07:38:16.252Z","pid":1,"hostname":"5bf00cf20b15","name":"Migrations","msg":"Not migrating, already at version 318"} 
[2025-02-15T07:38:16.261Z] INFO 0f673441-ee1f-4d80-b55a-d94dcc4235eb/BROKER: Moleculer v0.14.35 is starting... 
[2025-02-15T07:38:16.262Z] INFO 0f673441-ee1f-4d80-b55a-d94dcc4235eb/BROKER: Namespace: <not defined> 
[2025-02-15T07:38:16.262Z] INFO 0f673441-ee1f-4d80-b55a-d94dcc4235eb/BROKER: Node ID: 0f673441-ee1f-4d80-b55a-d94dcc4235eb 
[2025-02-15T07:38:16.263Z] INFO 0f673441-ee1f-4d80-b55a-d94dcc4235eb/REGISTRY: Strategy: RoundRobinStrategy 
[2025-02-15T07:38:16.263Z] INFO 0f673441-ee1f-4d80-b55a-d94dcc4235eb/REGISTRY: Discoverer: LocalDiscoverer 
[2025-02-15T07:38:16.265Z] INFO 0f673441-ee1f-4d80-b55a-d94dcc4235eb/BROKER: Serializer: EJSONSerializer 
[2025-02-15T07:38:16.271Z] INFO 0f673441-ee1f-4d80-b55a-d94dcc4235eb/BROKER: Validator: FastestValidator 
[2025-02-15T07:38:16.273Z] INFO 0f673441-ee1f-4d80-b55a-d94dcc4235eb/BROKER: Registered 13 middleware(s). 
[2025-02-15T07:38:16.274Z] INFO 0f673441-ee1f-4d80-b55a-d94dcc4235eb/BROKER: Transporter: TcpTransporter 
{"level":51,"time":"2025-02-15T07:38:16.293Z","pid":1,"hostname":"5bf00cf20b15","name":"DatabaseWatcher","msg":"Using change streams"} 
[2025-02-15T07:38:16.299Z] INFO 0f673441-ee1f-4d80-b55a-d94dcc4235eb/TRANSIT: Connecting to the transporter... 
[2025-02-15T07:38:16.319Z] INFO 0f673441-ee1f-4d80-b55a-d94dcc4235eb/TRANSPORTER: TCP server is listening on port 38679 
[2025-02-15T07:38:16.319Z] INFO 0f673441-ee1f-4d80-b55a-d94dcc4235eb/TRANSPORTER: UDP Discovery is disabled. 
[2025-02-15T07:38:16.319Z] INFO 0f673441-ee1f-4d80-b55a-d94dcc4235eb/TRANSPORTER: TCP Transporter started. 
{"level":51,"time":"2025-02-15T07:38:16.671Z","pid":1,"hostname":"5bf00cf20b15","name":"License","msg":"License installed","version":"3.0","hash":"O3XdD1N0"} 
ufs: temp directory created at "/tmp/ufs" 
[2025-02-15T07:38:16.828Z] INFO 0f673441-ee1f-4d80-b55a-d94dcc4235eb/REGISTRY: '$node' service is registered. 
[2025-02-15T07:38:16.829Z] INFO 0f673441-ee1f-4d80-b55a-d94dcc4235eb/REGISTRY: 'matrix' service is registered. 
[2025-02-15T07:38:16.830Z] INFO 0f673441-ee1f-4d80-b55a-d94dcc4235eb/$NODE: Service '$node' started. 
[2025-02-15T07:38:16.830Z] INFO 0f673441-ee1f-4d80-b55a-d94dcc4235eb/MATRIX: Service 'matrix' started. 
[2025-02-15T07:38:16.830Z] INFO 0f673441-ee1f-4d80-b55a-d94dcc4235eb/BROKER: ✔ ServiceBroker with 2 service(s) started successfully in 541ms. 
+--------------------------------------------+ 
| SERVER RUNNING | 
+--------------------------------------------+ 
| | 
| Rocket.Chat Version: 7.3.1 | 
| NodeJS Version: 22.14.0 - x64 | 
| MongoDB Version: 6.0.13 | 
| MongoDB Engine: wiredTiger | 
| Platform: linux | 
| Process Port: 3000 | 
| Site URL: https://chat.my.dom | 
| ReplicaSet OpLog: Enabled | 
| Commit Hash: 6a2724740a | 
| Commit Branch: HEAD | 
| | 
+--------------------------------------------+ 
{"level":51,"time":"2025-02-15T07:38:28.412Z","pid":1,"hostname":"5bf00cf20b15","name":"License","msg":"License installed","version":"3.0","hash":"x7MO8UVQ"} 

```

---

<div class="post-metadata">

**Author:** ![reetp](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/reetp/32/5546_2.png) [@reetp](https://forums.rocket.chat/u/reetp)\
**Post date:** [February 15, 2025, 10:03am UTC](https://forums.rocket.chat/t/rocketchat-7-slow-api-responses-with-default-docker-deployment/21620/7 "2025-02-15T10:03:04Z")

</div>

Are you using GridFS or “local storage”?

Check your collection sizes too.

---

<div class="post-metadata">

**Author:** ![michal.mocnak](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@michal.mocnak](https://forums.rocket.chat/u/michal.mocnak)\
**Post date:** [February 15, 2025, 1:30pm UTC](https://forums.rocket.chat/t/rocketchat-7-slow-api-responses-with-default-docker-deployment/21620/8 "2025-02-15T13:30:12Z")

</div>

It seems i figured it out. I am using just local storage. Later i’ll switch into MinIO. I realized mongodb was in **traefik\_proxy** network instead of **chat\_internal**. As rocketchat service is in both but **chat\_internal** has as the main. Probably in v7 there is different dns resolve or something like that and it timeouts resolving mongo in different network.

However in v6 it worked well. And what is strange too is when i have set networks correctly and switched to mongo 7 it started to be slow again ;o)

Anyway now i am running **mongo v6** and **rocketchat v7** and it works well!!

---

<div class="post-metadata">

**Author:** ![reetp](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/reetp/32/5546_2.png) [@reetp](https://forums.rocket.chat/u/reetp)\
**Post date:** [February 15, 2025, 6:34pm UTC](https://forums.rocket.chat/t/rocketchat-7-slow-api-responses-with-default-docker-deployment/21620/9 "2025-02-15T18:34:42Z")

</div>

> [@michal.mocnak](#):
>
> ```auto
> networks:
> - chat_internal
> - traefik_proxy
> 
> ```

This I guess?

Glad you got it sorted.

---

<div class="post-metadata">

**Author:** ![michal.mocnak](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@michal.mocnak](https://forums.rocket.chat/u/michal.mocnak)\
**Post date:** [February 15, 2025, 7:10pm UTC](https://forums.rocket.chat/t/rocketchat-7-slow-api-responses-with-default-docker-deployment/21620/10 "2025-02-15T19:10:41Z")

</div>

> [@michal.mocnak](#):
>
> ```auto
> networks:
> - traefik_proxy
> 
> ```

Actually this was ok but mongodb was in traefik\_proxy instead of chat\_internal. That was the problem. Why it has problem with mongo v7 i still don’t know. But it works with v6 so i’ll leave it ;o)

---

<div class="post-metadata">

**Author:** ![reetp](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/reetp/32/5546_2.png) [@reetp](https://forums.rocket.chat/u/reetp)\
**Post date:** [February 15, 2025, 7:23pm UTC](https://forums.rocket.chat/t/rocketchat-7-slow-api-responses-with-default-docker-deployment/21620/11 "2025-02-15T19:23:02Z")

</div>

Kk.

I’d start figuring the upgrade. You’ll have to eventually!!

---

<div class="post-metadata">

**Author:** ![michal.mocnak](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@michal.mocnak](https://forums.rocket.chat/u/michal.mocnak)\
**Post date:** [February 16, 2025, 5:03pm UTC](https://forums.rocket.chat/t/rocketchat-7-slow-api-responses-with-default-docker-deployment/21620/12 "2025-02-16T17:03:32Z")

</div>

And finally i’ve figured it out with mongo version. All the problems were connected to the os version. Initially i’ve tested it on Ubuntu 22.04 LTS and it seems after upgrading to 24.04 LTS it starts to work correctly. Probably it was connected to mongo and it’s dependencies (even 22.04 is offically supported for version 7).

---

<div class="post-metadata">

**Author:** ![reetp](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/reetp/32/5546_2.png) [@reetp](https://forums.rocket.chat/u/reetp)\
**Post date:** [February 16, 2025, 6:21pm UTC](https://forums.rocket.chat/t/rocketchat-7-slow-api-responses-with-default-docker-deployment/21620/13 "2025-02-16T18:21:17Z")

</div>

That’s a ballache but excellent feedback thanks.

Typical with this fangled rapid release, beta at best, who cares if we didn’t test throroughly nonsense…

Not good enough at Enterprise level IMHO.

It will get mentioned 😉
