# lost connection to mysql server during query

**URL:** <https://forums.percona.com/t/lost-connection-to-mysql-server-during-query/352>\
**Category:** Other MySQL® Questions\
**Created:** [June 12, 2007, 6:57am UTC](https://forums.percona.com/t/lost-connection-to-mysql-server-during-query/352 "2007-06-12T06:57:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![julian](https://avatars.discourse-cdn.com/v4/letter/j/74df32/32.png) [@julian](https://forums.percona.com/u/julian)\
**Post date:** [June 12, 2007, 6:57am UTC](https://forums.percona.com/t/lost-connection-to-mysql-server-during-query/352/1 "2007-06-12T06:57:55Z")

</div>

HI

I’m running mysql stored procedure using VB as front end. While clicking Ok button in application it calls 3 stored procedures and returns a resultset. First time it works properly. If second time clicked the error ‘lost connection to mysql server during query’ displayed. Third time works fine. Like this alternatively throws error message.

Any one explain What is the reason for this error ‘lost connection to mysql server during query’

---

<div class="post-metadata">

**Author:** ![sterin](https://avatars.discourse-cdn.com/v4/letter/s/3ab097/32.png) [@sterin](https://forums.percona.com/u/sterin)\
**Post date:** [June 13, 2007, 1:45pm UTC](https://forums.percona.com/t/lost-connection-to-mysql-server-during-query/352/2 "2007-06-13T13:45:41Z")

</div>

| [B]julian wrote on Tue, 12 June 2007 14:27[/B] |
| HI Any one explain What is the reason for this error 'lost connection to mysql server during query' |

Read here: [URL="http://dev.mysql.com/doc/refman/5.0/en/gone-away.html"]http://dev.mysql.com/doc/refman/5.0/en/gone-away.html[/URL]

---

<div class="post-metadata">

**Author:** ![julian](https://avatars.discourse-cdn.com/v4/letter/j/74df32/32.png) [@julian](https://forums.percona.com/u/julian)\
**Post date:** [June 14, 2007, 3:48am UTC](https://forums.percona.com/t/lost-connection-to-mysql-server-during-query/352/3 "2007-06-14T03:48:11Z")

</div>

While throwing ‘lost connection to mysql error during query’ following are entries in mysqld.log

mysqld got signal 11;  
This could be because you hit a bug. It is also possible that this binary  
or one of the libraries it was linked against is corrupt, improperly built,  
or misconfigured. This error can also be caused by malfunctioning hardware.  
We will try our best to scrape up some info that will hopefully help diagnose  
the problem, but since we have already crashed, something is definitely wrong  
and this may fail.  
key\_buffer\_size=8388600  
read\_buffer\_size=131072  
max\_used\_connections=1  
max\_connections=100  
threads\_connected=1  
It is possible that mysqld could use up to  
key\_buffer\_size + (read\_buffer\_size + sort\_buffer\_size)\*max\_connections = 225791 K  
bytes of memory  
Hope that’s ok; if not, decrease some variables in the equation.

thd=0xa49e170  
Attempting backtrace. You can use the following information to find out  
where mysqld died. If you see no messages after this, something went  
terribly wrong…  
Cannot determine thread, fp=0xb4bc9f48, backtrace may not be correct.  
Stack range sanity check OK, backtrace follows:  
0x81746a3  
0x237420  
0x827fe95  
0x81dd105  
0x827fe95  
0x8284c1a  
0x82838c4  
0x8283cc5  
0x818f06f  
0x81901e9  
0x8190791  
0x819193c  
0x81923fc  
0x4ea702db  
0x4e9ca14e  
New value of fp=(nil) failed sanity check, terminating stack trace!  
Please read [URL][http://dev.mysql.com/doc/mysql/en/Using\_stack\_trace.html[/URL]](http://dev.mysql.com/doc/mysql/en/Using_stack_trace.html%5B/URL%5D) and follow instructions on how to resolve the stack trace. Resolved  
stack trace is much more helpful in diagnosing the problem, so please do  
resolve it  
Trying to get some variables.  
Some pointers may be invalid and cause the dump to abort…  
thd-\>query at 0xa51e1b0 = SELECT  
Case when ErrorLog \<\> ‘DL’ then a.ErrorLog  
End ErrorLog,b.Imagepath  
FROM  
postingerrorlog a,  
entrycheck b  
WHERE  
a.ImageID = b.ImageID AND  
cdlabel = v\_cdlabel and  
b.ImageID not In(Select  
a.ImageID  
from  
entrycheck a,  
keyqc b  
…  
…  
Union  
select  
‘DUAL START PAGE’ AS ErrorL  
thd-\>thread\_id=1  
The manual page at [URL][MySQL :: MySQL Documentation](http://www.mysql.com/doc/en/Crashing.html%5B/URL%5D) contains  
information that should help you find out what is causing the crash.
