question

Upvotes
Accepted
3 1 2 6

WebException 'Bad Request' randomly, always after data stops streaming

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.

rdp-apirefinitiv-data-platformwebsocketserrorc#
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@vasavi.levendel, Do we have any ERT cloud logs which can help isolate this issue? Have there been any service outages recently?

@jeff.zimniewicz, Can you please confirm that this issue happens when using the provided Python sample code - market_price_edpgw_service_discovery.py ?

This should relate to Service Cloud case 08063522 which contains machine IDs. The recent change is adding data license on Nov 5th.

@jeff.zimniewicz

Hi,

Thank you for your participation in the forum.

Are any of the replies below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the most appropriate reply. This will guide all community members who have a similar question.

Otherwise, if you know a solution, please share it and then accept your answer.

Thanks,

AHS

<AHS>

The case 08063522 was closed. The resolution of the case is

"Issue: requested to add additional permission for Machine id
Cause: NA
Action: Added the services after received the approval. "

Upvotes
Accepted
24.6k 54 17 14

Hello @jeff.zimniewicz

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?

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
3 1 2 6

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:

2019-11-08 00:19:55.6035: Stack:

at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)

at Reuters.Base.ReutersWebSocket.ReceiveMessage()

at Reuters.Base.ReutersWebSocket.ProcessingLoop()


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
3 1 2 6

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.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
24.6k 54 17 14

Hello @jeff.zimniewicz

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?

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.