Stop Activitypub in the app file?

Hi all,

I have a ghost instance that was running properly with activitypub and notice the below error in the logs :
I suspect it comes from Activitypub and was wondering if there is a pragrammatical way to turn off the network ? Exemple we can add this code in config.production.json file

“security”: {
“staffDeviceVerification”: false
}

To turn off the 2AUth

Is there something similar to turn off the network ?

Many thanks,

\[2025-09-30 12:30:55\] ERROR Too many connections
Sep 30 13:30:55
Sep 30 13:30:55 Too many connections
Sep 30 13:30:55 2025-09-30T12:30:55Z
Sep 30 13:30:55 Error Code:
Sep 30 13:30:55 ER_CON_COUNT_ERROR
Sep 30 13:30:55 2025-09-30T12:30:55Z
Sep 30 13:30:55 ----------------------------------------
Sep 30 13:30:55 2025-09-30T12:30:55Z
Sep 30 13:30:55 Error: Too many connections
Sep 30 13:30:55 at Packet.asError (/home/cloudron/ghost/versions/6.1.0/node_modules/mysql2/lib/packets/packet.js:740:17)
Sep 30 13:30:55 at ClientHandshake.execute (/home/cloudron/ghost/versions/6.1.0/node_modules/mysql2/lib/commands/command.js:29:26)
Sep 30 13:30:55 at Connection.handlePacket (/home/cloudron/ghost/versions/6.1.0/node_modules/mysql2/lib/base/connection.js:475:34)
Sep 30 13:30:55 at PacketParser.onPacket (/home/cloudron/ghost/versions/6.1.0/node_modules/mysql2/lib/base/connection.js:93:12)
Sep 30 13:30:55 at PacketParser.executeStart (/home/cloudron/ghost/versions/6.1.0/node_modules/mysql2/lib/packet_parser.js:75:16)
Sep 30 13:30:55 at Socket. (/home/cloudron/ghost/versions/6.1.0/node_modules/mysql2/lib/base/connection.js:100:25)
Sep 30 13:30:55 at Socket.emit (node:events:524:28)
Sep 30 13:30:55 at addChunk (node:internal/streams/readable:561:12)
Sep 30 13:30:55 at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
Sep 30 13:30:55 at Readable.push (node:internal/streams/readable:392:5)
Sep 30 13:30:55 at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
Sep 30 13:30:55
Sep 30 13:31:00 => Healtheck error got response status 503
Sep 30 13:31:00 172.18.0.1 - - \[30/Sep/2025:12:31:00 +0000\] “GET / HTTP/1.1” 503 1867 “-” “Mozilla (CloudronHealth)”
Sep 30 13:31:08 172.18.0.1 - - \[30/Sep/2025:12:31:08 +0000\] “GET / HTTP/1.1” 503 1867 “-” “Uptime-Kuma/1.23.16”
Sep 30 13:31:10 172.18.0.1 - - \[30/Sep/2025:12:31:10 +0000\] “GET / HTTP/1.1” 503 1867 “-” “Mozilla (CloudronHealth)”
Sep 30 13:31:10 => Healtheck error got response status 503
Sep 30 13:31:20 172.18.0.1 - - \[30/Sep/2025:12:31:20 +0000\] “GET / HTTP/1.1” 503 1867 “-” “Mozilla (CloudronHealth)”
Sep 30 13:31:20 => Healtheck error got response status 503
Sep 30 13:31:30 => Healtheck error got response status 503
Sep 30 13:31:30 172.18.0.1 - - \[30/Sep/2025:12:31:30 +0000\] “GET / HTTP/1.1” 503 1867 “-” “Mozilla (CloudronHealth)”

As far as I am aware, since ActivityPub is out of beta, there isn’t a way to control it via the configuration.

However, I don’t see the error you’re describing as a bug. Too many connections is not a Ghost error, but from your MySQL server.

Check what the connection limit is there.

A singular Ghost instance will use a minimum of 2 and a maximum of 10 connections, out of the box:

If you’re self-hosting the ActivityPub server yourself, it also uses MySQL, of course. The server uses a maximum of 200 connections:

I’d tweak the max connections your MySQL server can handle:

Out of the box, that’s a mere 151.

To diagnose where the MySQL connections come from, you can also query the information_schema.processlist table on your MySQL server. That holds information on the open connections, so you can analyse that accordingly.

1 Like

thanks @jannis it helped me to fix it i just had to increase the memory space.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.