problem

problem

am 02.05.2011 09:34:36 von swaroop jois

--0-763634336-1304321676=:97873
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

Hello friends,=A0I have =A0MySQL=A0server version =A0" 5.0.51a-Ubuntu" =A0i=
nstalled=A0on Ubuntu 8.04 machine . I would describe briefly what we are do=
ing .
Basically we have built a server that listen to Gprs connection from client=
=A0and accepts data in form packets and inserts that data into=A0MySQL=A0d=
atabase.I run three commands .1.listening to Gprs connection and=A0displayi=
ng=A0all the received packets on the terminal.2.Number of packets read will=
showed in=A0Java=A0serial forwarder (Tinyos for reference )which listens o=
n another port=A03.command that invokes Java files =A0for inserting data in=
to database table .
Initially=A0when i run the command =A0everything works fine and when he =A0=
receive packets he is =A0able to insert data into table in=A0MySQL=A0databa=
se .

=A0He will still be listening on the port =A0(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 .
=A0If i have to insert data again i have to =A0recompile the code again and=
run all the commands .
The error that is troubling is=A0Result for query failed. =A0SQLState =3D 0=
8003i googled the error and found that this Sqlstate indicates connection d=
oes not exist .
I=A0dont=A0have any clues.Can any one help me please ?
Regards,Swaroop=A0
--0-763634336-1304321676=:97873--

Re: problem

am 02.05.2011 22:15:57 von mr.criptos

--00151747849e02216e04a250b168
Content-Type: text/plain; charset=ISO-8859-1

Seems more a java issue than a mysql issue... check for your parameters for
any keepalive or persostent option...

I think you wouldn't need to recompile just re-run or at leat, reboot the
server..



On Mon, May 2, 2011 at 2:34 AM, swaroop jois wrote:

> 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

--00151747849e02216e04a250b168--

Re: problem

am 03.05.2011 00:57:33 von Carlos Proal

Swaroop:

How are you handling the connections to db ? only one, with a pool,
something adhoc ?.
It looks like the connection is only one and expires after a time out
and you get the error that there is no connection.

Carlos

On 5/2/2011 3:15 PM, Andrés Tello wrote:
> Seems more a java issue than a mysql issue... check for your parameters for
> any keepalive or persostent option...
>
> I think you wouldn't need to recompile just re-run or at leat, reboot the
> server..
>
>
>
> On Mon, May 2, 2011 at 2:34 AM, swaroop jois wrote:
>
>> 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


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

RE: problem

am 12.05.2011 20:38:54 von Gavin Towey

The server will disconnect idle connections after a while. The wait_timeou=
t 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=3DNNN;

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 dete=
ct the error, and attempt to re-connect.

Regards,
Gavin Towey

-----Original Message-----
From: swaroop jois [mailto:jois_swaroop@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 o=
n 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 databas=
e.I run three commands .1.listening to Gprs connection and displaying all t=
he 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 receiv=
e 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 r=
eceive data after 12 hrs .i am experiencing the problem of .It may not nece=
ssarily 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 =3D 08003=
i 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 individua=
l to whom, or entity to which, it is addressed and may contain information =
that is privileged, confidential and exempt from disclosure under applicabl=
e law. If you are NOT the intended recipient, you are hereby notified that =
any use, dissemination, distribution or copying of this communication is st=
rictly prohibited. If you have received this communication in error, pleas=
e 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=3Dgcdmg-mysql-2@m.gmane.o rg

Re: problem

am 13.05.2011 12:59:21 von Johan De Meersman

----- Original Message -----
> From: "Gavin Towey"
>
> 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.

That will, of course, work; but it has as side effect that improperly terminated connections (application crash, ...) will stay around for that time, too.

It is better to have your connection (-pooling) code be aware of connection timeouts, and have it transparantly reconnect. If I recall correctly, the client library has a ping() function or something similar.


--
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org