The server will disconnect idle connections after a while.  The wait_timeout 
variable controls how many seconds it will wait.  You can set it for your 
connection when you connect by issuing a query like:

SET SESSION wait_timeout=NNN;

Just give it a large enough value.

But also, since your program is going to be running continuously, there are 
many other reasons it could lose the connection.  Your program should detect 
the error, and attempt to re-connect.

Regards,
Gavin Towey

-----Original Message-----
From: swaroop jois [mailto:jois_swar...@yahoo.com]
Sent: Monday, May 02, 2011 12:35 AM
To: mysql@lists.mysql.com
Subject: problem

Hello friends, I have  MySQL server version  " 5.0.51a-Ubuntu"  installed on 
Ubuntu 8.04 machine . I would describe briefly what we are doing .
Basically we have built a server that listen to Gprs connection from client  
and accepts data in form packets and inserts that data into MySQL database.I 
run three commands .1.listening to Gprs connection and displaying all the 
received packets on the terminal.2.Number of packets read will showed in Java 
serial forwarder (Tinyos for reference )which listens on another port 3.command 
that invokes Java files  for inserting data into database table .
Initially when i run the command  everything works fine and when he  receive 
packets he is  able to insert data into table in MySQL database .

 He will still be listening on the port  (i.e he is running 24*7)Assume i 
receive data after 12 hrs .i am experiencing the problem of .It may not 
necessarily be 12 hrs .
 If i have to insert data again i have to  recompile the code again and run all 
the commands .
The error that is troubling is Result for query failed.  SQLState = 08003i 
googled the error and found that this Sqlstate indicates connection does not 
exist .
I dont have any clues.Can any one help me please ?
Regards,Swaroop

IMPORTANT: This email message is intended only for the use of the individual to 
whom, or entity to which, it is addressed and may contain information that is 
privileged, confidential and exempt from disclosure under applicable law. If 
you are NOT the intended recipient, you are hereby notified that any use, 
dissemination, distribution or copying of this communication is strictly 
prohibited.  If you have received this communication in error, please reply to 
the sender immediately and permanently delete this email. Thank you.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to