05-20-2013 04:30 AM - edited 05-20-2013 04:34 AM
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
Solved! Go to Solution.
05-20-2013 05:01 AM
Can you post your VI
05-20-2013 05:01 AM
What message you are getting can you snapshot it
05-20-2013 09:26 AM
here is the screen shot and thanx a lot
regards
05-20-2013 10:13 AM
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.
05-20-2013 10:20 AM - edited 05-20-2013 10:21 AM
@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)
05-20-2013 02:45 PM - edited 05-20-2013 02:48 PM
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
05-20-2013 02:52 PM
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.
05-27-2013 11:42 AM
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
06-04-2013 02:21 AM
Dear altenbach, NI
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