I'm using the WebSocket API's to connect to EDP data for Futures FX and Equities. Over the last 3 days at random intervals I stop receiving data over the WebSocket and on the next re-auth attempt I get an exception back from the WebSocket client with the "returned an error (400) bad request" message.
The request I'm making is no different than the hundreds before it that succeeded.
There are 2 major problems - 1) we stop getting data and 2) there is no good way to know in the code until the next returh attempt where I receive the bad request message. Please note that I am still pinging back and forth on the open connection.
I don't know what other information I can provide - this is not the first time we've seen thsi but it is now happening every day. We are still having entitlments added/changed so I also want to make sure it's not just a function of that causing this problem.
I believe if I completely shutdown everything internally, reconnect with a clean connection and resub I will continue to get data, but there will be a gap in the data at this point.
Based on the question hashtag, I assume you are using C# language. Could you please confirm if the issue happens with the C# MarketPriceEdpGwAuthenticationExample example? You can download the C# example from Elektron WebSocket API download page and GitHub.
Additionally, can give me the .Net and related libraries versions?
You are correct this is C#. I'm using .NET 4.6.1 and this is running on Windows 2012 Server R2.
This problem is not happening with our FX data feed which is subscribing to around 75 symbols. Our Futures piece is subbing to ~600 symbols and this is happening several times a day.
The feed handler was based around the Example you mention above. I can have that app make the same number of symbol subscriptions as our Futures handler but again the base code is the same as that application.
I'm able to reconnect just fine when running locally (Windows 10) but on the server the reconnect is able to re-sub to symbols, receives the errors (still some permission errors on our symbols as well as a few contracts out of date) but immediately after those messages are processed this line in the ReceiveMessage() function continuously throws an exception:
if( !result.Result.EndOfMessage )
2019-11-08 00:19:55.6035: Message: One or more errors occurred.
2019-11-08 00:19:55.6035: Stack:
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
On a related note - I was able to see this happen in a scenario where very little data (1 equity) was being processed. This appears to be completely random but I wanted to correct the comment from above thinking this was related to high volume.
Does the problem still persist in your environment? Could you please give me the json request message that encounters the "returned an error (400) bad request" error? Is it from the HTTP REST call (for authentication, service discovery) or WebSocket call?