I’ve seen this type of simulation error report several times today. Has anyone else had the same problem?
INSERT INTO userdata…portfolio_hist_val (portfolio_uid, dt, cash, market_val, cash_added, pct_chg, tot_ret, mktval_short, cash_accrued, mktval_hedge, mktval_long, num_pos) VALUES (?, ?, ?, ?, 0, ?, ?, ?, ?, ?, ?, ? );Violation of PRIMARY KEY constraint ‘IDX_portfolio_hist_val’. Cannot insert duplicate key in object ‘dbo.portfolio_hist_val’.;000000050159BFB0
I also had sims show equity curves going to zero. Rerunning the sim causes the problem to disappear.
Walter
It looks like you’re the only user experiencing this issue today. I’ve seen this come up a few times; it’s probably time to fix it already. Can you tell me a little more about what you’re doing? E.g. re-running, changing the system, saving as a new simulation. If you encounter this again, keep the defunct model. Maybe it will help me see if I can find exactly what’s going on here. Until then I’ll look over the source to see if I can find what’s occasionally producing duplicate dates for simulations.
Aaron,
I’m just altering universe constraints and rerunning. If the error returns, I’ll keep the bad sim for your inspections.
Walter
WalterW
November 8, 2018, 10:36pm
4
The error is back. It’s from a simulation launched from an optimizer study. The sim is;
https://www.portfolio123.com/port_sim_go.jsp?1541720026168
INSERT INTO userdata…portfolio_hist_val (portfolio_uid, dt, cash, market_val, cash_added, pct_chg, tot_ret, mktval_short, cash_accrued, mktval_hedge, mktval_long, num_pos) VALUES (?, ?, ?, ?, 0, ?, ?, ?, ?, ?, ?, ? );Violation of PRIMARY KEY constraint ‘IDX_portfolio_hist_val’. Cannot insert duplicate key in object ‘dbo.portfolio_hist_val’.;00000006E4F1F4A0
Again today;
INSERT INTO userdata…portfolio_hist_val (portfolio_uid, dt, cash, market_val, cash_added, pct_chg, tot_ret, mktval_short, cash_accrued, mktval_hedge, mktval_long, num_pos) VALUES (?, ?, ?, ?, 0, ?, ?, ?, ?, ?, ?, ? );Violation of PRIMARY KEY constraint ‘IDX_portfolio_hist_val’. Cannot insert duplicate key in object ‘dbo.portfolio_hist_val’.;00000006E1BD6400
https://www.portfolio123.com/port_summary.jsp?portid=1550039
primus
November 9, 2018, 7:28pm
6
Now I got it:
INSERT INTO userdata…portfolio_hist_val (portfolio_uid, dt, cash, market_val, cash_added, pct_chg, tot_ret, mktval_short, cash_accrued, mktval_hedge, mktval_long, num_pos) VALUES (?, ?, ?, ?, 0, ?, ?, ?, ?, ?, ?, ? );Violation of PRIMARY KEY constraint ‘IDX_portfolio_hist_val’. Cannot insert duplicate key in object ‘dbo.portfolio_hist_val’.;00000006EC6D8130
Devs ref: https://www.portfolio123.com/port_sim_go.jsp?1541793172683
We think was just an intermittent problem due to some testing that we were doing internally. Let me know if it crops up again.
davidbv
November 10, 2018, 4:04pm
8
I just got this error when trying to run a sim from an existing port:
davidbv
November 10, 2018, 4:06pm
9
And I just recompiled and it went away…
davidbv
November 10, 2018, 4:15pm
10
It is consistently giving an error the first time you create a simulation from an existing port.
I just created 4 different sims from 4 existing ports and got the error the first run on all of them.
For each, I then hit the back button and then hit Re-Simulate. All 4 successfully created the sim.
Something is broken.
I just created a sim from scratch and got the same error. The error happens first time only.
Steve
WalterW
November 11, 2018, 5:18pm
12
The DB was seen several times today. Each case was from a new simulation generated from an Optimizer run.
aschiff
November 12, 2018, 4:24pm
13
I believe it should be working properly now.