Join the 80,000 other DTN customers who enjoy the fastest, most reliable data available. There is no better value than DTN!

(Move your cursor to this area to pause scrolling)




"I am very happy I changed. I love the product, but more so I am thrilled with Tech Support. You are knowledgeable, polite, pleasant and professional." - Comment from Pat
"It’s so nice to be working with real professionals!" - Comment from Len
"Interactive Brokers tick data was inconsistent, so I have switched to using DTN exclusively. It is great to no longer have to worry about my datafeed all day long." - Comment from Philippe
"Everything is working great ! Very impressive client. The news refreshes better and is more pertinent than the ******* feed I paid $ 100/month for. I Also like the charts a lot." - Comment from Leon
"As a past ******* customer(and not a happy one), IQ Feed by DTN is a much better and cheaper product with great customer support. I have had no problems at all since switching over." - Comment from Public Forum
"Everything is working amazing now. I'm already impressed with the true-tick feed of IQFeed and it's ability to support my 480 symbol layout." - Comment from Tyler via Email
"Version 4.0.0.2 has been working well for me and I appreciate that it is now a much tighter client to work with. I feel I can go to press with my own application and rely on a stable platform" - Comment from David in IA.
"Excellent datafeed !!!" - Comment from Arely
"I just wanted to let u know that your data feed/service is by far the best!!! Your unfiltered tick data is excellent for reading order flow and none of your competitors delivers this quality of data!" - Comment from Peter via Email
"I would just like to say that IQFeed version 4 is running very well and I am very happy with its performance. I would also like to extend a big thanks for the fast and efficient help that I always receive. My questions and concerns are always addressed promptly. Way to go!" - Comment from Josh in CO.
Home  Search  Register  Login  Recent Posts

Information on DTN's Industries:
DTN Oil & Gas | DTN Trading | DTN Agriculture | DTN Weather
Follow DTNMarkets on Twitter
DTN.IQ/IQFeed on Twitter
DTN News and Analysis on Twitter
»Forums Index »Archive (2017 and earlier) »DTN.IQ Client Software Support »Error "Send Failed to Client" in IQConnectLog.txt
Author Topic: Error "Send Failed to Client" in IQConnectLog.txt (6 messages, Page 1 of 1)

tarasov
-Interested User-
Posts: 12
Joined: Oct 24, 2020


Posted: Aug 30, 2021 11:44 AM          Msg. 1 of 6
Hello.

I'm working with QIFeed client on the remote host. When I run a few requests (HIT type) simultaneously, I get in IQConnectLog errors that look like this:
 
STATUS LookupError 292 7 2021-08-29 17:03:35 Queuing HistoryData to Client: Bytes To Send 7243 : Bytes Sent 872 : Bytes Queued 6371
STATUS LookupError 292 7 2021-08-29 17:03:35 Send Failed to Client: Bytes To Send 13690 : Error 10035 : First 256 bytes of data H_0000000000,2021-06-14 04:09:00,16.300,16.250,16.250,16.250,3015,97,0,


But eventually, I get the same data as with one request without errors (I saved it in files and compared). I suppose that after an error in data sending IQFeed sends it again unless I get all the necessary data, but I'm not sure. Can someone confirm that I will get all data I need when I do parallel requests and see errors like this? Or give me some advice where can I read about it, may be some documentation?

DTN_Gary_Stephen
-DTN Guru-
Posts: 394
Joined: Jul 3, 2019


Posted: Aug 30, 2021 04:45 PM          Msg. 2 of 6
That is a classic "queueing" situation.

Error 10035 is socket error WSAEWOULDBLOCK, which basically means that the port is blocked when nothing is instructed to block it. This happens whenever the socket receive block is full, and IQFeed cannot send any more data to it. When this happens, IQFeed will hold onto the data and keep trying to re-send it, until it is able to do so, or until there is such a backlog of data that the IQConnect.exe app crashes.

The message "First 256 bytes of data H_0000000000,2021-06-14 04:09:00,16.300,16.250,16.250,16.250,3015,97,0," is what IQFeed was trying to send at the time.

So to answer your question, yes, IQFeed will hold onto any missed data and re-send it as long as it is able to do so. To minimize this, we recommend the following best practices, in no particular oder:



  • Use multi-threading. There should be different threads in your app to receive the data, parse it, and then act on it.

  • Make messages as efficient as possible. Use the SELECT UPDATE FIELDS command on Level 1 to get only the fields you need. Use tSYMBOL instead of wSYMBOL if you don't need bid/ask updates.

  • Having multiple simultaneous connections to IQFeed can help.

  • Increasing the size of the socket receive buffer can help.



Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist

tarasov
-Interested User-
Posts: 12
Joined: Oct 24, 2020


Posted: Aug 31, 2021 07:36 AM          Msg. 3 of 6
Thank you, for your explanation. I'm already using some of these tips and I will think about others.

tarasov
-Interested User-
Posts: 12
Joined: Oct 24, 2020


Posted: Aug 31, 2021 10:43 AM          Msg. 4 of 6
Can you explain one more thing? In the phrase "Send Failed to Client", does "client" mean my application? Not IQFeed client (IQConnect.exe)?
And where can I find a detailed description of IQConnectLog file?

DTN_Gary_Stephen
-DTN Guru-
Posts: 394
Joined: Jul 3, 2019


Posted: Sep 16, 2021 09:34 AM          Msg. 5 of 6
Yes, "send failed to clilent" means it failed to send to your application, not to IQConnect.exe itself.

There isn't any documentation that further explains the IQConnectLog.txt file, but most of it is straightforward. The important thing is to turn on the right details for the kind of problem you are trying to solve. On the Logging tab of the Diagnostics app, you can select a combation of Level 1, Level 2, and Lookup information as appropriate to what process(es) you want to make a log of. Within each of those groups, "Requests" will log your requests to the API; "Data" will log the API's responses. These will appear in "FROM CLIENT" or "TO CLIENT" messages, respectively. Like this:

FROM CLIENT LookupRequest 6312 16 2020-12-23 17:42:50 HIT,QNG#C,60,20201223 105200,20201223 235959,,,,1

This is a historical API lookup command sent by the user. A response would look like:

TO CLIENT LookupData 6312 16 2020-12-23 17:42:50 2020-12-23 10:53:00,2.698,2.695,2.695,2.695,36869,34,
2020-12-23 10:54:00,2.698,2.696,2.696,2.698,36944,46,
2020-12-23 10:55:00,2.699,2.694,2.698,2.694,37273,87,
...etc...
TO CLIENT LookupRequest 6312 16 2020-12-23 17:42:50 !ENDMSG!,
TO CLIENT LookupData 6312 16 2020-12-23 17:42:50 !ENDMSG!,

This is good for troubleshooting situations where you are getting unexpected results.

"Error" will include any error messages, and it's advisable to include that if you are troubleshooting.

Searching the log file for "error" will turn up any errors that IQFeed detected. A typical one is:

TO CLIENT LookupError 3896 32 2020-12-23 17:54:07 E,Socket Error: 10038 (WSAENOTSOCK).,
!ENDMSG!,

The page https://docs.microsoft.com/en-us/windows/win32/winsock/windows-sockets-error-codes-2 lists all these socket error codes and what they mean. "WSAENOTSOCK" is a common one that means "a socket operation was attempted on something that is not a socket." Which in turn means that the socket wasn't active or wasn't initialized correctly.

"Debug" usually isn't necessary for troubleshooting purposes, unless directed by support. "System" includes internal system messages, which are often helpful but very detailed.

You don't want to log everything willy-nilly, because the file can become very large, and it can consume system resources. It is wise to only enable logging when you are tracking a problem. IQFeed support can also advise you on which elements to include, and can review a log for you.

I hope this is helpful! Let me know if you have any other questions!

Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist

tarasov
-Interested User-
Posts: 12
Joined: Oct 24, 2020


Posted: Sep 19, 2021 11:18 AM          Msg. 6 of 6
It was helpful, thank you very much!
 

 

Time: Wed April 17, 2024 10:09 PM CFBB v1.2.0 8 ms.
© AderSoftware 2002-2003