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