Re: error: too many connections for database ?

62 views
Skip to first unread message

de...@appfog.com

unread,
Apr 9, 2015, 12:23:17 PM4/9/15
to appfog...@googlegroups.com
Hello, Chris. This is due to the multi-tenant nature of our service nodes. Basically, there are multiple databases across a few servers with a user only able to access their own database. You will need to utilize a connection pool or set up a few persistent connections that all of your users would exploit.

On Thursday, April 9, 2015 at 12:58:16 AM UTC-5, Chris Wu wrote:
Hi guys

i am doing a performance test about appfog application hosted nodejs + sequlizejs + Postgresql DB.  When 100 users access a same app url at sametime, application pop up a error message  {too many connections for database "d85a2a1e5c4t14910ac3be5690888f06" } . But i do the same operation at local lab, everything is ok. Anybody know this issue ? How to fix it.  Thanks


log information:

events.js:72
        throw er; // Unhandled 'error' event
              ^
error: too many connections for database "d85a2a1e5c4t14910ac3be5690888f06"
    at Connection.parseE (/mnt/var/vcap.local/dea/apps/**/app/node_modules/pg/lib/connection.js:561:11)
    at Connection.parseMessage (/mnt/var/vcap.local/dea/apps/**/app/node_modules/pg/lib/connection.js:390:17)
    at null.<anonymous> (/mnt/var/vcap.local/dea/apps/**/app/node_modules/pg/lib/connection.js:98:18)
    at Socket.emit (events.js:95:17)
    at Socket.<anonymous> (_stream_readable.js:748:14)
    at Socket.emit (events.js:92:17)
    at emitReadable_ (_stream_readable.js:410:10)
    at emitReadable (_stream_readable.js:406:5)
    at readableAddChunk (_stream_readable.js:168:9)
    at Socket.Readable.push (_stream_readable.js:130:10)



{ [error: too many connections for database "d85a2a1e5c4t14910ac3be5690888f06"]
  name: 'error',
  length: 124,
  severity: 'FATAL',
  code: '53300',
  detail: undefined,
  hint: undefined,
  position: undefined,
  internalPosition: undefined,
  internalQuery: undefined,
  where: undefined,
  file: 'postinit.c',
  line: '314',
  routine: 'CheckMyDatabase' }



Chris Wu

unread,
Apr 9, 2015, 1:58:16 AM4/9/15
to appfog...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages