SQL Exception, too many connections

114 views
Skip to first unread message

Vasilis Souvatzis

unread,
Jun 17, 2017, 3:56:33 PM6/17/17
to Payara Forum
Good evening everyone,

I think this is a trivial issue but so far I've only been using local DBs and haven't had any issues with connections. This time I wanted to use ElephantSQL and their free plan, which allows 5 concurrent connections. It's the free plan so it's pretty limited.

By trying to deploy with the default glassfish-resources descriptor that was generated by NetBeans, deployment fails with an SQL Exception saying that "too many concurrent connections" or something similar. Therefore, the default descriptor needs to be edited to match the limitations given by ElephantSQL.

I don't know which properties to change to fix this, although I'm guessing either "max-pool-size" or "steady-pool-size".


Many thanks in advance :)


Peter Ondruška

unread,
Jun 17, 2017, 4:20:22 PM6/17/17
to Payara Forum
Hi, this post should help you http://blog.payara.fish/an-introduction-to-connection-pools-in-payara-server particularly connection pool sizing chapter. P. 

--
You received this message because you are subscribed to the Google Groups "Payara Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to payara-forum...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/payara-forum/a8c9b76e-c623-4d9f-b7b5-84296a28b886%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Peter Ondruška

kaibo, s.r.o., ID 28435036, registered with the commercial register administered by the Municipal Court in Prague, section C, insert 141269.
Registered office and postal address: kaibo, s.r.o., Kališnická 379/10, Prague 3, 130 00, Czech Republic.
https://www.kaibo.eu

Vasilis Souvatzis

unread,
Jun 19, 2017, 4:46:44 AM6/19/17
to Payara Forum
Many thanks for the link Peter! I skimmed through the post and it seems I need to set the connection in the server itself and definitely set the max/min connections to 5. I'll try it later and be back with the results.

Vasilis Souvatzis

unread,
Jun 30, 2017, 3:40:08 PM6/30/17
to Payara Forum
Sorry for the delay but I finally managed to fix it thanks to Peter's link! Turns out I had to set the steady-pool-size and max-pool-size to 5 in order for it to work.


On Saturday, 17 June 2017 22:56:33 UTC+3, Vasilis Souvatzis wrote:
Reply all
Reply to author
Forward
0 new messages