You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Derek Hohls <DH...@csir.co.za> on 2008/05/07 15:18:21 UTC

Database connection problems

Using Cocoon 2.1.8
 
I have an app which has been working fine... up to now.
I am now in a situation where:
* the "plain" pages on the website (ie. not accessing the 
database) display just fine
* I can access the database from a 3rd party tool (the
MySQL Query Browser) without any problems
 
BUT I am unable to retrieve any database data via the
interface... the browser simply shows me its hourglass
and there is no further response.  I have looked at the
Cocoon log and the Tomcat log but even the URLs do
not show up in these.
 
Any ideas on where the bottleneck might be occurring 
and how to overcome it?
 
Any help is much appreciated!
 
Thanks
Derek
 

-- 
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.


Re: Database connection problems

Posted by Derek Hohls <DH...@csir.co.za>.
Jeroen
 
1. AFAIK there is no firewall - at least, the app has been working on
an internal server (port 8080) which has been accessible up to now.
 
2.  I thought of this one too - and realized I was not sure (a) how to
check if it is actually full and (b) what/how it gets full (c) how to ensure
it does NOT get full in the first place - I had thought that each user who 
logs on to the system gets one connection, but now I am thinking that it
might be each single SQL request that adds to the pool ... in which case 
I will need substantially more than the present limit of 50.
 
3. The log level is at INFO - shows all requests including WARNING and 
ERROR.
 
4. The MySQL JDBC connector.
 
5. I have been waiting for the restart by the server admin... but I was 
concerned because I do not know _why_ this happened (this type of 
problem has never shown up in 8 or so years of using Cocoon!)
 
Thanks
Derek

>>> On 2008/05/07 at 03:39, in message <48...@onehippo.com>, Jeroen Reijn <j....@onehippo.com> wrote:
Hi Derek,

a few things come to mind:

- Might there be a firewall in between of which the settings changed?
- You JDBC connection pool is full?
- Did you try to put the log level a bit higher to see what the database 
connection is doing?
- What cocoon component are you using to connect to the database?
- Are you able to restart the application, to do some testing?

Regards,

Jeroen Reijn

Derek Hohls wrote:
> Using Cocoon 2.1.8
>  
> I have an app which has been working fine... up to now.
> I am now in a situation where:
> * the "plain" pages on the website (ie. not accessing the
> database) display just fine
> * I can access the database from a 3rd party tool (the
> MySQL Query Browser) without any problems
>  
> BUT I am unable to retrieve any database data via the
> interface... the browser simply shows me its hourglass
> and there is no further response.  I have looked at the
> Cocoon log and the Tomcat log but even the URLs do
> not show up in these.
>  
> Any ideas on where the bottleneck might be occurring
> and how to overcome it?
>  
> Any help is much appreciated!
>  
> Thanks
> Derek
>  
> 
> -- 
> This message is subject to the CSIR's copyright terms and conditions, 
> e-mail legal notice, and implemented Open Document Format (ODF) standard.
> The full disclaimer details can be found at 
> http://www.csir.co.za/disclaimer.html.
> 
> 
> This message has been scanned for viruses and dangerous content by 
> *MailScanner* <http://www.mailscanner.info/>,
> and is believed to be clean. MailScanner thanks Transtec Computers 
> <http://www.transtec.co.uk/> for their support.
> 

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


-- 
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.



-- 
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.


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


Re: Database connection problems

Posted by Jeroen Reijn <j....@onehippo.com>.
Hi Derek,

a few things come to mind:

- Might there be a firewall in between of which the settings changed?
- You JDBC connection pool is full?
- Did you try to put the log level a bit higher to see what the database 
connection is doing?
- What cocoon component are you using to connect to the database?
- Are you able to restart the application, to do some testing?

Regards,

Jeroen Reijn

Derek Hohls wrote:
> Using Cocoon 2.1.8
>  
> I have an app which has been working fine... up to now.
> I am now in a situation where:
> * the "plain" pages on the website (ie. not accessing the
> database) display just fine
> * I can access the database from a 3rd party tool (the
> MySQL Query Browser) without any problems
>  
> BUT I am unable to retrieve any database data via the
> interface... the browser simply shows me its hourglass
> and there is no further response.  I have looked at the
> Cocoon log and the Tomcat log but even the URLs do
> not show up in these.
>  
> Any ideas on where the bottleneck might be occurring
> and how to overcome it?
>  
> Any help is much appreciated!
>  
> Thanks
> Derek
>  
> 
> -- 
> This message is subject to the CSIR's copyright terms and conditions, 
> e-mail legal notice, and implemented Open Document Format (ODF) standard.
> The full disclaimer details can be found at 
> http://www.csir.co.za/disclaimer.html.
> 
> 
> This message has been scanned for viruses and dangerous content by 
> *MailScanner* <http://www.mailscanner.info/>,
> and is believed to be clean. MailScanner thanks Transtec Computers 
> <http://www.transtec.co.uk/> for their support.
> 

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


Re: Database connection problems

Posted by Andy Stevens <in...@googlemail.com>.
2008/5/8 Derek Hohls <DH...@csir.co.za>:
> Andy
>
> Also, there does
> not appear to be ant errors.log or handled-errors.log files
> in the "cocoon/WEB-INF/logs" directory ... should there be?

Maybe the default configuration (in logkit.xconf) is different in
2.1.8, but that's where it created them for me until I changed the
file to put them elsewhere.  Check the <cocoon> targets to make sure
it has some defined for those files, and the categories to make sure
there are <log-target> references for those target IDs.

> The app and DB are running on the same machine (though
> in future they may be on different machines).

Is the application connecting using "localhost" or your machine's
hostname?  Which does the MySQL Query Browser use?  Is the database
listening on the network or loopback interfaces (or both), and are
both your app and the MySQL tool connecting on the same name/IP
address or might they be trying to connect on different interfaces?
For that matter, does the MySQL Query Browser connect via JDBC or some
other native driver library that defines connection settings
differently? (I've not used it myself)


Andy
-- 
http://pseudoq.sourceforge.net/  Open source java Sudoku solver

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


Re: Database connection problems

Posted by Derek Hohls <DH...@csir.co.za>.
Andy

I am assuming that Cocoon cannot connect to the DB;
the issue is why.  The browser hangs indefinitely, and
there is no message in the cocoon.log.  Also, there does
not appear to be ant errors.log or handled-errors.log files
in the "cocoon/WEB-INF/logs" directory ... should there be?
The app and DB are running on the same machine (though
in future they may be on different machines).

PS See also my reply to Jeroen.

>>> On 2008/05/07 at 06:05, in message <ef...@mail.gmail.com>, "Andy Stevens" <in...@googlemail.com> wrote:
2008/5/7 Derek Hohls <DH...@csir.co.za>:
> Using Cocoon 2.1.8
>
> I have an app which has been working fine... up to now.
> I am now in a situation where:
> * the "plain" pages on the website (ie. not accessing the
> database) display just fine
> * I can access the database from a 3rd party tool (the
> MySQL Query Browser) without any problems
>
> BUT I am unable to retrieve any database data via the
> interface... the browser simply shows me its hourglass
> and there is no further response.  I have looked at the
> Cocoon log and the Tomcat log but even the URLs do
> not show up in these.

Are you sure Cocoon is actually managing to connect to the database?
You say "there is no further response" - how long are you waiting?
I'm not sure about the other database components, but certainly in the
case of the SQLTransformer if it can't get a connection it will (by
default) retry 5 times at 5 second intervals, so it could be 30
seconds before you actually get an error message returned.  And if
it's waiting on a TCP-level timout ConnectException (e.g. because the
port is blocked by a firewall and the packets are being dropped rather
than actually rejecting the connection) that could involve a 20 second
timeout in itself...
I'd have thought you'd still see something in Cocoon's errors.log or
handled-errors.log, though.
You say you can access the database okay yourself; is the application
running locally on the same machine, or is it deployed on some other
server?


Andy
-- 
http://pseudoq.sourceforge.net/  Open source java Sudoku solver

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


-- 
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.



-- 
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.


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


Re: Database connection problems

Posted by Andy Stevens <in...@googlemail.com>.
2008/5/7 Derek Hohls <DH...@csir.co.za>:
> Using Cocoon 2.1.8
>
> I have an app which has been working fine... up to now.
> I am now in a situation where:
> * the "plain" pages on the website (ie. not accessing the
> database) display just fine
> * I can access the database from a 3rd party tool (the
> MySQL Query Browser) without any problems
>
> BUT I am unable to retrieve any database data via the
> interface... the browser simply shows me its hourglass
> and there is no further response.  I have looked at the
> Cocoon log and the Tomcat log but even the URLs do
> not show up in these.

Are you sure Cocoon is actually managing to connect to the database?
You say "there is no further response" - how long are you waiting?
I'm not sure about the other database components, but certainly in the
case of the SQLTransformer if it can't get a connection it will (by
default) retry 5 times at 5 second intervals, so it could be 30
seconds before you actually get an error message returned.  And if
it's waiting on a TCP-level timout ConnectException (e.g. because the
port is blocked by a firewall and the packets are being dropped rather
than actually rejecting the connection) that could involve a 20 second
timeout in itself...
I'd have thought you'd still see something in Cocoon's errors.log or
handled-errors.log, though.
You say you can access the database okay yourself; is the application
running locally on the same machine, or is it deployed on some other
server?


Andy
-- 
http://pseudoq.sourceforge.net/  Open source java Sudoku solver

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