hi all,
I am executing a stored proc that has a top level cursor to loop over a user
set, and then execute certain transactions for each user. After processing
about 5 users, it always generates: ERROR 2013 (HY000): Lost connection to
MySQL server during query. However, if I restart from the same user again,
it processes that user, and then encounters the same error after about 5-6
users. The other interesting thing to note is that this failure occurs at
different points inside the stored proc. In essence, there is no
predictability to this situation.

On further debugging, we found the issue to be bringing the server down, the
stack info for which we are listing below, along with the mysql.cnf
properties.

Any immediate help is greatly appreciated. 

stack info (This is after executing the command resolve_stack_dump -s
/tmp/mysqld.sym -n mysqld.stack )

0x8156750 handle_segfault + 416
0xf4f420 (?)
0x3e49a4 (?)
0x825587d _ZN11sp_rcontext13set_item_evalEP3THDjPP4Item16enum_field_types +
61
0x8252ba6 _ZN12sp_instr_set9exec_coreEP3THDPj + 54
0x8252940 _ZN13sp_lex_keeper23reset_lex_and_exec_coreEP3THDPjbP8sp_instr +
304
0x8252b5e _ZN12sp_instr_set7executeEP3THDPj + 46
0x82504f4 _ZN7sp_head7executeEP3THD + 644
0x825140f _ZN7sp_head17execute_procedureEP3THDP4ListI4ItemE + 1215
0x816ff85 _Z21mysql_execute_commandP3THD + 19413
0x8172880 _Z11mysql_parseP3THDPcj + 304
0x8169d03 _Z16dispatch_command19enum_server_commandP3THDPcj + 1139
0x816983d _Z10do_commandP3THD + 141
0x8168d48 handle_one_connection + 600
0xa1fb80 (?)
0x83d9ce (?) 

my.cnf configiration

------------------------------

#password       = your_password
port            = 3306
socket          = /var/lib/mysql/mysql.sock 

[mysqld]
datadir=/data/mysqldata/
port            = 3306
socket          = /var/lib/mysql/mysql.sock
skip-locking
key_buffer = 200M
max_allowed_packet = 16M
table_cache = 512
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 4M
thread_cache = 8
query_cache_size = 32M
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 4
default-table-type=innodb

innodb_log_group_home_dir = /data/logs/
innodb_log_arch_dir = /data/logs/
innodb_buffer_pool_size = 512M
innodb_additional_mem_pool_size = 20M
innodb_log_file_size = 256M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50
log_error
log_slow_queries

[mysqldump]
quick
max_allowed_packet = 16M 

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[isamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M 

[mysqlhotcopy]
interactive-timeout

Thank you

sujay

Reply via email to