Unable to get Data on Demand: Internal Server Error 500
Author: bill_080
Creation Date: 2/3/2014 4:02 PM
profile picture

bill_080

#1
I have been running a script for several months without the following problem. The problem started on January 21, 2014 and happens randomly, multiple times a day. The error is:



"The remote server returned an error: (500) Internal Server Error.
Unable to get Data on Demand for symbol: VXZ"



The script below (a stripped down version is shown below) is run on Fidelity 1-minute data. It calls up five symbols, and the script is run on symbol XIV. Any one of the six symbols will show up randomly (so far, 2 to 7 times a day) in the above error message.

I have called Fidelity to explain the problem, and they directed me to this forum. I have seen older postings of a similar problem on this forum. All postings end where the user is redirected to Fidelity, because this is a Fidelity data problem. I explained that to the Fidelity rep, but he insisted that I post the problem here first.

Anyway, the following script is a stripped down version of my original script, but it also gets the same error message several times a day.

Can someone on the forum run this script to see if you get the same error? The Fidelity rep said he will be watching the forum for a response.


Thanks,
Bill


CODE:
Please log in to see this code.
profile picture

Eugene

#2
What happens here is that one of the Fidelity's servers is returning this error code - not Wealth-Lab which only retranslates it to the user. The 500 Internal Server Error is a very general error code that indicates that there's an issue on the the web server side. It could be a temporary condition.

Let's see if the problem can be partially alleviated by disabling "Update data on demand" in the Data Manager.
profile picture

bill_080

#3
Eugene, thanks for the quick reply.

The market is closed right now, but I'll try disabling "Update data on demand" tomorrow.

I tried to explain to the Fidelity rep that this was not a WealthLab problem. It is a Fidelity 1-minute server problem (most likely due to a server bounce, changed timing parameters, or an original data provider upgrade) on Fidelity's end. Afterall, isn't "error 500" a generic Apache server error? I was hoping he would alert Fidelity's "data server room", but he wouldn't have any of it. My guess was/is, that the servers can't keep up such that if the call for those six symbols hasn't been satisfied before the next 1-minute cycle calls for those symbols, the servers will detect a collision and dump out the error message.



profile picture

bill_080

#4
Before the market opened, I disabled "Update data on demand". In the first 30 minutes of trading, the same "error 500" message as above showed up twice.

While I was writing the above sentence, the message came up a third time. I doubt if the "Update data...." change made it worse, but so far today, the problem seems to be worse than any of the previous days. It looks to me like Fidelity has some serious server issues.

Is there anything else to try, or is this the end of the road?
profile picture

bill_080

#5
The final count for "error 500" messages for yesterday (02/04/2014) was six. The range for the error count before yesterday's change was 2 to 7. So, as of right now, it looks like the change didn't make things better or worse.
profile picture

Eugene

#6
How much is the script above stripped when compared to your original Strategy?
profile picture

bill_080

#7
The original strategy, including comments and the "using" lines at the top, is 490 lines long. The stripped version shown above, including comments and the "using" lines at the top, is 63 lines long.

Both generate "error 500" messages.

The count for "error 500" messages today (02/05/2014) was five. Again, this started on Tuesday, January 21st (January 20th was a holiday). Everything worked fine up through Friday, January 17th, and had been working for months. I tried to tell the Fidelity rep to ask their server guys about what they changed over that weekend, but he insisted on going a different direction.
profile picture

sofia

#8
Hi,

I had a similar problem with latest version of wealthlab-pro. I moved to a new machine few days ago and downloaded the latest wealthalab software and I started getting many error messages related to "error-500" whenever I used indices with ".XYX" ex .vix, .vxv .spx etc.
With .vix it was so bad that I could not simultaneously run 2 strategies that used ".vix" in it.

Then I switched back to my older version on (6.5) which was still installed on old machine, and it seems to be working fine.
So I ignored the problem, till I saw your post.
You may want to try the earlier version of wealthlab-pro and check if you still get errors.
I don't know how do you download the earlier version.

I was not sure if it was machine related or version related, but Fidelity streaming data seems to be working fine with earlier version.

Thanks,

Sofia


profile picture

Eugene

#9
Sofia,

Your input is certainly interesting. Please call Fidelity and let them know about your Error 500 trouble with the Fidelity indices in recent WLP version 6.6 (as opposed to 6.5).
profile picture

Cone

#10
Apart from the on-demand error (I'll try to look at that today), accessing external symbols in streaming strategy will not guarantee that you get it's latest update. When the base symbol is updated, the script runs, and creates an on-demand request for the external symbols, which may not yet be updated in the backend historical server.

To work around this, you need to add a delay at the beginning of the script, perhaps 10 seconds to give the back end history a chance to update before requesting the latest bar. This statement should do it:

CODE:
Please log in to see this code.


Another option is to run the Strategy in the S. Monitor, where probably a smaller delay can be used.
profile picture

Eugene

#11
Re: Sleep. I was wrong thinking that this FAQ might have lost its actuality... What is optimal for my trading, Strategy Monitor or Strategy window?
profile picture

Cone

#12
As I recall from testing this last year, generally you can expect all "streaming bars" to arrive within 8 - 10 seconds of the end of interval for 1 to 5 minute charts. The delay will be longer for the larger intervals as they're built on the back end. Consequently, to avoid race conditions, I'd probably still use a 2 second delay even in the S. Monitor.
profile picture

bill_080

#13
The market just closed. I had two "error 500" messages today (02/06/2014).

I just added the "sleep(10000)" line at the top of my code. We'll see what happens tomorrow.
profile picture

JWD

#14
I think am having a similar problem. I have been getting the same error message every day for about two weeks now and it affects a live pair strategy I've been running. The strategy calls for entering a position at the market open, placing a stop loss in the next bar, and then, assuming the position holds throughout the day, cancelling the stop loss and placing a market sell order at EOD (last bar). Entering the position in the morning is not a problem. But the EOD trade has not been working. I have been running the strategy for about a year with no problems before this. I seem to be logged in to Fidelity still at EOD but I did notice the text at the lower left hand side of the screen which read "Guaranteed alerts NOT available," whereas when I am properly logged in this text usually reads "Guaranteed alerts are available." Could it be that Fidelity is passively logging me out somehow due to inactivity? (similar to what happens if you leave WLP on overnight and don't re-login in the morning?)
profile picture

sofia

#15
Hi,

I called Fidelity tech support and told them about the error. They said they will look into it.
Last 2 trading days, I tried using WL6.6 and during and after market time, and I still get same errors "error-500".

How do I download earlier version of Wealth-Lab-Pro, i.e 6.5. I want to test if this version works on my new machine.


Thanks,
Sofia
profile picture

Eugene

#16
You can't download WLP 6.5 or any previous version. What you can do is to try finding it among the already existing installers. Here's how to downgrade to 6.5. First, uninstall 6.6.20, and then click through the cached installation files to find the desired MSI file:

in XP:
C:\Documents and Settings\[user who installed]\Local Settings\ApplicationData\Downloaded Installations

in Vista/Win7/Win8
C:\Users\[user who installed]\AppData\Local\Downloaded Installations\
profile picture

sofia

#17
Hi Eugene,

If I try to uninstall6.6.20, will it also delete all my trading strategies?

Thanks,
Sofia
profile picture

Cone

#18
No, of course not. Nothing in the user's data folder will be touched. (But you should have a backup of that folder anyway for other reasons.)
profile picture

sofia

#19
Thanks Cone.
I was able to install earlier version (6.5) on new machine and am not getting those error messages so far.

Regards,
Sofia
profile picture

Cone

#20
Keep us up-to-date then. It would be a pretty strange coincidence for that error to be related to a client app.
profile picture

sofia

#21
Hi Cone,

My old machine:
Windows Vista, Intel(R),premium dual CPU 2.40Ghz, system type 64bit.
Had no problem with data on demand or internal-server-500 error with stocks or indices or with multiple strategies.
I had wl-6.5 installed,

My new machine
Windows8.1, AMD A6-5200 APU, 64bit operating with 64 based processor
with wl6.6 had lot of problems with data on demand and internal-server-500 error. It was so bad that simulation would just stop and new bars would not get updated, unless I did it manually using stream switch,

with wl6,5 I could run scripts without problems, so far it is working fine. But occasionally has problems with data on demand if I run multiple
strategies. If I run just one strategy then it runs fine.

In short I was unable to run wl6.6 on new machine, and wl6.5 runs fine with occasional problems (less than 10%) of time with indices.

Regards,
Sofia


This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).