Mysql server has gon away

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Abhinay
    New Member
    • Jul 2006
    • 44

    Mysql server has gon away

    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_conn ect() 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
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    The MySQL reference manual has a whole section devoted to that error. Google turns it up as the first hit.

    Comment

    Working...