Database Connection Refused

18 views
Skip to first unread message

Harvey Sama

unread,
Aug 11, 2017, 4:57:46 AM8/11/17
to Axon Framework Users
Hi,

After running my application from the IDE several times, I get the error Database connection refused with the reason too many connections. Checking the database connections, I see lots of connection from my application. I thought the connection will be closed when the application is stopped. How do I explicitly close connection?

Steven van Beelen

unread,
Aug 15, 2017, 6:16:38 AM8/15/17
to Axon Framework Users
Hi Harvey,

I'm using Intellij and I know that if I force kill the applications in run in it, I sometimes have hanging processes, so possibly also hanging database connections.
A bit of searching for your issue lets me think it depends on the database you're using by the way.
For postgres, I for example found the following, and for mysql the following might help.

Anyhow, I'm unsure if this is an Axon issue actually. I'm guessing it might have something to do with the way the application is closed or particular database settings.
How are you wiring up the database to your Axon application? Maybe that clarifies the issue a bit.

Hope this helps!

Cheers,
Steven

On Fri, Aug 11, 2017 at 10:57 AM Harvey Sama <prince...@gmail.com> wrote:
Hi,

After running my application from the IDE several times, I get the error Database connection refused with the reason too many connections. Checking the database connections, I see lots of connection from my application. I thought the connection will be closed when the application is stopped. How do I explicitly close connection?

--
You received this message because you are subscribed to the Google Groups "Axon Framework Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to axonframewor...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Harvey Sama

unread,
Aug 15, 2017, 4:07:32 PM8/15/17
to Axon Framework Users
Hi Stephen,

I use Intellij too. The database is configured in the application.properties file.




Best Regards,

Harvey Sama


To unsubscribe from this group and stop receiving emails from it, send an email to axonframework+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Axon Framework Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/axonframework/0IXQGoPJzaM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to axonframework+unsubscribe@googlegroups.com.

Allard Buijze

unread,
Aug 16, 2017, 4:20:08 AM8/16/17
to Axon Framework Users
Hi Stephen,

do you have any database specific configuration in your Spring application context?
Do you use the Jpa/Hibernate or JDBC components for Axon? Explicitly configured or using auto-configuration?

Allard

Op di 15 aug. 2017 om 22:07 schreef Harvey Sama <prince...@gmail.com>:
Hi Stephen,

I use Intellij too. The database is configured in the application.properties file.




Best Regards,

Harvey Sama


On 15 August 2017 at 11:16, Steven van Beelen <steven.v...@axoniq.io> wrote:
Hi Harvey,

I'm using Intellij and I know that if I force kill the applications in run in it, I sometimes have hanging processes, so possibly also hanging database connections.
A bit of searching for your issue lets me think it depends on the database you're using by the way.
For postgres, I for example found the following, and for mysql the following might help.

Anyhow, I'm unsure if this is an Axon issue actually. I'm guessing it might have something to do with the way the application is closed or particular database settings.
How are you wiring up the database to your Axon application? Maybe that clarifies the issue a bit.

Hope this helps!

Cheers,
Steven

On Fri, Aug 11, 2017 at 10:57 AM Harvey Sama <prince...@gmail.com> wrote:
Hi,

After running my application from the IDE several times, I get the error Database connection refused with the reason too many connections. Checking the database connections, I see lots of connection from my application. I thought the connection will be closed when the application is stopped. How do I explicitly close connection?

--
You received this message because you are subscribed to the Google Groups "Axon Framework Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to axonframewor...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Axon Framework Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/axonframework/0IXQGoPJzaM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to axonframewor...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Axon Framework Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to axonframewor...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages