LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TCP IP Not enough memory

Solved!
Go to solution

I am making tcp ip application at client side my executeable (not in development mode as i have test my development mode my client application doesnot shows not enough memory but in .exe application it shows not enough memory very soon.) Is there any solution to this i have also added delay at write side. one more thing my usuall data packet size is 200 to 300 bytes. and some time i got a large data to b recieved like 589513793 bytes.

one more thing my executeable perform well on desktop rather than laptop and win xp than win 7.

 

thanx in advance for time and help

 

regards

0 Kudos
Message 1 of 10
(5,615 Views)

Can you post your VI

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 2 of 10
(5,606 Views)

What message you are getting can you snapshot it

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 3 of 10
(5,604 Views)

 

here is the screen shot and thanx a lot

 

 

not enough memory.jpg

 

 

regards

 

0 Kudos
Message 4 of 10
(5,571 Views)

How do you get that large number of bytes? Is it returned by any LV function or do you read it from the TCP stream? And how do you manage it when received? Please post your vi or at least a picture of the relevant code.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 5 of 10
(5,563 Views)

@mazhar.ali wrote:

I am making tcp ip application at client side my executeable (not in development mode as i have test my development mode my client application doesnot shows not enough memory but in .exe application it shows not enough memory very soon.) Is there any solution to this i have also added delay at write side. one more thing my usuall data packet size is 200 to 300 bytes. and some time i got a large data to b recieved like 589513793 bytes.


~600MB is a lot of data and should shold not try to store it in memory, but e.g. stream it directly to disk. How are you processing it? Are you trying to display it all? Are you casting it to arrays (which needs contiguous free memory which is unlikely after a little bit of use)? Are you building the received data inside a shift register, constantly reallocating new data? Are you using local variables?

 

Is the OS 64 or 32 bit? Are you using LabVIEW 32 or 64 bit? How much RAM do you have?

 

We really need to see your code. A delay simply slows things down (and naturally the out of memory will occurs not as quickly, by that's a pointless exercise! Why don't you add an infinite delay and it will never run out of memory ! :D)

Message 6 of 10
(5,560 Views)

I am very sorry that big number is not the bytes to be recieved, at my sending end i am sending the 4 byte size of originl packet then the data some time my size packet didnot reached and i read the first 4 bytes of my data which are my header (##DATA) when i type cast that string to integer it gave that number which i have qouted. once again extremely sorry for this blunder.

 

My system specs are as follow

 

Core i5 (acer aspire 5749), OS is 64 bit Win 7, 32 bit LabVIEW 8.6.1 and 4 GB of RAM.

 

My application scheme is multi client to achieve this i use 1)listner which listens on port and when 2) client make connection listner launch 3) server vit which gets the connection id and start transfer data to client at demand from client demand is when we press connect button and after some interval. i am attaching the listner, client and server. another thing is that if iam using client in .vi it works fine and if we use client in .exe (application) it gives that not enough memory error.

 

 thanx a lot for your time and consideration...

 

regards

 

 

Download All
0 Kudos
Message 7 of 10
(5,520 Views)
Solution
Accepted by topic author mazhar.ali

Why do you use a timeout on the TCP read function? Chances are hight that you lose your framing and reading the four bytes could be from the data packet, depending how things are racing. Try to set all TCP timeouts to -1.

Message 8 of 10
(5,508 Views)

thanx a lot sir

 

Due to my server client scheme, i cant add -1 time out in my client side in read tcp functions, so i have increased my delay to 5 secs (from 100 ms) for size read and 10 secs (from 100 ms) for data read, and also increase some delay at server side while writing data this solved my problem (now not enough memory occur after a long time or now the situation is far far better than before.)

I am busy nowadays in some assignments after that i will change my scheme, your guidence will be highly apperiated please suggest me some right and simple scheme as you can guess from my code that what i want to do.

my client sends data request after some periodic time to server than server sends data. simply my problem is to make multi client server and clients recieve data after some periodic time and data is 2 d string array.

 

regards

 

0 Kudos
Message 9 of 10
(5,432 Views)

Dear

 

Kindly suggest me some better scheme as i have mentioned that i want to change my scheme for avoiding "not enough memory".

now i am free for changing my scheme and i have posted the code which i was using. please give me some nice idea, thanx in advance for your time and consideration.

 

regards

0 Kudos
Message 10 of 10
(5,358 Views)