#404 ✓resolved
Dan Sully

Database Reconnects Needed!

Reported by Dan Sully | June 20th, 2008 @ 02:08 PM

Not having automatic reconnects makes LOLcats sad.

~ MySQL server has gone away - (MysqlError)

/p/lib/gems/dm-core-0.9.1/lib/data_mapper/adapters/data_objects_adapter.rb:367:in `execute_reader'

/p/lib/gems/dm-core-0.9.1/lib/data_mapper/adapters/data_objects_adapter.rb:367:in `read_set_with_sql'

/p/lib/gems/dm-core-0.9.1/lib/data_mapper/adapters/data_objects_adapter.rb:325:in `with_connection'

/p/lib/gems/dm-core-0.9.1/lib/data_mapper/adapters/data_objects_adapter.rb:362:in `read_set_with_sql'

/p/lib/gems/dm-core-0.9.1/lib/data_mapper/support/lazy_array.rb:86:in `[]'

/p/lib/gems/dm-core-0.9.1/lib/data_mapper/support/lazy_array.rb:86:in `lazy_load!'

/p/lib/gems/dm-core-0.9.1/lib/data_mapper/support/lazy_array.rb:22:in `each'

...

Comments and changes to this ticket

  • Dan Sully

    Dan Sully June 23rd, 2008 @ 12:34 PM

    Any progress or thoughts here?

    DM + Merb is completely unusable because of this.

  • Dan Sully

    Dan Sully June 23rd, 2008 @ 05:47 PM

    Potential hack fix for do_mysql.c

    @@ -429,6 +433,11 @@ static VALUE cConnection_initialize(VALUE self, VALUE uri) {

    // mysql_ssl_set(db, key, cert, ca, capath, cipher)

    // }

    • if (1) {
    • my_bool reconnect = 1;
    • mysql_options(db, MYSQL_OPT_RECONNECT, &reconnect);
    • }

    +

    result = (MYSQL *)mysql_real_connect(

    db,

    host,

    Not sure if this should be a user configurable option or not. Hard to see why anyone wouldn't want it turned on.

  • Dan Sully

    Dan Sully July 14th, 2008 @ 04:19 PM

    • Assigned user changed from “Sam Smoot” to “Bernerd Schaefer”
    • Tag set to bug, dataobjects, do_mysql, mysql, priority

    Ping?

  • Dan Sully

    Dan Sully September 8th, 2008 @ 04:06 PM

    Ping? I've noticed some changes to do_mysql, but not this simple patch!

  • Dirkjan Bussink
  • Adam French

    Adam French September 9th, 2008 @ 09:29 PM

    • State changed from “new” to “resolved”

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket

Pages