Error: ER_CANT_CREATE_THREAD: Can't create a new thread (errno 11)

Hey hey,

I deployed a Strapi CMS, which is working…almost.
Every second or third refresh, the Strapi Interface complains that an error occurred and does not show any entries of the requested model.

The web app logs are:

{
  "type": "INFO",
  "message": "[2022-11-08T12:32:16.065Z] error Error: ER_CANT_CREATE_THREAD: Can't create a new thread (errno 11); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug
   at Handshake.Sequence._packetToError (/home/cleavr/********/releases/20221024093526376/packages/backend/app/node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14)
   at Handshake.ErrorPacket (/home/cleavr/********/releases/20221024093526376/packages/backend/app/node_modules/mysql/lib/protocol/sequences/Handshake.js:123:18)
   at Protocol._parsePacket (/home/cleavr/********/releases/20221024093526376/packages/backend/app/node_modules/mysql/lib/protocol/Protocol.js:291:23)
   at Parser._parsePacket (/home/cleavr/********/releases/20221024093526376/packages/backend/app/node_modules/mysql/lib/protocol/Parser.js:433:10)
   at Parser.write (/home/cleavr/********/releases/20221024093526376/packages/backend/app/node_modules/mysql/lib/protocol/Parser.js:43:10)
   at Protocol.write (/home/cleavr/********/releases/20221024093526376/packages/backend/app/node_modules/mysql/lib/protocol/Protocol.js:38:16)
   at Socket.<anonymous> (/home/cleavr/********/releases/20221024093526376/packages/backend/app/node_modules/mysql/lib/Connection.js:88:28)
   at Socket.<anonymous> (/home/cleavr/********/releases/20221024093526376/packages/backend/app/node_modules/mysql/lib/Connection.js:526:10)
   at Socket.emit (events.js:400:28)
   at addChunk (internal/streams/readable.js:293:12)
   at readableAddChunk (internal/streams/readable.js:267:9)
   at Socket.Readable.push (internal/streams/readable.js:206:10)
   at TCP.onStreamRead (internal/stream_base_commons.js:188:23)
   --------------------
   at Protocol._enqueue (/home/cleavr/********/releases/20221024093526376/packages/backend/app/node_modules/mysql/lib/protocol/Protocol.js:144:48)
   at Protocol.handshake (/home/cleavr/********/releases/20221024093526376/packages/backend/app/node_modules/mysql/lib/protocol/Protocol.js:51:23)
   at Connection.connect (/home/cleavr/********/releases/20221024093526376/packages/backend/app/node_modules/mysql/lib/Connection.js:116:18)
   at /home/cleavr/********/releases/20221024093526376/packages/backend/app/node_modules/knex/lib/dialects/mysql/index.js:68:18
   at new Promise (<anonymous>)
   at Client_MySQL.acquireRawConnection (/home/cleavr/********/releases/20221024093526376/packages/backend/app/node_modules/knex/lib/dialects/mysql/index.js:63:12)
   at create (/home/cleavr/********/releases/20221024093526376/packages/backend/app/node_modules/knex/lib/client.js:290:39)
  ",
  "timestamp": "2022-11-8 13:32:16",
  "extras": { "timestamp": "2022-11-08T12:32:16.065Z" }
}

(I replaced \n with real breaks to make it more readable and replaced the url with “*****”)

I have another strapi CMS running on another/similiar server and there it runs without problems.
Do you have an idea what this error could be caused by?
Do I have to configure the database in a special way or is it caused by the app?

You could try upping the mysql limits. This article seems to be relevant:MySQL Server Error – “Can’t Create A New Thread (errno 11)” – The Geek Diary

Though - that may be just masking the symptoms. You might also check Strapi forums or discord and see if anyone has had a similar experience with Strapi. I checked their issues log on their repo to see if there was anything relevant but I didn’t see anything entered there.