[rt-users] Getting all transactions using RT REST API?

2016-10-14 Thread Anthony Nguyen-Duong
Hi rt-users,


I'm currently working on a web app to pull statistics from RT. One of the stats 
I'd like to show for each ticket is the number of emails received.

The way that I've implemented it now is essentially go to 
/REST/1.0/ticket/nn/history/ and then count up the number of emails. But I call 
this for every single ticket. So it's horribly inefficient for larger number of 
tickets.

I was wondering if there was a way of getting all the transactions in one API 
call instead of one for every ticket I iterate through.


Thanks,

Anthony
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017

Re: [rt-users] rt-setup-fulltext-index dropped DB connections with MySQL

2016-10-14 Thread James Zuelow
> 
> 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
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017


Re: [rt-users] rt-setup-fulltext-index dropped DB connections with MySQL

2016-10-14 Thread James Zuelow


> -Original Message-
> From: rt-users [mailto:rt-users-boun...@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.

> On 10/14/16 1:29 AM, Alex Vandiver wrote:

> > 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 

-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017


Re: [rt-users] rt-setup-fulltext-index dropped DB connections with MySQL

2016-10-14 Thread Jim Brandt
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 +
James Zuelow  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


-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017