You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Henry Tong <he...@gmail.com> on 2007/01/26 05:12:39 UTC

Cannot get a connection, pool exhausted

Hi, 

Our team are developing website using tapestry 4.1, honeycomb 0.3.3, hibernate
3.2.0.cr4, hivemind, DBCP 1.2.1 on Tomcat 4.1 and MySQL 4.1. The applications
run smoothly and suddenly throws exception one week later. The exception is
org.apache.commons.dbcp.SQLNestedException - Cannot get a connection, pool
exhausted. 

The hibernate Daos only find data but not save data at this moment. Any idea to
prevent this from happening?

Thanks in advance for your Assistance.

Yours Sincerely,
Henry Tong


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


RE: Cannot get a connection, pool exhausted

Posted by Ma...@bmw.ch.
You don't really need to know, when the user leaves your page, because
the app holds the connection only while processing a request.
I'd enable JMX and have a close look at the connection pool and at the
threads-tab. Possibly, there's a condition which leads to a blocked
request-processor-thread holding on for a connection forever.
You could also try the logAbandonedConnection-Feature of DBCP ...

hth,
Marcus

> -----Original Message-----
> From: Henry Tong [mailto:henrytong.pi@gmail.com] 
> Sent: Friday, January 26, 2007 8:36 AM
> To: Tapestry users
> Subject: Re: Cannot get a connection, pool exhausted
> 
> Hi,
> 
> any idea how to release connection when user close the web page?
> 
> Yours Sincerely,
> Henry Tong
> 
> On 1/26/07, Jesse Kuhnert <jk...@gmail.com> wrote:
> >
> > Allow only one connection in your connection pool and hit the app 
> > until you find what section freezes / stops working...
> >
> > On 1/25/07, Henry Tong <he...@gmail.com> wrote:
> > > Hi,
> > >
> > > Our team are developing website using tapestry 4.1, 
> honeycomb 0.3.3,
> > hibernate
> > > 3.2.0.cr4, hivemind, DBCP 1.2.1 on Tomcat 4.1 and MySQL 4.1. The
> > applications
> > > run smoothly and suddenly throws exception one week later. The 
> > > exception
> > is
> > > org.apache.commons.dbcp.SQLNestedException - Cannot get a 
> > > connection,
> > pool
> > > exhausted.
> > >
> > > The hibernate Daos only find data but not save data at 
> this moment. 
> > > Any
> > idea to
> > > prevent this from happening?
> > >
> > > Thanks in advance for your Assistance.
> > >
> > > Yours Sincerely,
> > > Henry Tong
> > >
> > >
> > > 
> --------------------------------------------------------------------
> > > - To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
> >
> >
> > --
> > Jesse Kuhnert
> > Tapestry/Dojo team member/developer
> >
> > Open source based consulting work centered around 
> > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


How do you structure your Tapestry app?

Posted by mu...@fantasymail.de.
I was just wondering why Honeycomb creates a Core and a Web project for Tapestry....

To me a core is something that contains "Core" classes that can be reused in other Web projects....

However the created Core projects don't know anything about Tapestry, only the Web project...so you can only put Tapestry independent stuff in there.
To me classes baesd on PropertySelection etc...all belong to a reusable core....

So how do you all layout your Tapestry projects?

Put it all in one project or separation into 2 or 3 or 4 projects?

1. You could create one project for all your database objects that are project independent.

2. One for the Tapestry re-usable components that are project independent 

3. And finally your specific web project that makes use of all the reusable stuff? 

Or even 

4. a project to separate the project specific database objects from the Tapestry page and component classes?


Just curious....

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Cannot get a connection, pool exhausted

Posted by Richard Clark <rd...@gmail.com>.
There's no good way to know when the user closes or navigates away
from the web page. (There is an "on close" event available in
Javascript. You might be tempted to send a signal to the server when
this happens, but the event isn't implemented the same way across all
browsers and if the user "closes" the page by quitting the browser you
will never see the event.)

What most people do is to open the connection, get any needed
information, and then close the connection -- all before rendering the
page.

 ...Richard


On 1/25/07, Henry Tong <he...@gmail.com> wrote:

> any idea how to release connection when user close the web page?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Cannot get a connection, pool exhausted

Posted by Henry Tong <he...@gmail.com>.
Hi,

any idea how to release connection when user close the web page?

Yours Sincerely,
Henry Tong

On 1/26/07, Jesse Kuhnert <jk...@gmail.com> wrote:
>
> Allow only one connection in your connection pool and hit the app
> until you find what section freezes / stops working...
>
> On 1/25/07, Henry Tong <he...@gmail.com> wrote:
> > Hi,
> >
> > Our team are developing website using tapestry 4.1, honeycomb 0.3.3,
> hibernate
> > 3.2.0.cr4, hivemind, DBCP 1.2.1 on Tomcat 4.1 and MySQL 4.1. The
> applications
> > run smoothly and suddenly throws exception one week later. The exception
> is
> > org.apache.commons.dbcp.SQLNestedException - Cannot get a connection,
> pool
> > exhausted.
> >
> > The hibernate Daos only find data but not save data at this moment. Any
> idea to
> > prevent this from happening?
> >
> > Thanks in advance for your Assistance.
> >
> > Yours Sincerely,
> > Henry Tong
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> --
> Jesse Kuhnert
> Tapestry/Dojo team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: Cannot get a connection, pool exhausted

Posted by Patrick Moore <tr...@gmail.com>.
This just tells you the code that ran *after* the offending code. Which if
there are background process being fired by quartz for example, tells you
nothing.

I would suggest whipping together a proxy around the connection manager and
saving a exception (for it's stack trace) each time the code hands out a
connection and then discards it everytime the connection is returned to the
connection pool. Done properly and with jmx it becomes another tool that you
can hand to your QA engineers so they can give you better bug reports.

-Pat

On 1/25/07, Jesse Kuhnert <jk...@gmail.com> wrote:
>
> Allow only one connection in your connection pool and hit the app
> until you find what section freezes / stops working...

Re: Cannot get a connection, pool exhausted

Posted by Jesse Kuhnert <jk...@gmail.com>.
Allow only one connection in your connection pool and hit the app
until you find what section freezes / stops working...

On 1/25/07, Henry Tong <he...@gmail.com> wrote:
> Hi,
>
> Our team are developing website using tapestry 4.1, honeycomb 0.3.3, hibernate
> 3.2.0.cr4, hivemind, DBCP 1.2.1 on Tomcat 4.1 and MySQL 4.1. The applications
> run smoothly and suddenly throws exception one week later. The exception is
> org.apache.commons.dbcp.SQLNestedException - Cannot get a connection, pool
> exhausted.
>
> The hibernate Daos only find data but not save data at this moment. Any idea to
> prevent this from happening?
>
> Thanks in advance for your Assistance.
>
> Yours Sincerely,
> Henry Tong
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org