hsteigstra
Member²
Following a previous post, I now get an error captured with Oracle Monitor:
ORA-01023: Cursor context not found (Invalid cursor number)
It occurs when I run several client applications simultaneously requesting the same query in an Apache module. It occurs after several hundreds successful requests. The SQL is complex, but correct and presents always the same data. All three clients freeze then with a time-out, no other error message on the client side.
My thoughts are that it has to do with multi-threading aspects.
Any idea what causes this problem?
The SQL statement is copied below this message.
Kind regards, Herman
SELECT
decode
lng_id,0,scm_name0,scm_name1) Scheme,
y.srv_id, c.ctr_id, s.scm_id, ctr_name, c.ptp_id, srv_nexternsample nExtern,
srv_startdate StartDate, srv_closingdate CloseDate, scm_mca mca,
lay_id, scm_UseInternalSample Intern, ctr_creatdate, scm_shortname,
decode(e.prs_id,null,0,1) HasSurvey_Status,
decode(q.scm_id,null,0,1) HasSample_Question,
decode(srv_onhold,1,1,decode(svs_validated,0,1,0)) UnValidated,
AnyResultBool(c.scm_id, c.srv_id, c.ptp_id, c.ctr_id) HasResults,
c.prs_id, ctr_validated, PersonName(c.prs_id) Person_validated,
decode(u.prs_id_rp, p.prs_id,1,0) MayValidate,
decode(y.skz_id,null,0,1) SurveyValidated,
decode(dep_id,null,0,1) HasDeepen,
decode(pe.prs_id,null, ps.prs_email, pe.prs_email) Email,
decode(pe.prs_id,null, PersonName(sd.prs_id), PersonName(e.prs_id)) SampleSender,
s.sct_id, svs_evaluation, svs_deepen, srv_onhold, srv_close_deepen
FROM ClusterDef c, Survey y, Subscription u, Location L, Person p, Scheme s,
Survey_status e, Sample_question q, Deepen_survey d,
Scheme_description sd, Person ps, Person pe
WHERE
c.ptp_id=
tp_id AND
p.prs_id=
rs_id AND
y.scm_id=c.scm_id AND
y.srv_id=c.srv_id AND
L.ptp_id=c.ptp_id AND
u.loc_id=L.loc_id AND
u.scm_id=c.scm_id AND
sbs_startdatey.srv_startdate) AND
scm_valid = 1 AND
s.scm_id=c.scm_id AND
e.scm_id(+)=y.scm_id AND
e.srv_id(+)=y.srv_id AND
q.scm_id(+)=y.scm_id AND
q.srv_id(+)=y.srv_id AND
d.scm_id(+)=y.scm_id AND
d.srv_id(+)=y.srv_id AND
sd.scm_id(+)=s.scm_id AND
ps.prs_id(+)=sd.prs_id AND
pe.prs_id(+)=e.prs_id AND
(srv_closingdate>sysdate-(365*2+10) OR
y.srv_id=(SELECT max(srv_id) FROM Survey WHERE scm_id=u.scm_id AND srv_closingdatesysdate-28 AND
NOT EXISTS (SELECT 1 FROM Survey WHERE scm_id=x.scm_id AND srv_id
ORA-01023: Cursor context not found (Invalid cursor number)
It occurs when I run several client applications simultaneously requesting the same query in an Apache module. It occurs after several hundreds successful requests. The SQL is complex, but correct and presents always the same data. All three clients freeze then with a time-out, no other error message on the client side.
My thoughts are that it has to do with multi-threading aspects.
Any idea what causes this problem?
The SQL statement is copied below this message.
Kind regards, Herman
SELECT
decode

y.srv_id, c.ctr_id, s.scm_id, ctr_name, c.ptp_id, srv_nexternsample nExtern,
srv_startdate StartDate, srv_closingdate CloseDate, scm_mca mca,
lay_id, scm_UseInternalSample Intern, ctr_creatdate, scm_shortname,
decode(e.prs_id,null,0,1) HasSurvey_Status,
decode(q.scm_id,null,0,1) HasSample_Question,
decode(srv_onhold,1,1,decode(svs_validated,0,1,0)) UnValidated,
AnyResultBool(c.scm_id, c.srv_id, c.ptp_id, c.ctr_id) HasResults,
c.prs_id, ctr_validated, PersonName(c.prs_id) Person_validated,
decode(u.prs_id_rp, p.prs_id,1,0) MayValidate,
decode(y.skz_id,null,0,1) SurveyValidated,
decode(dep_id,null,0,1) HasDeepen,
decode(pe.prs_id,null, ps.prs_email, pe.prs_email) Email,
decode(pe.prs_id,null, PersonName(sd.prs_id), PersonName(e.prs_id)) SampleSender,
s.sct_id, svs_evaluation, svs_deepen, srv_onhold, srv_close_deepen
FROM ClusterDef c, Survey y, Subscription u, Location L, Person p, Scheme s,
Survey_status e, Sample_question q, Deepen_survey d,
Scheme_description sd, Person ps, Person pe
WHERE
c.ptp_id=

p.prs_id=

y.scm_id=c.scm_id AND
y.srv_id=c.srv_id AND
L.ptp_id=c.ptp_id AND
u.loc_id=L.loc_id AND
u.scm_id=c.scm_id AND
sbs_startdatey.srv_startdate) AND
scm_valid = 1 AND
s.scm_id=c.scm_id AND
e.scm_id(+)=y.scm_id AND
e.srv_id(+)=y.srv_id AND
q.scm_id(+)=y.scm_id AND
q.srv_id(+)=y.srv_id AND
d.scm_id(+)=y.scm_id AND
d.srv_id(+)=y.srv_id AND
sd.scm_id(+)=s.scm_id AND
ps.prs_id(+)=sd.prs_id AND
pe.prs_id(+)=e.prs_id AND
(srv_closingdate>sysdate-(365*2+10) OR
y.srv_id=(SELECT max(srv_id) FROM Survey WHERE scm_id=u.scm_id AND srv_closingdatesysdate-28 AND
NOT EXISTS (SELECT 1 FROM Survey WHERE scm_id=x.scm_id AND srv_id