Quantcast

MySQL and Grails: Broken pipe after 4 hours

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

MySQL and Grails: Broken pipe after 4 hours

Björn Wilmsmann-2
Hi everyone,

I've recently experienced an error on several occasions / apps I haven't come across since Grails 1.0.3:

After 4 hours of operation I get a 'broken pipe' exception telling me that the MySQL connection has failed. Setting autoReconnect to 'true' in the MySQL connection doesn't seem to resolve this.

So far, periodically restarting the Servlet container is the only (admittedly ugly) solution to this problem.

Is this a known issue? If so, are there any workarounds?

--
Viele Grüße / Best regards,
Björn Wilmsmann
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: MySQL and Grails: Broken pipe after 4 hours

Jens Gutzeit
It's mysqls wait_timeout thats killing your idle connections (defaults to 4 hours).

http://www.softwareinsane.com/2010/02/broken-pipe-grails-hibernate-spring.html

2010/10/25 Björn Wilmsmann <[hidden email]>
Hi everyone,

I've recently experienced an error on several occasions / apps I haven't come across since Grails 1.0.3:

After 4 hours of operation I get a 'broken pipe' exception telling me that the MySQL connection has failed. Setting autoReconnect to 'true' in the MySQL connection doesn't seem to resolve this.

So far, periodically restarting the Servlet container is the only (admittedly ugly) solution to this problem.

Is this a known issue? If so, are there any workarounds?

--
Viele Grüße / Best regards,
Björn Wilmsmann
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: MySQL and Grails: Broken pipe after 4 hours

bdrhoa
In reply to this post by Björn Wilmsmann-2
This worked for me: http://www.sylvioazevedo.com.br/?cat=11
---------------------------
www.maf.org/rhoads
www.ontherhoads.org


2010/10/25 Björn Wilmsmann <[hidden email]>
Hi everyone,

I've recently experienced an error on several occasions / apps I haven't come across since Grails 1.0.3:

After 4 hours of operation I get a 'broken pipe' exception telling me that the MySQL connection has failed. Setting autoReconnect to 'true' in the MySQL connection doesn't seem to resolve this.

So far, periodically restarting the Servlet container is the only (admittedly ugly) solution to this problem.

Is this a known issue? If so, are there any workarounds?

--
Viele Grüße / Best regards,
Björn Wilmsmann
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: MySQL and Grails: Broken pipe after 4 hours

Stefan Armbruster
I'm using for mysql without any hassle:

         dataSource {
                  dbCreate = "update"
                  url = "jdbc:mysql://127.0.0.1/obd"
                  driverClassName = "com.mysql.jdbc.Driver"
                  username = <user>
                  password = <pw>
                  dialect=org.hibernate.dialect.MySQLInnoDBDialect
                  properties {
                     validationQuery="select 1"
                     testWhileIdle=true
                     timeBetweenEvictionRunsMillis=60000
                  }
         }

That seems to be a little bit less invasive compared to Silvio's post.

Regards,
Stefan

Am Montag, den 25.10.2010, 13:57 -0600 schrieb Brad Rhoads:

> This worked for me: http://www.sylvioazevedo.com.br/?cat=11
> ---------------------------
> www.maf.org/rhoads
> www.ontherhoads.org
>
>
> 2010/10/25 Björn Wilmsmann <[hidden email]>
>         Hi everyone,
>        
>         I've recently experienced an error on several occasions / apps
>         I haven't come across since Grails 1.0.3:
>        
>         After 4 hours of operation I get a 'broken pipe' exception
>         telling me that the MySQL connection has failed. Setting
>         autoReconnect to 'true' in the MySQL connection doesn't seem
>         to resolve this.
>        
>         So far, periodically restarting the Servlet container is the
>         only (admittedly ugly) solution to this problem.
>        
>         Is this a known issue? If so, are there any workarounds?
>        
>         --
>         Viele Grüße / Best regards,
>         Björn Wilmsmann
>         ---------------------------------------------------------------------
>         To unsubscribe from this list, please visit:
>        
>            http://xircles.codehaus.org/manage_email
>        
>        
>
>



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: MySQL and Grails: Broken pipe after 4 hours

Björn Wilmsmann-2
Thanks a lot. That looks promising. I'll give it a try.

It's strange though that MySQL and Grails default configurations cause
such errors.

On 25 October 2010 22:48, Stefan Armbruster <[hidden email]> wrote:

> I'm using for mysql without any hassle:
>
>         dataSource {
>                  dbCreate = "update"
>                  url = "jdbc:mysql://127.0.0.1/obd"
>                  driverClassName = "com.mysql.jdbc.Driver"
>                  username = <user>
>                  password = <pw>
>                  dialect=org.hibernate.dialect.MySQLInnoDBDialect
>                  properties {
>                     validationQuery="select 1"
>                     testWhileIdle=true
>                     timeBetweenEvictionRunsMillis=60000
>                  }
>         }
>
> That seems to be a little bit less invasive compared to Silvio's post.
>
> Regards,
> Stefan
>
> Am Montag, den 25.10.2010, 13:57 -0600 schrieb Brad Rhoads:
>> This worked for me: http://www.sylvioazevedo.com.br/?cat=11
>> ---------------------------
>> www.maf.org/rhoads
>> www.ontherhoads.org
>>
>>
>> 2010/10/25 Björn Wilmsmann <[hidden email]>
>>         Hi everyone,
>>
>>         I've recently experienced an error on several occasions / apps
>>         I haven't come across since Grails 1.0.3:
>>
>>         After 4 hours of operation I get a 'broken pipe' exception
>>         telling me that the MySQL connection has failed. Setting
>>         autoReconnect to 'true' in the MySQL connection doesn't seem
>>         to resolve this.
>>
>>         So far, periodically restarting the Servlet container is the
>>         only (admittedly ugly) solution to this problem.
>>
>>         Is this a known issue? If so, are there any workarounds?
>>
>>         --
>>         Viele Grüße / Best regards,
>>         Björn Wilmsmann
>>         ---------------------------------------------------------------------
>>         To unsubscribe from this list, please visit:
>>
>>            http://xircles.codehaus.org/manage_email
>>
>>
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>



--
Viele Grüße / Best regards, Björn Wilmsmann
Geschäftsführer / CEO

----------------------
MetaSieve GmbH

Universitätsstr. 142
D-44799 Bochum
Germany

Phone: +49-(0)234-7089300
Mobile: +49-(0)151-25209060
Fax: +49-(0)30-46999-1267

E-mail: [hidden email]
http://www.metasieve.com/

Amtsgericht Bochum, HRB 12288
----------------------

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: MySQL and Grails: Broken pipe after 4 hours

Björn Wilmsmann-2
Stefan's solution works. Thanks again.

2010/10/25 Björn Wilmsmann <[hidden email]>:

> Thanks a lot. That looks promising. I'll give it a try.
>
> It's strange though that MySQL and Grails default configurations cause
> such errors.
>
> On 25 October 2010 22:48, Stefan Armbruster <[hidden email]> wrote:
>> I'm using for mysql without any hassle:
>>
>>         dataSource {
>>                  dbCreate = "update"
>>                  url = "jdbc:mysql://127.0.0.1/obd"
>>                  driverClassName = "com.mysql.jdbc.Driver"
>>                  username = <user>
>>                  password = <pw>
>>                  dialect=org.hibernate.dialect.MySQLInnoDBDialect
>>                  properties {
>>                     validationQuery="select 1"
>>                     testWhileIdle=true
>>                     timeBetweenEvictionRunsMillis=60000
>>                  }
>>         }
>>
>> That seems to be a little bit less invasive compared to Silvio's post.
>>
>> Regards,
>> Stefan
>>
>> Am Montag, den 25.10.2010, 13:57 -0600 schrieb Brad Rhoads:
>>> This worked for me: http://www.sylvioazevedo.com.br/?cat=11
>>> ---------------------------
>>> www.maf.org/rhoads
>>> www.ontherhoads.org
>>>
>>>
>>> 2010/10/25 Björn Wilmsmann <[hidden email]>
>>>         Hi everyone,
>>>
>>>         I've recently experienced an error on several occasions / apps
>>>         I haven't come across since Grails 1.0.3:
>>>
>>>         After 4 hours of operation I get a 'broken pipe' exception
>>>         telling me that the MySQL connection has failed. Setting
>>>         autoReconnect to 'true' in the MySQL connection doesn't seem
>>>         to resolve this.
>>>
>>>         So far, periodically restarting the Servlet container is the
>>>         only (admittedly ugly) solution to this problem.
>>>
>>>         Is this a known issue? If so, are there any workarounds?
>>>
>>>         --
>>>         Viele Grüße / Best regards,
>>>         Björn Wilmsmann
>>>         ---------------------------------------------------------------------
>>>         To unsubscribe from this list, please visit:
>>>
>>>            http://xircles.codehaus.org/manage_email
>>>
>>>
>>>
>>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>>



--
Viele Grüße / Best regards,
Björn Wilmsmann

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Loading...