By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,484 Members | 1,553 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,484 IT Pros & Developers. It's quick & easy.

Mysql server has gon away

P: 44
hi,

I have created echo server whose task is to receive client request using socket and make inset into mysql database, for database connection I have use 'Mysql C' library, my server have dedicated thread to process each client request ( using connection pool ).

My question is while inserting into mysql database in multithreaded fashon ( number of thread >= 100 simultaneously ) I get some time "Mysql server has gon away" error and some time it inserts properly. I did't get reson behind its unpredictable behavior, Definatly databae is connected because database is on my same machine. I repeate testing multiple times but i got same results.

I am using C++ on linux
for database connection i have use mysql_real_connect() API and for insert records I have use mydql_query() API.

As per my database setting it can handle 1000 connection simultaneously.

your help will make me happy.

Thank you
abhinay
Nov 5 '08 #1
Share this Question
Share on Google+
1 Reply


10K+
P: 13,264
The MySQL reference manual has a whole section devoted to that error. Google turns it up as the first hit.
Nov 6 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.