If helps, the connection state is "connection reset"
CutKiller wrote: > > > No errors... :( > > For example when i sign in on the App, appears one error on tomcat log... > A 403 something... > > > > > David Smith-2 wrote: >> >> Any indication in the logs of what's happening around the time you get a >> bad connection? Seems weird to me that the validation query isn't >> working. >> >> --David >> >> CutKiller wrote: >>> Tnks David. >>> >>> >>> But the validationQuery was set at the Resources Tags. >>> >>> <Context path="/testAdmin" docBase="testAdmin" >>> debug="0" reloadable="true" crossContext="true"> >>> <Resource name="jdbc/sp360_main_v2" auth="Container" >>> type="javax.sql.DataSource" maxActive="100" maxIdle="30" >>> maxWait="10000" removeAbandoned="true" >>> removeAbandonedTimeout="1800" >>> logAbandoned="true" username="mqa" password="1nspector" >>> driverClassName="oracle.jdbc.OracleDriver" >>> url="jdbc:oracle:thin:xxx/xxxxx@//00.00.00.00:1521/orcl" >>> validationQuery="select 1 from dual" >>> testWhileIdle="true" >>> timeBetweenEvictionRunsMillis="60000"/> >>> </Context> >>> >>> >>> >>> >>> >>> David Smith-2 wrote: >>> >>>> CutKiller wrote: >>>> >>>>> If I raise the timeout value in the firewall parameters the connection >>>>> problem was solved.... but i don't have permissions to do that in real >>>>> environment. >>>>> >>>>> The connections are dead, but this connections stays in tomcat pool >>>>> with >>>>> no >>>>> problems. Tomcat, in a perfect scenario, should recognize the loss of >>>>> connection, and create a new one. >>>>> >>>>> I need this connections anytime. >>>>> >>>>> >>>>> >>>>> >>>> Right and it would recognize dead connections if validationQuery is >>>> provided on the connection pool. The pool will execute the validation >>>> query before handing your webapp the connection, dropping and creating >>>> a >>>> new connection as necessary. Your problem smells like you are getting >>>> a connection from the pool and keeping around a long time without >>>> returning it to the pool. Doing that effectively circumvents the >>>> pool's >>>> ability to validate connections. >>>> >>>> Posting details of your setup would be helpful including the <Resource >>>> ... /> tag that configures your pool and relevant code where things are >>>> breaking. >>>> >>>> --David >>>> >>>> >>>>> David Smith-2 wrote: >>>>> >>>>> >>>>>> CutKiller wrote: >>>>>> >>>>>> >>>>>>> Hi all I have this scenario: >>>>>>> >>>>>>> |Tomcat| -> |Firewall| -> |Database| >>>>>>> >>>>>>> Sometimes the connection to the database is lost. The cause of this >>>>>>> fact >>>>>>> maybe lives in the Firewall. But, the major problem, resides in >>>>>>> Tomcat. >>>>>>> He >>>>>>> doesn't recognize the connection break. What can i do, for Tomcat >>>>>>> knows >>>>>>> when >>>>>>> the connections break? >>>>>>> >>>>>>> Best Regards, >>>>>>> Rodrigo >>>>>>> >>>>>>> >>>>>>> >>>>>> Can you provide a bit more context for when/how you use connections >>>>>> and >>>>>> how you expect tomcat to recognize when connections break? In >>>>>> general >>>>>> webapp code retrieves a connection, does it's business and then >>>>>> closes >>>>>> the connection to return it to the pool in the smallest reasonable >>>>>> space >>>>>> .. the whole cycle done and over with by the time your webapp is >>>>>> finished with the current request if not sooner. >>>>>> >>>>>> --David >>>>>> >>>>>> >>>>>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> >> > > -- View this message in context: http://www.nabble.com/Tomcat-and-Database-Problem-tp22658620p22663799.html Sent from the Tomcat - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org