Put "?autoReconnect=true" in the url value.

That will fix it.

You might also want to look @ removeAbandoned, removeAbandonedTimeout
properties of the data source.

BTW: this is a mysql question and has nothting to do with Struts.


Mahesh


>>-----Original Message-----
>>From: Mohamed Abu Zur [mailto:[EMAIL PROTECTED]
>>Sent: Friday, November 21, 2003 5:17 PM
>>To: [EMAIL PROTECTED]
>>Subject: Mysql connection error in the morning 
>>
>>
>>Hi all:
>> 
>> 
>>I have this configuration in my struts-config for the pool:
>> 
>>  <data-sources>
>>    <data-source>
>>      <set-property property="autoCommit"
>>                       value="false"/>
>>      <set-property property="description"
>>                       value="Example Data Source Configuration"/>
>>      <set-property property="driverClass"
>>                       value="org.gjt.mm.mysql.Driver"/>
>>      <set-property property="maxCount"
>>                       value="4"/>
>>      <set-property property="minCount"
>>                       value="2"/>
>>      <set-property property="password"
>>                       value="***"/>
>>      <set-property property="url"
>>                       value="jdbc:mysql://localhost/database"/>
>>      <set-property property="user"
>>                       value="***"/>
>>    </data-source>
>>  </data-sources>
>> 
>>but every morning when I connect to the web page I have an 
>>error the first two times . when I refresh (F5) the page two 
>>or three times I get a connection and all gones fine 
>>accessing the database.
>> 
>>the error is:
>> 
>>java.sql.SQLException: Communication link failure: java.io.IOException
>>        at 
>>com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java(Compiled Code))
>>        at 
>>com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java(Compiled Code))
>>        at 
>>com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java(Compiled Code))
>>        at 
>>com.mysql.jdbc.MysqlIO.sqlQuery(MysqlIO.java(Compiled Code))
>> 
>>what is the reason for this error? any body hasthis error before?
>> 
>> 
>>thanks in advance 
>>
>>
>>---------------------------------
>>
>>    Antivirus * Filtros antispam * 6 MB gratis
>>    ¿Todavía no tienes un correo inteligente?
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to