Rt-setup-fulltext-index dropped DB connections with MySQL

I’m having trouble setting up the fulltext index on a Debian installation. Admittedly this is a Wheezy installation, not Jessie as we wanted to track a newer version of rt4, so some things may be broken. Hopefully the freeze comes soon though.

Package versions at the moment are MySQL 5.6.30, Perl 5.2.22, and request-tracker 4.2.13. There is a Perl 5.4 upgrade available, but that breaks my rt4 installation.

Anyway, here’s what I see:

root@mis-rt-lnx:/usr/sbin# ./rt-setup-fulltext-index --dba rtuser --dba-password secret

MySQL 5.6 and above support native full-text indexing; for compatibility

with earlier versions of RT, the external Sphinx indexer is still

supported.

Which indexing solution would you prefer?

Enter the name of a new MySQL table that will be used to store the

full-text content and indexes:

Going to run the following in the DB:

 CREATE TABLE AttachmentsIndex ( id INT UNSIGNED AUTO_INCREMENT NOT

NULL PRIMARY KEY,Content LONGTEXT ) ENGINE=InnoDB CHARACTER SET utf8

Indexing existing data…

Going to run the following in the DB:

 CREATE FULLTEXT INDEX AttachmentsIndex ON AttachmentsIndex(Content)

[58876] [Thu Oct 13 02:23:42 2016] [warning]: DBD::mysql::db do failed:

Lost connection to MySQL server during query at

./rt-setup-fulltext-index line 736, line 2.

(./rt-setup-fulltext-index:736)

[58876] [Thu Oct 13 02:23:42 2016] [critical]: DBD::mysql::db do failed:

Lost connection to MySQL server during query at

./rt-setup-fulltext-index line 736, line 2.

(/usr/share/request-tracker4/lib/RT.pm:389)

DBD::mysql::db do failed: Lost connection to MySQL server during query

at ./rt-setup-fulltext-index line 736, line 2.

The “Lost connection to MySQL” error often occurs when a child kills the database connection for the parent, so I’ve tried different permutations of InactiveDestroy in the script itself, for example adding the third line below:

my $dbh = $RT::Handle->dbh;

$dbh->{‘RaiseError’} = 1;

$dbh->{‘PrintError’} = 1;

$dbh->{‘InactiveDestroy’} = 1; ##THIS LINE ADDED TO SCRIPT##

But I’m unable to find a magic fix this way. I’ve also tried running the script as the MySQL root user without success.

This appears to be a slightly different issue than what I see in the archives.

Has anyone else seen this or can point me in the right direction to chase down the lost connections?

Thanks!

James

Package versions at the moment are MySQL 5.6.30, Perl 5.2.22, and
request-tracker 4.2.13. There is a Perl 5.4 upgrade available, but
that breaks my rt4 installation.

For reference, your perl versions are not comprehensible. Wheezy ships
perl 5.14.2, per https://packages.debian.org/wheezy/perl, and there has
never been a perl version 5.2 or 5.4 – 5.002 was released in 1996,
5.004 in 1997, and 5.6 in 2000.

Indexing existing data…
Going to run the following in the DB:
CREATE FULLTEXT INDEX AttachmentsIndex ON AttachmentsIndex(Content)

[58876] [Thu Oct 13 02:23:42 2016] [warning]: DBD::mysql::db do failed:
Lost connection to MySQL server during query at
./rt-setup-fulltext-index line 736, line 2.

Check your “max_allowed_packet” setting in mysqld. The most common
cause is the MySQL client (here, rt-fulltext-indexer) sending something
in the MySQL wire protocol which is larger than that limit, which
causes the server to unceremoniously drop the connection.

Raise that limit and restart mysql, and it should resolve the issue.

  • Alex

We have also run into a possible mysql bug related to indexing starting
in version 5.6.29. The symptom is similar to your report and we saw this
sort of error in the mysql log:

InnoDB: Assertion failure in thread 140011690678016 in file row0merge.cc
line 794

At the time our solution was to revert back to mysql 5.6.28 which didn’t
have the issue. We don’t know yet if this is fixed in a newer release.On 10/14/16 1:29 AM, Alex Vandiver wrote:

On Thu, 13 Oct 2016 20:32:36 +0000 James Zuelow James.Zuelow@juneau.org wrote:

Package versions at the moment are MySQL 5.6.30, Perl 5.2.22, and
request-tracker 4.2.13. There is a Perl 5.4 upgrade available, but
that breaks my rt4 installation.

For reference, your perl versions are not comprehensible. Wheezy ships
perl 5.14.2, per https://packages.debian.org/wheezy/perl, and there has
never been a perl version 5.2 or 5.4 – 5.002 was released in 1996,
5.004 in 1997, and 5.6 in 2000.

Indexing existing data…
Going to run the following in the DB:
CREATE FULLTEXT INDEX AttachmentsIndex ON AttachmentsIndex(Content)

[58876] [Thu Oct 13 02:23:42 2016] [warning]: DBD::mysql::db do failed:
Lost connection to MySQL server during query at
./rt-setup-fulltext-index line 736, line 2.

Check your “max_allowed_packet” setting in mysqld. The most common
cause is the MySQL client (here, rt-fulltext-indexer) sending something
in the MySQL wire protocol which is larger than that limit, which
causes the server to unceremoniously drop the connection.

Raise that limit and restart mysql, and it should resolve the issue.

  • Alex

RT 4.4 and RTIR training sessions, and a new workshop day! https://bestpractical.com/training

  • Boston - October 24-26
  • Los Angeles - Q1 2017

-----Original Message-----
From: rt-users [mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of
Jim Brandt
Sent: Friday, October 14, 2016 4:37 AM
To: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] rt-setup-fulltext-index dropped DB connections with
MySQL

We have also run into a possible mysql bug related to indexing starting in
version 5.6.29. The symptom is similar to your report and we saw this sort of
error in the mysql log:

InnoDB: Assertion failure in thread 140011690678016 in file row0merge.cc line
794

At the time our solution was to revert back to mysql 5.6.28 which didn’t have
the issue. We don’t know yet if this is fixed in a newer release.

OK. I don’t have this exact error, but I do see that MySQL 5.6.31 is supposed to resolve an issue with InnoDB fulltext indices crashing the server.

So I think I’m waiting for 5.6.31 to enter Debian - hopefully before Wheezy freezes or it will be messy.

For reference, your perl versions are not comprehensible. Wheezy
ships perl 5.14.2, per https://packages.debian.org/wheezy/perl, and
there has never been a perl version 5.2 or 5.4 – 5.002 was released
in 1996,
5.004 in 1997, and 5.6 in 2000.

Sorry, a typo on my part. I have Perl 5.22.2 installed, not 5.2.22.

Check your “max_allowed_packet” setting in mysqld. The most common
cause is the MySQL client (here, rt-fulltext-indexer) sending
something in the MySQL wire protocol which is larger than that limit,
which causes the server to unceremoniously drop the connection.

Raise that limit and restart mysql, and it should resolve the issue.

I started at 256M, and slowly raised it to 4096M without success.

I will experiment with Debian Snapshots and see if I can roll back MySQL to 5.6.28, and report what happens.

James

I will experiment with Debian Snapshots and see if I can roll back MySQL to
5.6.28, and report what happens.

My Debian Snapshots foo is a little weak, so I ended up with MySQL 5.6.27-2 instead of 5.6.28.

However, the rt-setup-fulltext-index script ran perfectly at that point. I will pin MySQL at that version until 5.6.31 shows up in the archives.

Thank you for your help!

James