Re: [rt-users] Slow Ticket History 3.8.8

2010-09-09 Thread Justin Hayes
We've tried all of those. We've also tried the RT inbuilt webserver and results 
were the same in all cases.

-
Justin Hayes
OpenBet Support Manager
justin.ha...@openbet.com

On 7 Sep 2010, at 11:36, Torsten Brumm wrote:

 Are you running mod_perl2, FastCGI or FCGID?
 
 2010/9/7 Justin Hayes justin.ha...@openbet.com
 Thanks Torsten. Will have a look at some of those suggestions. We'd ruled the 
 DB out as we couldn't find an slow ones in the logs, and also because we 
 tried a totally fresh DB with only 1 ticket in it, and it was still slow. But 
 it might just be lots of tiny queries so we'll have another look at that.
 
 We've also tried running the web services on a separate server to the DB. 
 This also made no difference.
 
 Cheers,
 
 Justin
 
 -
 Justin Hayes
 OpenBet Support Manager
 justin.ha...@openbet.com
 
 On 7 Sep 2010, at 11:13, Torsten Brumm wrote:
 
 Hi Justin,
 just found this threat, sounds interessting.
 
 What i read so far: You have 1 quad core system with 8GB RAM, running both 
 WEB and DB, correct?
 
 Think you should follow Raed's hints first to log the queries generated with 
 RT
 
 In terms of debug; if you have not done this yet enable DBIx-SearchBuilder 
 StatementLog
 Set($StatementLog,’debug’);  in your etc/RT_SiteConfig.
 I'm sure you will find some funny queries. Normally the Query Log of default 
 MySQL can only log queries taking longer than a second, but in your case i 
 think, you will have several much faster queries but in summary they take 
 longer - but you can't find in mysql-slow log.
 
 Some more question regarding your hardware and setup.
 
 1. One Server / quad core (hyper threating) - how many threats for 
 Mysql/Postgresql? / 8 GB Ram 
 2. Hard Disk Setup? (logfiles and db storred on different HDD's? Any I/O 
 Problems?)
 3. RT Rights Setup, does the user performance is faster or slower than the 
 performance with root user?
 
 Some more information?
 
 We're running also a larger RT Instance with dedicated hardware for DB and 
 Webservers with no huge perferomance bottlenacks.
 
 Tob
 
 2010/9/7 Justin Hayes justin.ha...@openbet.com
 I *think* we're just CPU bound. Roy's webservers are 3.6ghz so quite a bit 
 faster than ours. We're going to try it on a faster server and that should 
 drop our times. Guess we just wanted to explore all avenues before throwing 
 hardware at the problem.
 
 Justin
 
 -
 Justin Hayes
 OpenBet Support Manager
 justin.ha...@openbet.com
 
 On 7 Sep 2010, at 10:30, Justin Hayes wrote:
 
 Tried Centos last night, and no difference at all.
 
 -
 Justin Hayes
 OpenBet Support Manager
 justin.ha...@openbet.com
 
 On 6 Sep 2010, at 20:49, Justin Hayes wrote:
 
 Hi Ruslan,
 
 Sorry looks like I shrunk the image too much. The thing I find odd is that 
 there are others with similar hardware who don't get the problem. It'll be 
 great if 3.10 fixes it for me, but I'd love to get to the bottom of it 
 first. I'm pretty much positive it's not a DB issue, as I've tried 
 different sizes of DB, tried postgres AND mysql etc. I don't think it's 
 apache as I've tried the built in webserver with RT and no change there 
 either.
 
 Currently trying to install RT on Centos given that Roy (who has kindly 
 been helping me with details of his own setup) appears to have none of the 
 same problems on that OS. Perhaps perl is just slow on the 64bit ubuntu 
 we've currently got live.
 
 No idea if it's going to have any effect though :(
 
 Justin
 
 -
 Justin Hayes
 OpenBet Support Manager
 justin.ha...@openbet.com
 
 On 6 Sep 2010, at 18:37, Ruslan Zakirov wrote:
 
 Justin.
 
 First of all, I can not read from the chart, but anyway history rendering 
 has been worked on in a new code branch. Probably this code will be part 
 of RT 3.10. Code at the moment is unstable, but eventually it wil be 
 faster then the current version. 
 
 On Mon, Sep 6, 2010 at 8:56 PM, Justin Hayes justin.ha...@openbet.com 
 wrote:
 So far we've tried installing RT on different hardware, both 32 and 64bit 
 versions of linux. RT is still very slow for long tickets. All the time 
 is taken up by the perl/apache process maxing out a core of CPU.
 
 We've even gone as far as trying to profile the code. We came up with 
 this graph of where the time was going:
 
 TIMING.png
 We then tried to go further into those functions but can't find a single 
 smoking gun call that is taking all the time.
 
 For example in a ticket that takes 22s to render approx 5 secs goes on 
 these 2 lines:
 
 File: Ticket/Elements/ShowHistory line: 100-103 version 3.8.8
 
   my @trans_attachments = grep { $_-TransactionId == $Transaction-Id } 
 @attachments;
 
   grep { ($_-TransactionId == $Transaction-Id )  
 ($trans_content-{$_-Id} = $_)  } @attachment_content;
 
 

Re: [rt-users] Slow Ticket History 3.8.8

2010-09-09 Thread Justin Hayes
Thanks Torsten. We'll have a look at those settings as well.

Appreciate the help!

Justin

-
Justin Hayes
OpenBet Support Manager
justin.ha...@openbet.com

On 7 Sep 2010, at 12:45, Torsten Brumm wrote:

 Hi Justin,
 just created inside a RT Test VM (slow one with 500mb ram) a single ticket 
 with around 60 replies and some comments. Tested the speed with different 
 users
 
 1. root user to open this ticket: around 26 sec - 870 single sql queries in 
 around 4 sec! (Queries: http://pastebin.com/7Yekfx2Y)
 2. user with full access (take, own, modify etc): around same time and 
 queries like root (Queries: http://pastebin.com/U0HnPcJL)
 3. user with less rights (no take, no own, only showticket, seequeue): time 
 around 15 sec and 600 sql queries in around 2 sec! (Queries: 
 http://pastebin.com/fXDHu6im)
 
 After this the apache starts to render the page from the results and push 
 them to the browser. The page is for my few comments/replies already 206KB 
 without any apache optimizations
 
 After adding: 
 
 SetOutputFilter DEFLATE
 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$  no-gzip dont-vary
 SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary
 ExpiresActive On
 ExpiresByType text/css A604800
 
 ExpiresByType image/x-icon A31536000
 ExpiresByType image/gif A604800
 ExpiresByType image/jpg A604800
 ExpiresByType image/jpeg A604800
 
 ExpiresByType image/png A604800
 ExpiresByType application/x-javascript A3600
 Header set Cache-Control must-revalidate
 to the rt vhost, the page load time goes down from 26 sec to 8 sec and from 
 206 kb to 10kb
 
 you should try.
 
 Torsten
 
 2010/9/7 Justin Hayes justin.ha...@openbet.com
 Well we've captured the time for all the queries run for our long ticket 
 (which takes ~20secs to generate).
 
 Total query time is 0.871493s
 
 So it's not the DB.
 
 Justin
 
 -
 Justin Hayes
 OpenBet Support Manager
 justin.ha...@openbet.com
 
 On 7 Sep 2010, at 11:13, Torsten Brumm wrote:
 
 Hi Justin,
 just found this threat, sounds interessting.
 
 What i read so far: You have 1 quad core system with 8GB RAM, running both 
 WEB and DB, correct?
 
 Think you should follow Raed's hints first to log the queries generated with 
 RT
 
 In terms of debug; if you have not done this yet enable DBIx-SearchBuilder 
 StatementLog
 Set($StatementLog,’debug’);  in your etc/RT_SiteConfig.
 I'm sure you will find some funny queries. Normally the Query Log of default 
 MySQL can only log queries taking longer than a second, but in your case i 
 think, you will have several much faster queries but in summary they take 
 longer - but you can't find in mysql-slow log.
 
 Some more question regarding your hardware and setup.
 
 1. One Server / quad core (hyper threating) - how many threats for 
 Mysql/Postgresql? / 8 GB Ram 
 2. Hard Disk Setup? (logfiles and db storred on different HDD's? Any I/O 
 Problems?)
 3. RT Rights Setup, does the user performance is faster or slower than the 
 performance with root user?
 
 Some more information?
 
 We're running also a larger RT Instance with dedicated hardware for DB and 
 Webservers with no huge perferomance bottlenacks.
 
 Tob
 
 2010/9/7 Justin Hayes justin.ha...@openbet.com
 I *think* we're just CPU bound. Roy's webservers are 3.6ghz so quite a bit 
 faster than ours. We're going to try it on a faster server and that should 
 drop our times. Guess we just wanted to explore all avenues before throwing 
 hardware at the problem.
 
 Justin
 
 -
 Justin Hayes
 OpenBet Support Manager
 justin.ha...@openbet.com
 
 On 7 Sep 2010, at 10:30, Justin Hayes wrote:
 
 Tried Centos last night, and no difference at all.
 
 -
 Justin Hayes
 OpenBet Support Manager
 justin.ha...@openbet.com
 
 On 6 Sep 2010, at 20:49, Justin Hayes wrote:
 
 Hi Ruslan,
 
 Sorry looks like I shrunk the image too much. The thing I find odd is that 
 there are others with similar hardware who don't get the problem. It'll be 
 great if 3.10 fixes it for me, but I'd love to get to the bottom of it 
 first. I'm pretty much positive it's not a DB issue, as I've tried 
 different sizes of DB, tried postgres AND mysql etc. I don't think it's 
 apache as I've tried the built in webserver with RT and no change there 
 either.
 
 Currently trying to install RT on Centos given that Roy (who has kindly 
 been helping me with details of his own setup) appears to have none of the 
 same problems on that OS. Perhaps perl is just slow on the 64bit ubuntu 
 we've currently got live.
 
 No idea if it's going to have any effect though :(
 
 Justin
 
 -
 Justin Hayes
 OpenBet Support Manager
 justin.ha...@openbet.com
 
 On 6 Sep 2010, at 18:37, Ruslan Zakirov wrote:
 
 

Re: [rt-users] Slow Ticket History 3.8.8

2010-09-09 Thread Justin Hayes
Aren't those options just compressing the page to send out to the browser and 
caching the output?

We're on an internal gigabit network so seems unlikely that would help. All our 
time goes on the server actually building the page to send out I think.

Can try it though :)

Justin

-
Justin Hayes
OpenBet Support Manager
justin.ha...@openbet.com

On 7 Sep 2010, at 12:45, Torsten Brumm wrote:

 Hi Justin,
 just created inside a RT Test VM (slow one with 500mb ram) a single ticket 
 with around 60 replies and some comments. Tested the speed with different 
 users
 
 1. root user to open this ticket: around 26 sec - 870 single sql queries in 
 around 4 sec! (Queries: http://pastebin.com/7Yekfx2Y)
 2. user with full access (take, own, modify etc): around same time and 
 queries like root (Queries: http://pastebin.com/U0HnPcJL)
 3. user with less rights (no take, no own, only showticket, seequeue): time 
 around 15 sec and 600 sql queries in around 2 sec! (Queries: 
 http://pastebin.com/fXDHu6im)
 
 After this the apache starts to render the page from the results and push 
 them to the browser. The page is for my few comments/replies already 206KB 
 without any apache optimizations
 
 After adding: 
 
 SetOutputFilter DEFLATE
 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$  no-gzip dont-vary
 SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary
 ExpiresActive On
 ExpiresByType text/css A604800
 
 ExpiresByType image/x-icon A31536000
 ExpiresByType image/gif A604800
 ExpiresByType image/jpg A604800
 ExpiresByType image/jpeg A604800
 
 ExpiresByType image/png A604800
 ExpiresByType application/x-javascript A3600
 Header set Cache-Control must-revalidate
 to the rt vhost, the page load time goes down from 26 sec to 8 sec and from 
 206 kb to 10kb
 
 you should try.
 
 Torsten
 
 2010/9/7 Justin Hayes justin.ha...@openbet.com
 Well we've captured the time for all the queries run for our long ticket 
 (which takes ~20secs to generate).
 
 Total query time is 0.871493s
 
 So it's not the DB.
 
 Justin
 
 -
 Justin Hayes
 OpenBet Support Manager
 justin.ha...@openbet.com
 
 On 7 Sep 2010, at 11:13, Torsten Brumm wrote:
 
 Hi Justin,
 just found this threat, sounds interessting.
 
 What i read so far: You have 1 quad core system with 8GB RAM, running both 
 WEB and DB, correct?
 
 Think you should follow Raed's hints first to log the queries generated with 
 RT
 
 In terms of debug; if you have not done this yet enable DBIx-SearchBuilder 
 StatementLog
 Set($StatementLog,’debug’);  in your etc/RT_SiteConfig.
 I'm sure you will find some funny queries. Normally the Query Log of default 
 MySQL can only log queries taking longer than a second, but in your case i 
 think, you will have several much faster queries but in summary they take 
 longer - but you can't find in mysql-slow log.
 
 Some more question regarding your hardware and setup.
 
 1. One Server / quad core (hyper threating) - how many threats for 
 Mysql/Postgresql? / 8 GB Ram 
 2. Hard Disk Setup? (logfiles and db storred on different HDD's? Any I/O 
 Problems?)
 3. RT Rights Setup, does the user performance is faster or slower than the 
 performance with root user?
 
 Some more information?
 
 We're running also a larger RT Instance with dedicated hardware for DB and 
 Webservers with no huge perferomance bottlenacks.
 
 Tob
 
 2010/9/7 Justin Hayes justin.ha...@openbet.com
 I *think* we're just CPU bound. Roy's webservers are 3.6ghz so quite a bit 
 faster than ours. We're going to try it on a faster server and that should 
 drop our times. Guess we just wanted to explore all avenues before throwing 
 hardware at the problem.
 
 Justin
 
 -
 Justin Hayes
 OpenBet Support Manager
 justin.ha...@openbet.com
 
 On 7 Sep 2010, at 10:30, Justin Hayes wrote:
 
 Tried Centos last night, and no difference at all.
 
 -
 Justin Hayes
 OpenBet Support Manager
 justin.ha...@openbet.com
 
 On 6 Sep 2010, at 20:49, Justin Hayes wrote:
 
 Hi Ruslan,
 
 Sorry looks like I shrunk the image too much. The thing I find odd is that 
 there are others with similar hardware who don't get the problem. It'll be 
 great if 3.10 fixes it for me, but I'd love to get to the bottom of it 
 first. I'm pretty much positive it's not a DB issue, as I've tried 
 different sizes of DB, tried postgres AND mysql etc. I don't think it's 
 apache as I've tried the built in webserver with RT and no change there 
 either.
 
 Currently trying to install RT on Centos given that Roy (who has kindly 
 been helping me with details of his own setup) appears to have none of the 
 same problems on that OS. Perhaps perl is just slow on the 64bit ubuntu 
 we've currently got live.
 
 No idea if it's going to have any effect 

Re: [rt-users] Slow Ticket History

2010-09-09 Thread Justin Hayes
We gave those patches a try. Shaved ~4s from our 20s, which isn't bad so we 
might look at rolling them into Live.

Obviously if you're getting 20min loads then something must be much more 
fundamentally wrong with your setup I'd say. We've never had anything even 
remotely that long.

Thanks for the patch!

Justin

-
Justin Hayes
OpenBet Support Manager
justin.ha...@openbet.com

On 7 Sep 2010, at 12:24, Tim Cutts wrote:

 
 On 6 Sep 2010, at 5:54 pm, rt-users-requ...@lists.bestpractical.com wrote:
 
 So far we've tried installing RT on different hardware, both 32 and 64bit 
 versions of linux. RT is still very slow for long tickets. All the time is 
 taken up by the perl/apache process maxing out a core of CPU.
 
 We've even gone as far as trying to profile the code. We came up with this 
 graph of where the time was going:
 
 TIMING.png
 We then tried to go further into those functions but can't find a single 
 smoking gun call that is taking all the time.
 
 For example in a ticket that takes 22s to render approx 5 secs goes on these 
 2 lines:
 
 File: Ticket/Elements/ShowHistory line: 100-103 version 3.8.8
 
  my @trans_attachments = grep { $_-TransactionId == $Transaction-Id } 
 @attachments;
 
  grep { ($_-TransactionId == $Transaction-Id )  
 ($trans_content-{$_-Id} = $_)  } @attachment_content;
 
 
 From what I can tell, the real problem here is repeated scanning of both the 
 @attachments and @attachment_content arrays, which makes the execution speed 
 of the ShowHistory element O(N^2) with respect to the number of transactions; 
 painful, to say the least.
 
 1)  The %$trans_content hash can be made up front in a single pass, for all 
 the attachments in the ticket, turning this into an O(N) operation, rather 
 than O(N^2)
 2) The $trans_content variable is only used in one place; it's passed to 
 ShowTransaction, where it is then passed on to ShowTransactionAttachments.
 3)  In there, there are some errors which cause some autovivification of hash 
 members which needn't happen.
 4)  You can do much the same up-front calculation with $trans_attachments as 
 well, so you don't have to keep grepping through it
 
 I've now made those changes, and on a reasonably large ticket (216 
 transactions) it reduced the ticket rendering time on my system from 2.5 
 minutes to 34 seconds, which is a pretty good improvement, I think.
 
 On a more extreme ticket, with 417 transactions, the 3.8.8 release code takes 
 over 20 minutes to render the ticket (I gave up waiting), so in fact it's 
 considerably worse order execution time than I thought.  My patched code 
 takes 2.2 minutes - still not brilliant but hey, this ticket is now 
 renderable, which it was not before.
 
 Just for some background, the hardware I'm running on:
 
 RT database:  2 CPU virtual machine, 8GB RAM, MySQL, running on vSphere 4.1 
 on a 2.0 GHz E5504 Nehalem system
 RT web server:  2 CPU virtual machine, 2GB RAM, on the same type of physical 
 hardware as the database server
 
 As far as I can tell, I have not semantically altered the code, but others 
 may want to test more thoroughly.  I have not yet put this on my production 
 web server - I cloned my web server VM and made my changes to the clone (God, 
 I love VMs for this sort of thing!)
 
 Regards,
 
 Tim
 
 Here are my patches to Ticket/Elements/ShowHistory:
 
 --- /opt/rt3/share/html/Ticket/Elements/ShowHistory   2010-05-14 
 13:58:15.0 +0100
 +++ /opt/rt3/local/html/Ticket/Elements/ShowHistory   2010-09-07 
 11:59:30.0 +0100
 @@ -84,6 +84,10 @@
 %perl
 my @attachments = @{$Attachments-ItemsArrayRef()};
 my @attachment_content = @{$AttachmentContent-ItemsArrayRef()};
 +my $trans_content = {};
 +map { $trans_content-{$_-TransactionId}-{$_-Id} = $_  } 
 @attachment_content;
 +my $trans_attachments = {};
 +map { push (@{$trans_attachments-{$_-TransactionId}}, $_) } @attachments;
 
 while ( my $Transaction = $Transactions-Next ) {
 my $skip = 0;
 @@ -97,12 +101,6 @@
 
 $i++;
 
 -my @trans_attachments = grep { $_-TransactionId == $Transaction-Id } 
 @attachments;
 -
 -my $trans_content = {};
 -grep { ($_-TransactionId == $Transaction-Id )  
 ($trans_content-{$_-Id} = $_)  } @attachment_content;
 -
 -   
 my $IsLastTransaction = 0;
 if ( $OldestFirst ) {
 $IsLastTransaction = $Transactions-IsLast;
 @@ -118,7 +116,7 @@
   Transaction  = $Transaction,
   ShowHeaders  = $ShowHeaders,
   RowNum   = $i,
 -  Attachments  = \...@trans_attachments,
 +  Attachments  = $trans_attachments-{$Transaction-id},
   AttachmentContent= $trans_content,
   LastTransaction  = $IsLastTransaction
  );
 
 and here's the patch to ShowTransactionAttachments (both files need to be 
 patched):
 
 --- /opt/rt3/share/html/Ticket/Elements/ShowTransactionAttachments
 

Re: [rt-users] Assign child ticket to a separate queue?

2010-09-09 Thread Andrea Perotti
Il 08/09/2010 14:55, Ciancetta, Barbara J. ha scritto:
 Seems a good approach to this would be team A (in their queue) creating
 a child ticket but assigning it to team B’s queue.
I've solved the same problem in a cleaner way: extension!

http://search.cpan.org/dist/RT-Extension-SpawnLinkedTicketInQueue/

this will add in the UI the possibility to choose the queue when
creating connected tickets.

hth

-- 
Andrea Perotti

RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!

Re: [rt-users] Slow Ticket History 3.8.8

2010-09-09 Thread Justin Hayes
We've just tried a brand new webserver.

Intel(R) Xeon(R) CPU   E5640  @ 2.67GHz Quad (with hyperthreading)
12GB RAM

Load time has dropped from 20-30s down to 11s. So throwing some newer hardware 
at it definitely improves things. Hopefully this will tide us over until RT3.10 
which has the history rewrite in it.

Going to try the patches from that other slow ticket history thread as well to 
see if that brings it down further.

Justin

-
Justin Hayes
OpenBet Support Manager
justin.ha...@openbet.com

On 9 Sep 2010, at 08:13, Justin Hayes wrote:

 Aren't those options just compressing the page to send out to the browser and 
 caching the output?
 
 We're on an internal gigabit network so seems unlikely that would help. All 
 our time goes on the server actually building the page to send out I think.
 
 Can try it though :)
 
 Justin
 
 -
 Justin Hayes
 OpenBet Support Manager
 justin.ha...@openbet.com
 
 On 7 Sep 2010, at 12:45, Torsten Brumm wrote:
 
 Hi Justin,
 just created inside a RT Test VM (slow one with 500mb ram) a single ticket 
 with around 60 replies and some comments. Tested the speed with different 
 users
 
 1. root user to open this ticket: around 26 sec - 870 single sql queries in 
 around 4 sec! (Queries: http://pastebin.com/7Yekfx2Y)
 2. user with full access (take, own, modify etc): around same time and 
 queries like root (Queries: http://pastebin.com/U0HnPcJL)
 3. user with less rights (no take, no own, only showticket, seequeue): time 
 around 15 sec and 600 sql queries in around 2 sec! (Queries: 
 http://pastebin.com/fXDHu6im)
 
 After this the apache starts to render the page from the results and push 
 them to the browser. The page is for my few comments/replies already 206KB 
 without any apache optimizations
 
 After adding: 
 
 SetOutputFilter DEFLATE
 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$  no-gzip dont-vary
 SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary
 ExpiresActive On
 ExpiresByType text/css A604800
 
 ExpiresByType image/x-icon A31536000
 ExpiresByType image/gif A604800
 ExpiresByType image/jpg A604800
 ExpiresByType image/jpeg A604800
 
 ExpiresByType image/png A604800
 ExpiresByType application/x-javascript A3600
 Header set Cache-Control must-revalidate
 to the rt vhost, the page load time goes down from 26 sec to 8 sec and from 
 206 kb to 10kb
 
 you should try.
 
 Torsten
 
 2010/9/7 Justin Hayes justin.ha...@openbet.com
 Well we've captured the time for all the queries run for our long ticket 
 (which takes ~20secs to generate).
 
 Total query time is 0.871493s
 
 So it's not the DB.
 
 Justin
 
 -
 Justin Hayes
 OpenBet Support Manager
 justin.ha...@openbet.com
 
 On 7 Sep 2010, at 11:13, Torsten Brumm wrote:
 
 Hi Justin,
 just found this threat, sounds interessting.
 
 What i read so far: You have 1 quad core system with 8GB RAM, running both 
 WEB and DB, correct?
 
 Think you should follow Raed's hints first to log the queries generated 
 with RT
 
 In terms of debug; if you have not done this yet enable DBIx-SearchBuilder 
 StatementLog
 Set($StatementLog,’debug’);  in your etc/RT_SiteConfig.
 I'm sure you will find some funny queries. Normally the Query Log of 
 default MySQL can only log queries taking longer than a second, but in your 
 case i think, you will have several much faster queries but in summary they 
 take longer - but you can't find in mysql-slow log.
 
 Some more question regarding your hardware and setup.
 
 1. One Server / quad core (hyper threating) - how many threats for 
 Mysql/Postgresql? / 8 GB Ram 
 2. Hard Disk Setup? (logfiles and db storred on different HDD's? Any I/O 
 Problems?)
 3. RT Rights Setup, does the user performance is faster or slower than the 
 performance with root user?
 
 Some more information?
 
 We're running also a larger RT Instance with dedicated hardware for DB and 
 Webservers with no huge perferomance bottlenacks.
 
 Tob
 
 2010/9/7 Justin Hayes justin.ha...@openbet.com
 I *think* we're just CPU bound. Roy's webservers are 3.6ghz so quite a bit 
 faster than ours. We're going to try it on a faster server and that should 
 drop our times. Guess we just wanted to explore all avenues before throwing 
 hardware at the problem.
 
 Justin
 
 -
 Justin Hayes
 OpenBet Support Manager
 justin.ha...@openbet.com
 
 On 7 Sep 2010, at 10:30, Justin Hayes wrote:
 
 Tried Centos last night, and no difference at all.
 
 -
 Justin Hayes
 OpenBet Support Manager
 justin.ha...@openbet.com
 
 On 6 Sep 2010, at 20:49, Justin Hayes wrote:
 
 Hi Ruslan,
 
 Sorry looks like I shrunk the image too much. The thing I find odd is 
 that there are others with similar hardware who 

Re: [rt-users] Set Owner by Requestor Organization?

2010-09-09 Thread Steven Platt
Yes, enabling file logging and some extra logger calls did help sort it
out. Thanks Jeff.

It turns out that I forgot the 'my' declaration on $newowner in the
cleanup code. Also, both... 

$self-TransactionObj-CreatorObj-__Value('Organization');
and
$self-TransactionObj-CreatorObj-Organization;

...return the same value. Useful.

Can anyone point me towards any documentation for scrips (other than the
[very useful] wiki)?

Thanks

Steve

-Original Message-
From: Jeff Blaine [mailto:jbla...@kickflop.net] 
Sent: 08 September 2010 16:12
To: Steven Platt
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Set Owner by Requestor Organization?



On 9/8/2010 9:24 AM, Steven Platt wrote:
 Hi,

 I'm trying to achieve this using a chopped version of
 http://wiki.bestpractical.com/view/SetOwnerAndQueueBySubject and some
 wisdom clipped from elsewhere in the wiki (some of the scrips pages, I
 forget exactly which), and here is what I have:

 Condition: On Create
 Action: User defined
 Template: Global template:blank
 Stage: TransactionCreate

 Custom prep code
 

 $t_org = $self-TransactionObj-CreatorObj-__Value('Organization');
##
 also tried $t_org = $self-TransactionObj-CreatorObj-Organization;
 if ( $t_org !~ /(VRD|GEZI)/i ) { return 0; }
 else { return 1; }


 Custom cleanup code
 ---

 $t_org = $self-TransactionObj-CreatorObj-__Value('Organization');
##
 also tried $t_org = $self-TransactionObj-CreatorObj-Organization;
 if ( $t_org =~ /VRD/i ) { $newowner = owner.a; }
 if ( $t_org =~ /GEZI/i ) { $newowner = owner.b; }
 my $T_Obj = $self-TicketObj;

 $RT::Logger-info(Auto assign ticket #. $T_Obj-id . to user #.
 $newowner );
 my ($status, $msg) = $self-TicketObj-SetOwner( $newowner );
 unless( $status ) {
  $RT::Logger-error( Impossible to assign the ticket to
$newowner:
 $msg );
  return undef;
 }
 return 1;


 ...but it appears to have no effect on the ticket whatsoever. Can
anyone
 point me in the right direction?

Are you seeing any logged messages from your cleanup code?

I'd just start by adding a lot more $RT::Logger calls for
debugging info.

Log what $t_org gets set to in the prep code, etc.
-
**
The information contained in the EMail and any attachments is
confidential and intended solely and for the attention and use of
the named addressee(s). It may not be disclosed to any other person
without the express authority of the HPA, or the intended
recipient, or both. If you are not the intended recipient, you must
not disclose, copy, distribute or retain this message or any part
of it. This footnote also confirms that this EMail has been swept
for computer viruses, but please re-sweep any attachments before
opening or saving. HTTP://www.HPA.org.uk
**

RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!


Re: [rt-users] Slow Ticket History 3.8.8

2010-09-09 Thread Kenneth Marshall
One big win with enabling compression was that pages loaded in bigger
pieces and you have less problems with users trying to type in an
page that is unfinished with unpredictable results. With the DEFLATE
on, the page all decompresses on the fast client instead of dribbling
out from the server.

Cheers,
Ken

On Thu, Sep 09, 2010 at 08:13:28AM +0100, Justin Hayes wrote:
 Aren't those options just compressing the page to send out to the browser and 
 caching the output?
 
 We're on an internal gigabit network so seems unlikely that would help. All 
 our time goes on the server actually building the page to send out I think.
 
 Can try it though :)
 
 Justin
 
 -
 Justin Hayes
 OpenBet Support Manager
 justin.ha...@openbet.com
 
 On 7 Sep 2010, at 12:45, Torsten Brumm wrote:
 
  Hi Justin,
  just created inside a RT Test VM (slow one with 500mb ram) a single ticket 
  with around 60 replies and some comments. Tested the speed with different 
  users
  
  1. root user to open this ticket: around 26 sec - 870 single sql queries 
  in around 4 sec! (Queries: http://pastebin.com/7Yekfx2Y)
  2. user with full access (take, own, modify etc): around same time and 
  queries like root (Queries: http://pastebin.com/U0HnPcJL)
  3. user with less rights (no take, no own, only showticket, seequeue): time 
  around 15 sec and 600 sql queries in around 2 sec! (Queries: 
  http://pastebin.com/fXDHu6im)
  
  After this the apache starts to render the page from the results and push 
  them to the browser. The page is for my few comments/replies already 206KB 
  without any apache optimizations
  
  After adding: 
  
  SetOutputFilter DEFLATE
  SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$  no-gzip dont-vary
  SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary
  ExpiresActive On
  ExpiresByType text/css A604800
  
  ExpiresByType image/x-icon A31536000
  ExpiresByType image/gif A604800
  ExpiresByType image/jpg A604800
  ExpiresByType image/jpeg A604800
  
  ExpiresByType image/png A604800
  ExpiresByType application/x-javascript A3600
  Header set Cache-Control must-revalidate
  to the rt vhost, the page load time goes down from 26 sec to 8 sec and from 
  206 kb to 10kb
  
  you should try.
  
  Torsten
  
  2010/9/7 Justin Hayes justin.ha...@openbet.com
  Well we've captured the time for all the queries run for our long ticket 
  (which takes ~20secs to generate).
  
  Total query time is 0.871493s
  
  So it's not the DB.
  
  Justin
  
  -
  Justin Hayes
  OpenBet Support Manager
  justin.ha...@openbet.com
  
  On 7 Sep 2010, at 11:13, Torsten Brumm wrote:
  
  Hi Justin,
  just found this threat, sounds interessting.
  
  What i read so far: You have 1 quad core system with 8GB RAM, running both 
  WEB and DB, correct?
  
  Think you should follow Raed's hints first to log the queries generated 
  with RT
  
  In terms of debug; if you have not done this yet enable 
  DBIx-SearchBuilder StatementLog
  Set($StatementLog,?debug?);  in your etc/RT_SiteConfig.
  I'm sure you will find some funny queries. Normally the Query Log of 
  default MySQL can only log queries taking longer than a second, but in 
  your case i think, you will have several much faster queries but in 
  summary they take longer - but you can't find in mysql-slow log.
  
  Some more question regarding your hardware and setup.
  
  1. One Server / quad core (hyper threating) - how many threats for 
  Mysql/Postgresql? / 8 GB Ram 
  2. Hard Disk Setup? (logfiles and db storred on different HDD's? Any I/O 
  Problems?)
  3. RT Rights Setup, does the user performance is faster or slower than the 
  performance with root user?
  
  Some more information?
  
  We're running also a larger RT Instance with dedicated hardware for DB and 
  Webservers with no huge perferomance bottlenacks.
  
  Tob
  
  2010/9/7 Justin Hayes justin.ha...@openbet.com
  I *think* we're just CPU bound. Roy's webservers are 3.6ghz so quite a bit 
  faster than ours. We're going to try it on a faster server and that should 
  drop our times. Guess we just wanted to explore all avenues before 
  throwing hardware at the problem.
  
  Justin
  
  -
  Justin Hayes
  OpenBet Support Manager
  justin.ha...@openbet.com
  
  On 7 Sep 2010, at 10:30, Justin Hayes wrote:
  
  Tried Centos last night, and no difference at all.
  
  -
  Justin Hayes
  OpenBet Support Manager
  justin.ha...@openbet.com
  
  On 6 Sep 2010, at 20:49, Justin Hayes wrote:
  
  Hi Ruslan,
  
  Sorry looks like I shrunk the image too much. The thing I find odd is 
  that there are others with similar hardware who don't get the problem. 
  It'll be great if 3.10 fixes it for me, but I'd love to get to the 
  bottom of it first. I'm 

[rt-users] Basic question

2010-09-09 Thread John McDonald
Hi all,

 

I'm just getting started with learning RT, and I'd like to test some basic
changes that require me to modify params in RT_SiteConfig.pm. My question is
what command do I need to run after modifying RT_SiteConfig.pm to activate
those changes? Do I just run 'perl RT_SiteConfig.pm' to build it?

 

I spent several hours looking through the various docs an wikis and I
couldn't find anything that talks about RT_SiteConfig.pm other than the
params you can change.

 

Thanx.

 

John


RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!

Re: [rt-users] Basic question

2010-09-09 Thread Ian Rowland
Just restart Apache: service httpd restart


On 2010/09/09 3:28 PM, John McDonald john...@ix.netcom.com wrote:

 Hi all,
  
 I¹m just getting started with learning RT, and I¹d like to test some basic
 changes that require me to modify params in RT_SiteConfig.pm. My question is
 what command do I need to run after modifying RT_SiteConfig.pm to activate
 those changes? Do I just run Œperl RT_SiteConfig.pm¹ to build it?
  
 I spent several hours looking through the various docs an wikis and I couldn¹t
 find anything that talks about RT_SiteConfig.pm other than the params you can
 change.
  
 Thanx.
  
 John
 
 
 
 RT Training in Washington DC, USA on Oct 25  26 2010
 Last one this year -- Learn how to get the most out of RT!



Ian Rowland

Aptus IT
Business Address  Aptus House, 53 Autumn Rd, Rivonia, Sandton, 2128
Telephone  +27 11 797 8000
Fax  +27 11 797 8004
Mobile  +27 82 738 8989
Skype: +27 11 083 7426
E-mail  rowl...@aptus.ws
Web  www.aptus.ws http://www.aptus.ws/
 
Confidentiality Notice:
The above message and all attachments may contain privileged and
confidential information intended only for the person or entity to which it
is addressed. Any review, retransmission, dissemination, copy or other use
of, or taking of any action in reliance upon this information by persons or
entities other than the intended recipient is prohibited. If you received
this message in error, please notify the sender immediately by e-mail,
facsimile or telephone and thereafter delete the material from your
computer. Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be the view of
the entity transmitting the message.  Aptus hereby distances itself from,
and accepts no liability in respect of, the unauthorised use of its e-mail
facility or the sending of e-mail communications for other than strictly
business purposes.


RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!

Re: [rt-users] Slow Ticket History 3.8.8

2010-09-09 Thread Justin Hayes
I actually liked the incremental page load, as I could read the start of the 
ticket while the rest was loading, thus saving me a bit of time ;)

However this seems to have stopped since installing 3.8.8.

Justin

-
Justin Hayes
OpenBet Support Manager
justin.ha...@openbet.com

On 9 Sep 2010, at 13:50, Kenneth Marshall wrote:

 One big win with enabling compression was that pages loaded in bigger
 pieces and you have less problems with users trying to type in an
 page that is unfinished with unpredictable results. With the DEFLATE
 on, the page all decompresses on the fast client instead of dribbling
 out from the server.
 
 Cheers,
 Ken
 
 On Thu, Sep 09, 2010 at 08:13:28AM +0100, Justin Hayes wrote:
 Aren't those options just compressing the page to send out to the browser 
 and caching the output?
 
 We're on an internal gigabit network so seems unlikely that would help. All 
 our time goes on the server actually building the page to send out I think.
 
 Can try it though :)
 
 Justin
 
 -
 Justin Hayes
 OpenBet Support Manager
 justin.ha...@openbet.com
 
 On 7 Sep 2010, at 12:45, Torsten Brumm wrote:
 
 Hi Justin,
 just created inside a RT Test VM (slow one with 500mb ram) a single ticket 
 with around 60 replies and some comments. Tested the speed with different 
 users
 
 1. root user to open this ticket: around 26 sec - 870 single sql queries 
 in around 4 sec! (Queries: http://pastebin.com/7Yekfx2Y)
 2. user with full access (take, own, modify etc): around same time and 
 queries like root (Queries: http://pastebin.com/U0HnPcJL)
 3. user with less rights (no take, no own, only showticket, seequeue): time 
 around 15 sec and 600 sql queries in around 2 sec! (Queries: 
 http://pastebin.com/fXDHu6im)
 
 After this the apache starts to render the page from the results and push 
 them to the browser. The page is for my few comments/replies already 206KB 
 without any apache optimizations
 
 After adding: 
 
SetOutputFilter DEFLATE
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$  no-gzip dont-vary
SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary
ExpiresActive On
ExpiresByType text/css A604800
 
ExpiresByType image/x-icon A31536000
ExpiresByType image/gif A604800
ExpiresByType image/jpg A604800
ExpiresByType image/jpeg A604800
 
ExpiresByType image/png A604800
ExpiresByType application/x-javascript A3600
Header set Cache-Control must-revalidate
 to the rt vhost, the page load time goes down from 26 sec to 8 sec and from 
 206 kb to 10kb
 
 you should try.
 
 Torsten
 
 2010/9/7 Justin Hayes justin.ha...@openbet.com
 Well we've captured the time for all the queries run for our long ticket 
 (which takes ~20secs to generate).
 
 Total query time is 0.871493s
 
 So it's not the DB.
 
 Justin
 
 -
 Justin Hayes
 OpenBet Support Manager
 justin.ha...@openbet.com
 
 On 7 Sep 2010, at 11:13, Torsten Brumm wrote:
 
 Hi Justin,
 just found this threat, sounds interessting.
 
 What i read so far: You have 1 quad core system with 8GB RAM, running both 
 WEB and DB, correct?
 
 Think you should follow Raed's hints first to log the queries generated 
 with RT
 
 In terms of debug; if you have not done this yet enable 
 DBIx-SearchBuilder StatementLog
 Set($StatementLog,?debug?);  in your etc/RT_SiteConfig.
 I'm sure you will find some funny queries. Normally the Query Log of 
 default MySQL can only log queries taking longer than a second, but in 
 your case i think, you will have several much faster queries but in 
 summary they take longer - but you can't find in mysql-slow log.
 
 Some more question regarding your hardware and setup.
 
 1. One Server / quad core (hyper threating) - how many threats for 
 Mysql/Postgresql? / 8 GB Ram 
 2. Hard Disk Setup? (logfiles and db storred on different HDD's? Any I/O 
 Problems?)
 3. RT Rights Setup, does the user performance is faster or slower than the 
 performance with root user?
 
 Some more information?
 
 We're running also a larger RT Instance with dedicated hardware for DB and 
 Webservers with no huge perferomance bottlenacks.
 
 Tob
 
 2010/9/7 Justin Hayes justin.ha...@openbet.com
 I *think* we're just CPU bound. Roy's webservers are 3.6ghz so quite a bit 
 faster than ours. We're going to try it on a faster server and that should 
 drop our times. Guess we just wanted to explore all avenues before 
 throwing hardware at the problem.
 
 Justin
 
 -
 Justin Hayes
 OpenBet Support Manager
 justin.ha...@openbet.com
 
 On 7 Sep 2010, at 10:30, Justin Hayes wrote:
 
 Tried Centos last night, and no difference at all.
 
 -
 Justin Hayes
 OpenBet Support Manager
 justin.ha...@openbet.com
 
 On 6 Sep 2010, at 20:49, Justin Hayes 

Re: [rt-users] Basic question

2010-09-09 Thread John McDonald
Sigh - 5 minutes after I sent this I found the answer (funny - that's never
happened before 8-)) - I need to restart Apache to implement the changes.

 

John

 

From: rt-users-boun...@lists.bestpractical.com
[mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of John McDonald
Sent: Thursday, September 09, 2010 9:29 AM
To: rt-users@lists.bestpractical.com
Subject: [rt-users] Basic question

 

Hi all,

 

I'm just getting started with learning RT, and I'd like to test some basic
changes that require me to modify params in RT_SiteConfig.pm. My question is
what command do I need to run after modifying RT_SiteConfig.pm to activate
those changes? Do I just run 'perl RT_SiteConfig.pm' to build it?

 

I spent several hours looking through the various docs an wikis and I
couldn't find anything that talks about RT_SiteConfig.pm other than the
params you can change.

 

Thanx.

 

John


RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!

[rt-users] AD ExternalAuth create user

2010-09-09 Thread John Alberts
 Hi.  I got ExternalAuth working with Win2k3 AD.  My next step is to 
import tickets from our old system into the new system.  I already wrote 
a script that does this via the command line rt interface.  The one 
problem I'm having is that I need some users to already have a uid in RT 
(ie. they've already logged in once and RT auth'd them with AD and 
created a user account) so I can assign the imported ticket to them.


Finally, my question: :)
Is there any way for me to import a few users into RT?  I looked for a 
script that would import users from AD into RT, but couldn't find anything.


Thanks

--
John Alberts
Hosted Services
Exlibris USA
john.albe...@exlibrisgroup.com
cell: 1-508-878-2197

RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!


Re: [rt-users] Basic question

2010-09-09 Thread mikemacd

 On 09/09/2010 10:19 AM, John McDonald wrote:


Sigh -- 5 minutes after I sent this I found the answer (funny -- 
that's never happened before 8-)) -- I need to restart Apache to 
implement the changes.


John


Depending on the changes you're making you may also need to clear the 
mason cache.

http://wiki.bestpractical.com/view/CleanMasonCache


RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!

[rt-users] Displaying actual OtherRecipients of a transaction in email sent to all recipients

2010-09-09 Thread Chris Hardie

Hi.  I'm trying to find a way to display the Other Recipients of a
transaction in the headers of the email message generated to everyone
involved - Requestors, CCs, and Other Recipients.

So, if I reply to a ticket and type in an address in the CC field of
the reply form, but don't actually add that recipient as a CC to the
ticket, I still want everyone getting the reply to see everyone else who
received it.

Another way to say this is that I'm looking for a third behavior for the
$UseFriendlyToLine config option - instead of blank or Friendly Text
I want to actually display the addresses being e-mailed in the To/CC
header fields (but just for one queue).

Any suggestions?

Thanks,
Chris


RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!


Re: [rt-users] AD ExternalAuth create user

2010-09-09 Thread Jason Ledford
I think this is what you are looking for 
http://search.cpan.org/dist/RT-Extension-LDAPImport/

Run that with cron to do a regular import.

-Original Message-
From: rt-users-boun...@lists.bestpractical.com 
[mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of John Alberts
Sent: Thursday, September 09, 2010 11:00 AM
To: rt-users@lists.bestpractical.com
Subject: [rt-users] AD ExternalAuth create user

  Hi.  I got ExternalAuth working with Win2k3 AD.  My next step is to 
import tickets from our old system into the new system.  I already wrote 
a script that does this via the command line rt interface.  The one 
problem I'm having is that I need some users to already have a uid in RT 
(ie. they've already logged in once and RT auth'd them with AD and 
created a user account) so I can assign the imported ticket to them.

Finally, my question: :)
Is there any way for me to import a few users into RT?  I looked for a 
script that would import users from AD into RT, but couldn't find anything.

Thanks

-- 
John Alberts
Hosted Services
Exlibris USA
john.albe...@exlibrisgroup.com
cell: 1-508-878-2197

RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!

RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!


Re: [rt-users] Slow Ticket History 3.8.8

2010-09-09 Thread Raed El-Hames
Justin;

You must have implemented the DEFLATE
The deflate stops the incremental load not RT .. defalte works by compressing 
the page and sending the compressed page which the browser then decompress.

Roy

 -Original Message-
 From: rt-users-boun...@lists.bestpractical.com [mailto:rt-users-
 boun...@lists.bestpractical.com] On Behalf Of Justin Hayes
 Sent: 09 September 2010 15:19
 To: Kenneth Marshall
 Cc: rt-users@lists.bestpractical.com Users
 Subject: Re: [rt-users] Slow Ticket History 3.8.8

 I actually liked the incremental page load, as I could read the start of
 the ticket while the rest was loading, thus saving me a bit of time ;)

 However this seems to have stopped since installing 3.8.8.

 Justin

 -
 Justin Hayes
 OpenBet Support Manager
 justin.ha...@openbet.com

 On 9 Sep 2010, at 13:50, Kenneth Marshall wrote:

  One big win with enabling compression was that pages loaded in bigger
  pieces and you have less problems with users trying to type in an
  page that is unfinished with unpredictable results. With the DEFLATE
  on, the page all decompresses on the fast client instead of dribbling
  out from the server.
 
  Cheers,
  Ken
 
  On Thu, Sep 09, 2010 at 08:13:28AM +0100, Justin Hayes wrote:
  Aren't those options just compressing the page to send out to the
 browser and caching the output?
 
  We're on an internal gigabit network so seems unlikely that would help.
 All our time goes on the server actually building the page to send out I
 think.
 
  Can try it though :)
 
  Justin
 
  -
  Justin Hayes
  OpenBet Support Manager
  justin.ha...@openbet.com
 
  On 7 Sep 2010, at 12:45, Torsten Brumm wrote:
 
  Hi Justin,
  just created inside a RT Test VM (slow one with 500mb ram) a single
 ticket with around 60 replies and some comments. Tested the speed with
 different users
 
  1. root user to open this ticket: around 26 sec - 870 single sql
 queries in around 4 sec! (Queries: http://pastebin.com/7Yekfx2Y)
  2. user with full access (take, own, modify etc): around same time and
 queries like root (Queries: http://pastebin.com/U0HnPcJL)
  3. user with less rights (no take, no own, only showticket, seequeue):
 time around 15 sec and 600 sql queries in around 2 sec! (Queries:
 http://pastebin.com/fXDHu6im)
 
  After this the apache starts to render the page from the results and
 push them to the browser. The page is for my few comments/replies already
 206KB without any apache optimizations
 
  After adding:
 
 SetOutputFilter DEFLATE
 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$  no-gzip dont-
 vary
 SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary
 ExpiresActive On
 ExpiresByType text/css A604800
 
 ExpiresByType image/x-icon A31536000
 ExpiresByType image/gif A604800
 ExpiresByType image/jpg A604800
 ExpiresByType image/jpeg A604800
 
 ExpiresByType image/png A604800
 ExpiresByType application/x-javascript A3600
 Header set Cache-Control must-revalidate
  to the rt vhost, the page load time goes down from 26 sec to 8 sec and
 from 206 kb to 10kb
 
  you should try.
 
  Torsten
 
  2010/9/7 Justin Hayes justin.ha...@openbet.com
  Well we've captured the time for all the queries run for our long
 ticket (which takes ~20secs to generate).
 
  Total query time is 0.871493s
 
  So it's not the DB.
 
  Justin
 
  -
  Justin Hayes
  OpenBet Support Manager
  justin.ha...@openbet.com
 
  On 7 Sep 2010, at 11:13, Torsten Brumm wrote:
 
  Hi Justin,
  just found this threat, sounds interessting.
 
  What i read so far: You have 1 quad core system with 8GB RAM, running
 both WEB and DB, correct?
 
  Think you should follow Raed's hints first to log the queries
 generated with RT
 
  In terms of debug; if you have not done this yet enable DBIx-
 SearchBuilder StatementLog
  Set($StatementLog,?debug?);  in your etc/RT_SiteConfig.
  I'm sure you will find some funny queries. Normally the Query Log of
 default MySQL can only log queries taking longer than a second, but in
 your case i think, you will have several much faster queries but in
 summary they take longer - but you can't find in mysql-slow log.
 
  Some more question regarding your hardware and setup.
 
  1. One Server / quad core (hyper threating) - how many threats for
 Mysql/Postgresql? / 8 GB Ram
  2. Hard Disk Setup? (logfiles and db storred on different HDD's? Any
 I/O Problems?)
  3. RT Rights Setup, does the user performance is faster or slower
 than the performance with root user?
 
  Some more information?
 
  We're running also a larger RT Instance with dedicated hardware for
 DB and Webservers with no huge perferomance bottlenacks.
 
  Tob
 
  2010/9/7 Justin Hayes justin.ha...@openbet.com
  I *think* we're just CPU bound. Roy's webservers are 3.6ghz so quite
 a bit faster than 

Re: [rt-users] AD ExternalAuth create user

2010-09-09 Thread John Alberts

 Thanks.  I'll give that a try.

John


On 09/09/2010 10:18 AM, Jason Ledford wrote:


I think this is what you are looking for 
http://search.cpan.org/dist/RT-Extension-LDAPImport/


Run that with cron to do a regular import.

-Original Message-
From: rt-users-boun...@lists.bestpractical.com 
[mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of John 
Alberts

Sent: Thursday, September 09, 2010 11:00 AM
To: rt-users@lists.bestpractical.com
Subject: [rt-users] AD ExternalAuth create user

  Hi.  I got ExternalAuth working with Win2k3 AD.  My next step is to
import tickets from our old system into the new system.  I already wrote
a script that does this via the command line rt interface.  The one
problem I'm having is that I need some users to already have a uid in RT
(ie. they've already logged in once and RT auth'd them with AD and
created a user account) so I can assign the imported ticket to them.

Finally, my question: :)
Is there any way for me to import a few users into RT?  I looked for a
script that would import users from AD into RT, but couldn't find 
anything.


Thanks

--
John Alberts
Hosted Services
Exlibris USA
john.albe...@exlibrisgroup.com
cell: 1-508-878-2197

RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!



--
John Alberts
Hosted Services
Exlibris USA
john.albe...@exlibrisgroup.com
cell: 1-508-878-2197


RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!

[rt-users] Prevent Could not load a valid user email to invalid requestor

2010-09-09 Thread Bill Kuntz
We limit ticket creation to uses that are in the RT database.  When
someone who is not in the system sends an email, they get the Could not
load valid user message back.  Additionally the admin user gets the
same message.

We do not want the user to get the message.  99.9% of the time it is
spam with a forged from address.

Can we just copy Email.pm to the local tree, and comment out the
following bit of code, or is there an easier way?
# Also notify the requestor that his request has been dropped.
if ($args{'Requestor'} ne RT-Config-Get('OwnerEmail')) {
MailError(
To  = $args{'Requestor'},
Subject = Could not load a valid user,
Explanation = EOT,
RT could not load a valid user, and RT's configuration does not allow
for the creation of a new user for your email.

EOT
MIMEObj  = $args{'Message'},
LogLevel = 'error'
);

Thanks,
Bill

-- 

Bill Kuntz
FCLA Open Systems Group
(352) 392-9020 x 242



RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!


[rt-users] RT warning Couldn't enable user xxxx

2010-09-09 Thread Kenneth Crocker
To List,

I continue to get this warning in my rt.log:

[Thu Sep  9 16:31:42 2010] [warning]: Couldn't enable user 9664
(/opt/rt3/bin/../lib/RT/User_Overlay.pm:1143)

This is an odd message as this user is an LDAP approved user that is on the
User Table as a Privileged user.

So, why the warning?

Kenn
LBNL

RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!

[rt-users] Unclutttering the ticket view.....

2010-09-09 Thread Gary Greene
While on the IRC channel for RT recently I discussed the want for an option
to collapse the quoted portions of tickets (where you've got user responses
to previous messages, etc) ala Gmail. During that conversation someone said
they thought there was an extension for that.

Doing a search on CPAN has come up with zero hits for the concept, so now, I
turn to the collective community: has anyone seen an extension for this? If
so, could you please point me to the URL for it's source? Thanks.

-- 
Gary L. Greene, Jr.
IT Operations
Minerva Networks, Inc.
Cell:   (650) 704-6633
Office: (408) 240-1239



smime.p7s
Description: S/MIME cryptographic signature

RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!

Re: [rt-users] Unclutttering the ticket view.....

2010-09-09 Thread Jerrad Pierce
On Thu, Sep 9, 2010 at 13:48, Gary Greene ggre...@minervanetworks.com wrote:
 While on the IRC channel for RT recently I discussed the want for an option
 to collapse the quoted portions of tickets (where you've got user responses
 to previous messages, etc) ala Gmail. During that conversation someone said
 they thought there was an extension for that.

 Doing a search on CPAN has come up with zero hits for the concept, so now, I
 turn to the collective community: has anyone seen an extension for this? If
 so, could you please point me to the URL for it's source? Thanks.
Not an extension, but there's been discussion e.g;
[rt-users] RT-Mailgate hack to remove quoted replies
by Tom Lahti on April 3rd of last year.

Also, the wiki is the authoritative place to look for tweaks, not CPAN.
Not everything is an extension, and not all extension authors post to CPAN.
-- 
Cambridge Energy Alliance: Save money. Save the planet.

RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!


Re: [rt-users] Modifying placement of custom fields on Basics Tab

2010-09-09 Thread Dennis Ordanov
On Wed, Sep 1, 2010 at 12:11 PM, Dennis Ordanov daoden...@gmail.com wrote:
 Hi,

 I am using 3.8.7 on CentOS with a MySQL db.

 I have four custom fields placed on the basics tab of a ticket, they
 work great, but I would like to reverse their placement on their page.
 They are just 4 drop downs for specific ticket categories and clients.
  The more specific region is on the right and the cities are on the
 left and same with the service categories and actual services.

 https://rt.company.net/Admin/CustomFields/index.html


 Thanks,

 Dennis


Anyone, with any sort of hints or tips on where to even begin?

Dennis

RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!


Re: [rt-users] Unclutttering the ticket view.....

2010-09-09 Thread Emmanuel Lacour
On Thu, Sep 09, 2010 at 01:57:22PM -0400, Jerrad Pierce wrote:
 
 Also, the wiki is the authoritative place to look for tweaks, not CPAN.
 Not everything is an extension, and not all extension authors post to CPAN.


note that also not all RT cpan extensions are on the wiki ;)

look on both.


RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!


Re: [rt-users] Unclutttering the ticket view.....

2010-09-09 Thread Jerrad Pierce
 note that also not all RT cpan extensions are on the wiki ;)
Damn virtuous lazy programmers :-P

RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!


Re: [rt-users] Unclutttering the ticket view.....

2010-09-09 Thread Thomas Sibley
On 09/09/2010 03:47 PM, Emmanuel Lacour wrote:
 On Thu, Sep 09, 2010 at 01:57:22PM -0400, Jerrad Pierce wrote:

 Also, the wiki is the authoritative place to look for tweaks, not CPAN.
 Not everything is an extension, and not all extension authors post to CPAN.

 
 note that also not all RT cpan extensions are on the wiki ;)
 
 look on both.

A list of current extensions which are useful is at:
http://bestpractical.com/rt/extensions.html

Thomas

RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!


Re: [rt-users] AD ExternalAuth create user

2010-09-09 Thread John Alberts
 I actually couldn't get ldapimport to import any users for me although 
it did auth properly.


In any case, I just realized I can simply create the user in the web ui 
and as long as the username and email address match, it works fine.


Thanks


On 09/09/2010 10:26 AM, John Alberts wrote:

Thanks.  I'll give that a try.

John


On 09/09/2010 10:18 AM, Jason Ledford wrote:


I think this is what you are looking for 
http://search.cpan.org/dist/RT-Extension-LDAPImport/


Run that with cron to do a regular import.

-Original Message-
From: rt-users-boun...@lists.bestpractical.com 
[mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of John 
Alberts

Sent: Thursday, September 09, 2010 11:00 AM
To: rt-users@lists.bestpractical.com
Subject: [rt-users] AD ExternalAuth create user

  Hi.  I got ExternalAuth working with Win2k3 AD.  My next step is to
import tickets from our old system into the new system.  I already wrote
a script that does this via the command line rt interface.  The one
problem I'm having is that I need some users to already have a uid in RT
(ie. they've already logged in once and RT auth'd them with AD and
created a user account) so I can assign the imported ticket to them.

Finally, my question: :)
Is there any way for me to import a few users into RT?  I looked for a
script that would import users from AD into RT, but couldn't find 
anything.


Thanks

--
John Alberts
Hosted Services
Exlibris USA
john.albe...@exlibrisgroup.com
cell: 1-508-878-2197

RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!



--
John Alberts
Hosted Services
Exlibris USA
john.albe...@exlibrisgroup.com
cell: 1-508-878-2197


--
John Alberts
Hosted Services
Exlibris USA
john.albe...@exlibrisgroup.com
cell: 1-508-878-2197


RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!

Re: [rt-users] Unclutttering the ticket view.....

2010-09-09 Thread Emmanuel Lacour
On Thu, Sep 09, 2010 at 04:43:48PM -0400, Thomas Sibley wrote:
 
 A list of current extensions which are useful is at:
 http://bestpractical.com/rt/extensions.html
 

Nice, I didn't saw BPS work on those webpages :))

PS: for my extensions, source code is always available on
http://git.home-dn.net/


RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!


Re: [rt-users] Modifying placement of custom fields on Basics Tab

2010-09-09 Thread Jason A. Smith

On 09/09/2010 02:40 PM, Dennis Ordanov wrote:

On Wed, Sep 1, 2010 at 12:11 PM, Dennis Ordanovdaoden...@gmail.com  wrote:

Hi,

I am using 3.8.7 on CentOS with a MySQL db.

I have four custom fields placed on the basics tab of a ticket, they
work great, but I would like to reverse their placement on their page.
They are just 4 drop downs for specific ticket categories and clients.
  The more specific region is on the right and the cities are on the
left and same with the service categories and actual services.

https://rt.company.net/Admin/CustomFields/index.html


Thanks,

Dennis



Anyone, with any sort of hints or tips on where to even begin?


Hi Dennis,

I think you will have to upgrade to 3.8.8 in order to do what you want. 
See the changelog in the announcement, under the section Custom fields 
ordering and application improvements


http://lists.bestpractical.com/pipermail/rt-announce/2010-May/000179.html

~Jason

RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!


Re: [rt-users] Slow Ticket History

2010-09-09 Thread Jesse Vincent

Tim,

Thanks for these patches. I'm...very surprised at the numbers you're seeing, 
but appreciate that you have something that can help. I'll look at getting this 
rolled into core.


On Tue, Sep 07, 2010 at 12:24:35PM +0100, Tim Cutts wrote:
 
 On 6 Sep 2010, at 5:54 pm, rt-users-requ...@lists.bestpractical.com wrote:
 
  So far we've tried installing RT on different hardware, both 32 and 64bit 
  versions of linux. RT is still very slow for long tickets. All the time is 
  taken up by the perl/apache process maxing out a core of CPU.
  
  We've even gone as far as trying to profile the code. We came up with this 
  graph of where the time was going:
  
  TIMING.png
  We then tried to go further into those functions but can't find a single 
  smoking gun call that is taking all the time.
  
  For example in a ticket that takes 22s to render approx 5 secs goes on 
  these 2 lines:
  
  File: Ticket/Elements/ShowHistory line: 100-103 version 3.8.8
  
  my @trans_attachments = grep { $_-TransactionId == $Transaction-Id } 
  @attachments;
  
  grep { ($_-TransactionId == $Transaction-Id )  
  ($trans_content-{$_-Id} = $_)  } @attachment_content;
  
 
 From what I can tell, the real problem here is repeated scanning of both the 
 @attachments and @attachment_content arrays, which makes the execution speed 
 of the ShowHistory element O(N^2) with respect to the number of transactions; 
 painful, to say the least.
 
 1)  The %$trans_content hash can be made up front in a single pass, for all 
 the attachments in the ticket, turning this into an O(N) operation, rather 
 than O(N^2)
 2) The $trans_content variable is only used in one place; it's passed to 
 ShowTransaction, where it is then passed on to ShowTransactionAttachments.
 3)  In there, there are some errors which cause some autovivification of hash 
 members which needn't happen.
 4)  You can do much the same up-front calculation with $trans_attachments as 
 well, so you don't have to keep grepping through it
 
 I've now made those changes, and on a reasonably large ticket (216 
 transactions) it reduced the ticket rendering time on my system from 2.5 
 minutes to 34 seconds, which is a pretty good improvement, I think.
 
 On a more extreme ticket, with 417 transactions, the 3.8.8 release code takes 
 over 20 minutes to render the ticket (I gave up waiting), so in fact it's 
 considerably worse order execution time than I thought.  My patched code 
 takes 2.2 minutes - still not brilliant but hey, this ticket is now 
 renderable, which it was not before.
 
 Just for some background, the hardware I'm running on:
 
 RT database:  2 CPU virtual machine, 8GB RAM, MySQL, running on vSphere 4.1 
 on a 2.0 GHz E5504 Nehalem system
 RT web server:  2 CPU virtual machine, 2GB RAM, on the same type of physical 
 hardware as the database server
 
 As far as I can tell, I have not semantically altered the code, but others 
 may want to test more thoroughly.  I have not yet put this on my production 
 web server - I cloned my web server VM and made my changes to the clone (God, 
 I love VMs for this sort of thing!)
 
 Regards,
 
 Tim
 
 Here are my patches to Ticket/Elements/ShowHistory:
 
 --- /opt/rt3/share/html/Ticket/Elements/ShowHistory   2010-05-14 
 13:58:15.0 +0100
 +++ /opt/rt3/local/html/Ticket/Elements/ShowHistory   2010-09-07 
 11:59:30.0 +0100
 @@ -84,6 +84,10 @@
  %perl
  my @attachments = @{$Attachments-ItemsArrayRef()};
  my @attachment_content = @{$AttachmentContent-ItemsArrayRef()};
 +my $trans_content = {};
 +map { $trans_content-{$_-TransactionId}-{$_-Id} = $_  } 
 @attachment_content;
 +my $trans_attachments = {};
 +map { push (@{$trans_attachments-{$_-TransactionId}}, $_) } @attachments;
  
  while ( my $Transaction = $Transactions-Next ) {
  my $skip = 0;
 @@ -97,12 +101,6 @@
  
  $i++;
  
 -my @trans_attachments = grep { $_-TransactionId == $Transaction-Id } 
 @attachments;
 -
 -my $trans_content = {};
 -grep { ($_-TransactionId == $Transaction-Id )  
 ($trans_content-{$_-Id} = $_)  } @attachment_content;
 -
 -   
  my $IsLastTransaction = 0;
  if ( $OldestFirst ) {
  $IsLastTransaction = $Transactions-IsLast;
 @@ -118,7 +116,7 @@
Transaction  = $Transaction,
ShowHeaders  = $ShowHeaders,
RowNum   = $i,
 -  Attachments  = \...@trans_attachments,
 +  Attachments  = $trans_attachments-{$Transaction-id},
AttachmentContent= $trans_content,
LastTransaction  = $IsLastTransaction
   );
 
 and here's the patch to ShowTransactionAttachments (both files need to be 
 patched):
 
 --- /opt/rt3/share/html/Ticket/Elements/ShowTransactionAttachments
 2010-05-14 13:58:15.0 +0100
 +++ /opt/rt3/local/html/Ticket/Elements/ShowTransactionAttachments
 2010-09-07 11:04:53.0 +0100
 @@ -189,8 +189,10 @@
  {
  

Re: [rt-users] Slow Ticket History

2010-09-09 Thread Jesse Vincent



On Thu, Sep 09, 2010 at 08:15:37AM +0100, Justin Hayes wrote:
 We gave those patches a try. Shaved ~4s from our 20s, which isn't bad so we 
 might look at rolling them into Live.

Justin,

Have you tried running ticket loads under Devel::NYTProf with the standalone 
server to try to identify what's up here for you?

RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!


Re: [rt-users] Slow Ticket History

2010-09-09 Thread Jeff Fearn
On Thu, 2010-09-09 at 22:52 -0400, Jesse Vincent wrote:
 
 
 On Thu, Sep 09, 2010 at 08:15:37AM +0100, Justin Hayes wrote:
  We gave those patches a try. Shaved ~4s from our 20s, which isn't bad so we 
  might look at rolling them into Live.
 
 Justin,
 
 Have you tried running ticket loads under Devel::NYTProf with the standalone 
 server to try to identify what's up here for you?
 
 RT Training in Washington DC, USA on Oct 25  26 2010
 Last one this year -- Learn how to get the most out of RT!

NYTProf can also be used with Apache easily enough, short how to should
anyone want to try it.

1: install Devel::NYTProf on the web server

2: edit httpd.conf

comment out:

#PerlModule Apache::DProf

add:

IfDefine NYTPROF
MaxClients 1
PerlPassEnv NYTPROF
PerlModule Devel::NYTProf::Apache
/IfDefine

3: enable nytprof in service config file (/etc/sysconfig/httpd on Red
Hat systems)

Add:

OPTIONS='-D NYTPROF'

4: restart httpd

5: do a few things that lag in the gui

6: stop httpd, you need to stop it for nytprof to post process the
results. Remember to comment out the OPTIONS line from step 3 when you
want to disable profiling.

7: cd /tmp

8: convert the nytprof output to html, the file names are
nytprof.parent_pid.out.child_pid

e.g.

$ nytprofhtml -f nytprof.5766.out.5771

9: view output

e.g.

$ links nytprof/index.html

Cheers, Jeff.


RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!


Re: [rt-users] Slow Ticket History

2010-09-09 Thread Tim Cutts

On 10 Sep 2010, at 03:52, Jesse Vincent wrote:

 Thanks for these patches. I'm...very surprised at the numbers you're seeing, 
 but appreciate that you have something that can help. I'll look at getting 
 this rolled into core.

The numbers are because it turns out I'd miscounted the number of transactions 
on the ticket by more than a factor of 10 - there were actually more than 5500 
transactions on the ticket I was testing (the transaction count I initially 
quoted was actually just on one of the tickets that had subsequently been 
merged into the monster ticket).

Regards,

Tim

RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!