ReceiveHeader : Net packets out of order : received[0], expexted[1]

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
CFaiga
Posts: 14
Joined: Sun 12 Feb 2006 09:28

ReceiveHeader : Net packets out of order : received[0], expexted[1]

Post by CFaiga » Sun 12 Feb 2006 09:44

some times I get the error message
ReceiveHeader : Net packets out of order : received[0], expexted[1]
My software then stops working

any ideas ?


- Exact version of Delphi : Delphi 7.0 (Build 8.1) Enterprise
- Exact version of MyDAC430d7.exe
- Exact version of MySQL version 5.0.18-win32

swierzbicki
Posts: 451
Joined: Wed 19 Jan 2005 09:59

Post by swierzbicki » Sun 12 Feb 2006 19:59

well, with such few infos, i guess that nobody will be able to help you.
Can you provide an code exemple or better, send to mydac support a simple project demonstrating this. (with mysql database)

CFaiga
Posts: 14
Joined: Sun 12 Feb 2006 09:28

Post by CFaiga » Sun 12 Feb 2006 20:11

This problem happens when the system is very busy
most of my database access is done via stored proceudres

The problem happens when more than one stored proceudre is accessing the database at the same time

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Mon 13 Feb 2006 12:34

Swierzbicki is right. This information isn't enough. First of all please check if this problem appears if you don't use Direct mode. Try to determine what component causes this error (MyQuery, MyCommand etc.), what queries are you executing when this error happens (single or multiple), how much times do you call Execute method without changing SQL property. But the best of all would be sending us complete simple example that demonstrates this error.

earlati
Posts: 18
Joined: Thu 18 Nov 2004 07:37
Location: Bergamo / Italy

Re: ReceiveHeader : Net packets out of order : received[0], expexted[1]

Post by earlati » Tue 14 Feb 2006 08:20

CFaiga wrote:some times I get the error message
ReceiveHeader : Net packets out of order : received[0], expexted[1]
My software then stops working
any ideas ?
Just an hint:
I got this problem when I forgot the same connection inside different thread ( maybe a global connection or just one connection passed as parameter ).
Only a connection in the main program, called by a timer or inside the ActionList.Update method lead to this problem.

I hope this should help

GEswin
Posts: 186
Joined: Wed 03 Nov 2004 16:57
Location: Spain
Contact:

Post by GEswin » Tue 14 Feb 2006 09:06

If you work with threads, you should use a connection for each thread. MyDac isn't thread-safe, this is probably what induces your problem.

CFaiga
Posts: 14
Joined: Sun 12 Feb 2006 09:28

Post by CFaiga » Wed 19 Apr 2006 00:05

If you work with threads, you should use a connection for each thread. MyDac isn't thread-safe, this is probably what induces your problem.

Part of my system is running under Midas

I only have one connection to the database


As the MyDac isn't thread-safe are rthey compatable with Midas ?
what must be done to make them thread safe ?

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Wed 19 Apr 2006 08:40

> As the MyDac isn't thread-safe ...
MyDAC can work in multithreaded applications, so it is thread safe. But the restriction is that you cannot use one component for more than one thread simultaneously.
> are rthey compatible with Midas ?
Yes, MyDAC is compatible with Midas. Please see Midas demo for example.
> what must be done to make them thread safe ?
In your case using one instanse of TMyConnection per thread must be helpful.

CFaiga
Posts: 14
Joined: Sun 12 Feb 2006 09:28

Using MIDAS with MyDac

Post by CFaiga » Thu 05 Apr 2007 14:15

Antaeus wrote:> As the MyDac isn't thread-safe ...
MyDAC can work in multithreaded applications, so it is thread safe. But the restriction is that you cannot use one component for more than one thread simultaneously.

With this limitation

> you can only use one component per thread simultaneously.

In my MIDAS App I have more than one TRemoteDataModule (RDM)
Does this mean I need a Connection for each RDM ?

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Fri 06 Apr 2007 13:21

> Does this mean I need a Connection for each RDM ?
Yes, it does.
Try to use MyDAC's pooling to prevent server overhead. You can read more about pooling in MyDAC Help (TCustomDAConnection.Pooling).
The article that describes how to use pooling was added in MyDAC 5.

iad
Posts: 34
Joined: Fri 24 Nov 2006 07:38

i HAve the same

Post by iad » Thu 12 Apr 2007 15:08

i'm getting in both DBS 2006 and 2007.
ReceiveHeader : Net packets out of order : received[0], expexted[1]
this is mainly when i use Delete SQL and in Disconnect mode
it's very hard to reproduce but for sure there is a problem here and it very annoying.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Fri 13 Apr 2007 11:24

I could not reproduce the problem.
Please try to make a small application that demonstrates it and send it to me at evgeniyD*crlab*com; include script to create and fill table.

Also supply me the following information:
- exact version of MyDAC. You can see it in the About sheet of TMyConnection Editor;
- exact version of MySQL server and MySQL client. You can see it in the Info sheet of TMyConnection Editor.

iad
Posts: 34
Joined: Fri 24 Nov 2006 07:38

Post by iad » Fri 13 Apr 2007 12:01

this become a standard answer guys,
we are you customers not your QA team.
if i could reproduced it each time i would send it already but not, we are handling very complex systems so put an application is not feasible.
couple hints:
1. it happened when i try to delete from already empty table ( no all the time)
2. this is happening in Execute command in TMYQuery
3. it's not happening in version 4

thanks for understanding.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Fri 13 Apr 2007 14:02

It is unlikely that records deleting causes this problem. As a rule, such problems arise on the previous step (a complicated query, or a stored procedure that return more than on resultset). The current step only indicates it.

iad
Posts: 34
Joined: Fri 24 Nov 2006 07:38

Post by iad » Fri 13 Apr 2007 14:34

it happened to me on startup of the system, no query before.
also it happened in disconnect mode only.
i didn't see it in non disconnect mode

Post Reply