Jump to content

[Solved] Database (max_user_connections) Error


wape

Recommended Posts

I'am trying to connect to my database with the host name johnny.heliohost.org and its giving me a max user connection error

 

Heres the error:

 

  original:
   { Error: User wape_jack already has more than 'max_user_connections' active connections
    at Packet.asError (/home/jack/node_modules/mysql2/lib/packets/packet.js:712:17)
    at ClientHandshake.execute (/home/jack/node_modules/mysql2/lib/commands/command.js:28:26)
    at Connection.handlePacket (/home/jack/node_modules/mysql2/lib/connection.js:408:32)
    at PacketParser.Connection.packetParser.p [as onPacket] (/home/jack/node_modules/mysql2/lib/connection.js:70:12)
    at PacketParser.executeStart (/home/jack/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.Connection.stream.on.data (/home/jack/node_modules/mysql2/lib/connection.js:77:25)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)
    at readableAddChunk (_stream_readable.js:250:11)
    at Socket.Readable.push (_stream_readable.js:208:10)
    at TCP.onread (net.js:607:20)
     code: 'ER_TOO_MANY_USER_CONNECTIONS',
     errno: 1203,
     sqlState: '42000',
     sqlMessage: 'User wape_jack already has more than \'max_user_connections\' active connections' } }

Edited by wape
Link to comment
Share on other sites

This is usually caused by badly-written code that doesn’t close its connections when it’s done with them.

 

I assume you wrote the program yourself? If so, be sure your code is closing the database connections when you’re finished with them. Many times I find code that opens a new connection for every query, never closes them, and fails when it hits the connection limit. You should either open, query, close every time, or open at the start of the script, reuse the single connection for every query, and close it at the end.

Link to comment
Share on other sites

You currently have zero open mysql connections. The limit on Johnny is 4 open connections at once. If you try to open more than 4 connections at the same time you will get that error. If you need more than 4 simultaneous connections I recommend transferring your account to Tommy which currently offers unlimited mysql connections. A limit may be added in the future on Tommy as well if we find people abusing the unlimited connections.

Link to comment
Share on other sites

$1.00+ to transfer to Tommy

$6.00+ to transfer to Tommy and get double storage space 2000 MB

Hmm? I thought the $6 was for people without accounts?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...