Mysql Searchbuilder?

Not sure what this is telling me but I see it every now and then in my rt
logs:

[Fri May 30 10:30:26 2003] [warning]: DBD::mysql::st execute failed: MySQL
server has gone away at
/usr/local/lib/perl5/site_perl/5.8.0/DBIx/SearchBuilder/Handle.pm line 385.
(/export/www/new/rt3/lib/RT.pm:226)
[Fri May 30 10:30:26 2003] [warning]: RT::Handle=HASH(0x9d83d60) couldn’t
execute the query ‘INSERT INTO Attachments (Subject, ContentType, Filename,
Headers, Creator, Parent, Created, ContentEncoding, Content, TransactionId)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)’ at
/usr/local/lib/perl5/site_perl/5.8.0/DBIx/SearchBuilder/Handle.pm line 392.
(/export/www/new/rt3/lib/RT.pm:226)
[Fri May 30 10:30:26 2003] [info]: RT::Scrip=HASH(0x9f53b58): Couldn’t prepare
Open Tickets (/export/www/new/rt3/lib/RT/Scrip_Overlay.pm:338)

This is when someone is trying to email an attachment into rt and the
attachments then fail
this is on rt3.0.2 and DBISearchbuilder0.81_04

Regards,

Brent /"
\ /
Linux Registered X ASCII Ribbon Campaign
User #309941 / \ Against HTML Mail

Brent Geach wrote:

Not sure what this is telling me but I see it every now and then in my rt
[Fri May 30 10:30:26 2003] [warning]: DBD::mysql::st execute failed: MySQL
server has gone away at

Check your mysql logs. It sounds like mysqld is dying.
Phil Homewood, Systems Janitor, http://www.SnapGear.com
pdh@snapgear.com Ph: +61 7 3435 2810 Fx: +61 7 3891 3630
SnapGear - Custom Embedded Solutions and Security Appliances

Converted all tables over to innodb and upgraded mysql to 4.0.1

Now am seeing this:

[Mon Jun 2 13:12:47 2003] [warning]: DBD::mysql::st execute failed: Lock wait
timeout exceeded; Try restarting transaction at
/usr/local/lib/perl5/site_perl/5.8.0/DBIx/SearchBuilder/Handle.pm line 385.
(/export/www/new/rt3/lib/RT.pm:226)
[Mon Jun 2 13:12:47 2003] [warning]: RT::Handle=HASH(0x90e5d3c) couldn’t
execute the query ‘INSERT INTO Tickets (Subject, Status, Queue, Creator,
Owner, LastUpdatedBy, Type, Starts, Resolved, Created, Priority, Due,
LastUpdated) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)’ at
/usr/local/lib/perl5/site_perl/5.8.0/DBIx/SearchBuilder/Handle.pm line 392.
(/export/www/new/rt3/lib/RT.pm:226)

Am I still missing something in my mysql config. I set the buffers and cache
etc for innodb to 512M etc etcOn Mon, 02 Jun 2003, Reini Urban wrote:

This is because of mysql’s MyISAM architecture.
I would suggest to convert the table to type=InnoDB which does only
row-level locking, instead of table-locking on every update.

Here any previous update query is too slow (attachments are quite large)
and the insert is refused. Select’s are also refused on MyISAM, but not
on InnoDB.

Brent Geach wrote:

Not sure what this is telling me but I see it every now and then in my rt
logs:

[Fri May 30 10:30:26 2003] [warning]: DBD::mysql::st execute failed: MySQL
server has gone away at
/usr/local/lib/perl5/site_perl/5.8.0/DBIx/SearchBuilder/Handle.pm line 385.
(/export/www/new/rt3/lib/RT.pm:226)
[Fri May 30 10:30:26 2003] [warning]: RT::Handle=HASH(0x9d83d60) couldn’t
execute the query ‘INSERT INTO Attachments (Subject, ContentType, Filename,
Headers, Creator, Parent, Created, ContentEncoding, Content, TransactionId)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)’ at
/usr/local/lib/perl5/site_perl/5.8.0/DBIx/SearchBuilder/Handle.pm line 392.
(/export/www/new/rt3/lib/RT.pm:226)
[Fri May 30 10:30:26 2003] [info]: RT::Scrip=HASH(0x9f53b58): Couldn’t
prepare
Open Tickets (/export/www/new/rt3/lib/RT/Scrip_Overlay.pm:338)

This is when someone is trying to email an attachment into rt and the
attachments then fail
this is on rt3.0.2 and DBISearchbuilder0.81_04

Reini Urban - Programmer - http://inode.at

Regards,

Brent /"
\ /
Linux Registered X ASCII Ribbon Campaign
User #309941 / \ Against HTML Mail

Converted all tables over to innodb and upgraded mysql to 4.0.1

you mean mysql 4.0.13, right?

http://www.bestpractical.com/rt – Trouble Ticketing. Free.

Yeah.
What Ive found now is

I send an email in (MTA is exim 4.20) usually when the attachment is 500k +, I
see it being acceppted into rt as:
Exim log:
2003-06-03 10:22:32 19N7zz-0000fF-P9 <= brent@telecom1.com
H=shadow.telecom1.com (shadow) [10.0.0.160] P=esmtp S=2795187 id=2003060309225

rt.log:
[Tue Jun 3 09:22:46 2003] [info]:
rt-3.0.2pre6-5630-8706.0.491173828535807@telecom1.com #5630/8706 - Scrip 3
(/export/www/new/rt3/lib/RT/Action/SendEmail.pm:91)

then I wait for a while with no activity in either logs until
In exim log:
2003-06-03 10:25:35 19N7zz-0000fF-P9 ** |/export/www/new/rt3/bin/rt-mailgate
–queue sysadmin --action correspond --url http://localhost/
rt-sysadmin@rt.telecom1.com R=system_aliases T=address_pipe: Child process
of address_pipe transport returned 75 (could mean temporary error) from
command: /export/www/new/rt3/bin/rt-mailgate

And what gets mailed back to me is:

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

pipe to |/export/www/new/rt3/bin/rt-mailgate --queue sysadmin --action
correspond --url http://localhost/
generated by rt-sysadmin@rt.telecom1.com
local delivery failed

The following text was generated during the delivery attempt:

------ pipe to |/export/www/new/rt3/bin/rt-mailgate --queue sysadmin --action
correspond --url http://localhost/
generated by rt-sysadmin@rt.telecom1.com ------

An Error Occurred

500 read timeout

------ This is a copy of the message, including all the headers. ------
------ The body of the message is 2794521 characters long; only the first
------ 106496 or so are included here.

I still dont get anything into the rt.log at this point
If I try goto ticket number 5630
In log I obviously see this
[Tue Jun 3 09:28:07 2003] [error]: WebRT: Could not load ticket 5630 ()
(/export/www/new/rt3/share/html/Elements/Error:54)

Now the odd part is (I was testing this extensivley yesterday with various
my.cnf options and somethimes I would get all the above but the ticket would
still be created with the attachment :-/ )

I was working yesterday on the presumption that something is locking up/timing
out somewhere, but I couldnt figure out where?

My current my.cnf file is as follows:

[client]
port = 3306
socket = /var/lib/mysql/mysql.sock
[mysqld]
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-locking
thread_concurrency=8
log-bin
server-id = 1
skip-locking
key_buffer = 512M
max_allowed_packet = 16M
table_cache = 512
sort_buffer_size = 2M
read_buffer_size = 2M
myisam_sort_buffer_size = 64M
thread_cache = 8
query_cache_size = 64M
innodb_data_home_dir = /var/lib/mysql/
innodb_data_file_path = ibdata1:100M:autoextend
innodb_log_group_home_dir = /var/lib/mysql/
innodb_log_arch_dir = /var/lib/mysql/
set-variable = innodb_buffer_pool_size=1024M
set-variable = innodb_additional_mem_pool_size=128M
set-variable = innodb_log_file_size=256M
set-variable = innodb_log_buffer_size=64M
innodb_flush_log_at_trx_commit=1
set-variable = innodb_lock_wait_timeout=100
[mysqldump]
quick
set-variable = max_allowed_packet=16M
[mysql]
no-auto-rehash
[isamchk]
set-variable = key_buffer=128M
set-variable = sort_buffer=128M
set-variable = read_buffer=2M
set-variable = write_buffer=2M
[myisamchk]
set-variable = key_buffer=128M
set-variable = sort_buffer=128M
set-variable = read_buffer=2M
set-variable = write_buffer=2M

I just managed to get the mysql log working again and have seen that when I
send the attachment in mysql update log I can see the attachments starting to
be inserted and then I lose it all in binary and nothing in the error log.

I cant think of anything else that might help at the moment and am also stuck
as where else to look for the problem.

BrentOn Mon, 02 Jun 2003, Jesse Vincent wrote:

On Mon, Jun 02, 2003 at 02:16:33PM +0100, Brent Geach wrote:

Converted all tables over to innodb and upgraded mysql to 4.0.1

you mean mysql 4.0.13, right?


http://www.bestpractical.com/rt – Trouble Ticketing. Free.
Regards,

Brent /"
\ /
Linux Registered X ASCII Ribbon Campaign
User #309941 / \ Against HTML Mail

Hi Guys!

Does someone already have a code snippet / whatever
to close tickets via Email, with a certain command for example.
I know there was something for version 2.xx, i have 3.xx now
(and also the code for 2.xx did not work for my 2.xx version…)

thx
Hermann

Does someone already have a code snippet / whatever
to close tickets via Email, with a certain command for example.
I know there was something for version 2.xx, i have 3.xx now
(and also the code for 2.xx did not work for my 2.xx version…)

I asked about something similar (we want ‘take’ and ‘resolve’ by e-mail)

Jesse replied off list that he was looking for someone to sponsor the development of a ‘command by e-mail’ module. He needs around 6,000 $US to do it, but no-one has expressed any interest so far.

It seems to me though that a lot of people want something with minimal functionality and we could do it with a few patches. I think there is some sort of plugin architecture in the rt-mailgate script that might be useful. Have a look if you have time - it might not be too difficult to do.
Ian Grant, Computer Lab., William Gates Building, JJ Thomson Ave., Cambridge
Phone: +44 1223 334420

Does someone already have a code snippet / whatever
to close tickets via Email, with a certain command for example.
I know there was something for version 2.xx, i have 3.xx now
(and also the code for 2.xx did not work for my 2.xx version…)

I asked about something similar (we want ‘take’ and 'resolve’
by e-mail)

It seems to me though that a lot of people want something
with minimal functionality and we could do it with a few
patches. I think there is some sort of plugin architecture in
the rt-mailgate script that might be useful. Have a look if
you have time - it might not be too difficult to do.

A few days ago, I posted a patch (against 3.0.3pre2) to rt-devel – in
hindsight, probably not the best choice of list – that does what you
want (for me, at least… I haven’t heard from anyone else yet :).
You’ll probably want to see that post
(http://lists.fsck.com/pipermail/rt-devel/2003-June/004115.html) for my
notes on it, but I’ve attached the diffs (for 3 files) to this email, as
line wrapping made a bit of a mess of them last time… Curse me for
dumping them into the body of the email!

Hopefully, it’ll be of some use. :slight_smile:

Matthew

diffs.txt (9.27 KB)