i2b2 Sponsored Project/s:
This issue was reported by Robert Lodahl from the University Medical Center Gottingen.
When running multiple parallel queries requesting a PDO, the CRC will return an error. It appears, for all parallel queries run by the custom plugin, the same connection is used.
Upon further investigation, Robert has located the problem to the local temporary tables (like #temp_fact_param_table in this case) are only local for every connection, not per statement. So the first query starts, creating the table, wanting to execute something using this table, while the second query starts and drops the table (marked in bold). Obviously an exception occurs because the table no longer exists.
The ERROR message that appears is:
"Caused by: org.postgresql.util.PSQLException: ERROR: relation "temp_fact_param_table" does not exist“
The exception can be traced back to the part of the code:
edu.harvard.i2b2.crc.dao.pdo.PdoQueryConceptDao.getConceptByFact(PdoQueryConceptDao.java:346)
The section of code that appears to be causing the problem can be seen in the attached document.
ATTACHMENTS:
EMAIL_Parallel_Queries_Error.pdf = original email from Robert.
{"report":{"fcp":485,"ttfb":126.89999999850988,"pageVisibility":"visible","entityId":10960,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":16,"apdex":1,"journeyId":"7761bac2-1b2a-4b52-9038-93385f68ab60","navigationType":0,"readyForUser":539.1999999955297,"redirectCount":0,"resourceLoadedEnd":486.5,"resourceLoadedStart":131.5,"resourceTiming":[{"duration":25.600000001490116,"initiatorType":"link","name":"https://community.i2b2.org/jira/s/7fd763ecdf5ed1f47fc4d22fa8382e97-CDN/4x9nqn/820011/16zrvj4/49fa3aa3d35a2cc689cbf274e66cc41a/_/download/contextbatch/css/_super/batch.css","startTime":131.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":131.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":157.10000000149012,"responseStart":0,"secureConnectionStart":0},{"duration":25.30000000447035,"initiatorType":"link","name":"https://community.i2b2.org/jira/s/898b8076c5e82f53cd816ca393e45a56-CDN/4x9nqn/820011/16zrvj4/f614b50eeb842ebd1ea7ab2903699907/_/download/contextbatch/css/project.issue.navigator,jira.view.issue,jira.global,atl.general,-_super/batch.css?jira.create.linked.issue=true&richediton=true","startTime":131.79999999701977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":131.79999999701977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":157.10000000149012,"responseStart":0,"secureConnectionStart":0},{"duration":60.20000000298023,"initiatorType":"script","name":"https://community.i2b2.org/jira/s/4c9c503fe98f210445831b0d7b0cdc33-CDN/4x9nqn/820011/16zrvj4/49fa3aa3d35a2cc689cbf274e66cc41a/_/download/contextbatch/js/_super/batch.js?locale=en-US","startTime":131.89999999850988,"connectEnd":131.89999999850988,"connectStart":131.89999999850988,"domainLookupEnd":131.89999999850988,"domainLookupStart":131.89999999850988,"fetchStart":131.89999999850988,"redirectEnd":0,"redirectStart":0,"requestStart":131.89999999850988,"responseEnd":192.10000000149012,"responseStart":192.10000000149012,"secureConnectionStart":131.89999999850988},{"duration":75.89999999850988,"initiatorType":"script","name":"https://community.i2b2.org/jira/s/694e598c1ae48b0f96655173631cd247-CDN/4x9nqn/820011/16zrvj4/f614b50eeb842ebd1ea7ab2903699907/_/download/contextbatch/js/project.issue.navigator,jira.view.issue,jira.global,atl.general,-_super/batch.js?jira.create.linked.issue=true&locale=en-US&richediton=true","startTime":132,"connectEnd":132,"connectStart":132,"domainLookupEnd":132,"domainLookupStart":132,"fetchStart":132,"redirectEnd":0,"redirectStart":0,"requestStart":132,"responseEnd":207.89999999850988,"responseStart":207.89999999850988,"secureConnectionStart":132},{"duration":77.59999999403954,"initiatorType":"script","name":"https://community.i2b2.org/jira/s/53f54e0ac3f00bb56b136b4d2fff2853-CDN/4x9nqn/820011/16zrvj4/aae1242f5fc81cc6a5bb8bc963ccda29/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en-US","startTime":132.10000000149012,"connectEnd":132.10000000149012,"connectStart":132.10000000149012,"domainLookupEnd":132.10000000149012,"domainLookupStart":132.10000000149012,"fetchStart":132.10000000149012,"redirectEnd":0,"redirectStart":0,"requestStart":132.10000000149012,"responseEnd":209.69999999552965,"responseStart":209.69999999552965,"secureConnectionStart":132.10000000149012},{"duration":77.90000000596046,"initiatorType":"script","name":"https://community.i2b2.org/jira/s/d41d8cd98f00b204e9800998ecf8427e-CDN/4x9nqn/820011/16zrvj4/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":132.19999999552965,"connectEnd":132.19999999552965,"connectStart":132.19999999552965,"domainLookupEnd":132.19999999552965,"domainLookupStart":132.19999999552965,"fetchStart":132.19999999552965,"redirectEnd":0,"redirectStart":0,"requestStart":132.19999999552965,"responseEnd":210.10000000149012,"responseStart":210.10000000149012,"secureConnectionStart":132.19999999552965},{"duration":78.20000000298023,"initiatorType":"script","name":"https://community.i2b2.org/jira/s/d41d8cd98f00b204e9800998ecf8427e-CDN/4x9nqn/820011/16zrvj4/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":132.29999999701977,"connectEnd":132.29999999701977,"connectStart":132.29999999701977,"domainLookupEnd":132.29999999701977,"domainLookupStart":132.29999999701977,"fetchStart":132.29999999701977,"redirectEnd":0,"redirectStart":0,"requestStart":132.29999999701977,"responseEnd":210.5,"responseStart":210.5,"secureConnectionStart":132.29999999701977},{"duration":78.39999999850988,"initiatorType":"link","name":"https://community.i2b2.org/jira/s/30748292e4ca68be6947d7969829384b-CDN/4x9nqn/820011/16zrvj4/4f66da484ef7d95a2a604d3ab014374c/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":132.39999999850988,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":132.39999999850988,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":210.79999999701977,"responseStart":0,"secureConnectionStart":0},{"duration":78.29999999701977,"initiatorType":"script","name":"https://community.i2b2.org/jira/rest/api/1.0/shortcuts/820011/5c69e534a30b62def7b98bda0f001346/shortcuts.js?context=issuenavigation&context=issueaction","startTime":132.5,"connectEnd":132.5,"connectStart":132.5,"domainLookupEnd":132.5,"domainLookupStart":132.5,"fetchStart":132.5,"redirectEnd":0,"redirectStart":0,"requestStart":132.5,"responseEnd":210.79999999701977,"responseStart":210.79999999701977,"secureConnectionStart":132.5},{"duration":242.79999999701977,"initiatorType":"link","name":"https://community.i2b2.org/jira/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/4x9nqn/820011/16zrvj4/efa42a25652b26dfd802540c024826b3/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-jira.view.issue,-project.issue.navigator/batch.css?jira.create.linked.issue=true&richediton=true","startTime":170.39999999850988,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":170.39999999850988,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":413.19999999552965,"responseStart":0,"secureConnectionStart":0},{"duration":242,"initiatorType":"script","name":"https://community.i2b2.org/jira/s/8087506fefd02b4096991c90836b49f6-CDN/4x9nqn/820011/16zrvj4/efa42a25652b26dfd802540c024826b3/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-jira.view.issue,-project.issue.navigator/batch.js?jira.create.linked.issue=true&locale=en-US&richediton=true","startTime":170.60000000149012,"connectEnd":170.60000000149012,"connectStart":170.60000000149012,"domainLookupEnd":170.60000000149012,"domainLookupStart":170.60000000149012,"fetchStart":170.60000000149012,"redirectEnd":0,"redirectStart":0,"requestStart":170.60000000149012,"responseEnd":412.6000000014901,"responseStart":412.6000000014901,"secureConnectionStart":170.60000000149012},{"duration":247.60000000149012,"initiatorType":"script","name":"https://community.i2b2.org/jira/s/d41d8cd98f00b204e9800998ecf8427e-CDN/4x9nqn/820011/16zrvj4/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":181.29999999701977,"connectEnd":181.29999999701977,"connectStart":181.29999999701977,"domainLookupEnd":181.29999999701977,"domainLookupStart":181.29999999701977,"fetchStart":181.29999999701977,"redirectEnd":0,"redirectStart":0,"requestStart":181.29999999701977,"responseEnd":428.8999999985099,"responseStart":428.8999999985099,"secureConnectionStart":181.29999999701977},{"duration":283.70000000298023,"initiatorType":"script","name":"https://community.i2b2.org/jira/s/d41d8cd98f00b204e9800998ecf8427e-CDN/4x9nqn/820011/16zrvj4/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":189.19999999552965,"connectEnd":189.19999999552965,"connectStart":189.19999999552965,"domainLookupEnd":189.19999999552965,"domainLookupStart":189.19999999552965,"fetchStart":189.19999999552965,"redirectEnd":0,"redirectStart":0,"requestStart":189.19999999552965,"responseEnd":472.8999999985099,"responseStart":472.8999999985099,"secureConnectionStart":189.19999999552965},{"duration":35.899999998509884,"initiatorType":"xmlhttprequest","name":"https://community.i2b2.org/jira/rest/webResources/1.0/resources","startTime":379.29999999701977,"connectEnd":379.29999999701977,"connectStart":379.29999999701977,"domainLookupEnd":379.29999999701977,"domainLookupStart":379.29999999701977,"fetchStart":379.29999999701977,"redirectEnd":0,"redirectStart":0,"requestStart":379.29999999701977,"responseEnd":415.19999999552965,"responseStart":415.19999999552965,"secureConnectionStart":379.29999999701977},{"duration":54.30000000447035,"initiatorType":"script","name":"https://community.i2b2.org/jira/s/d41d8cd98f00b204e9800998ecf8427e-CDN/4x9nqn/820011/16zrvj4/e65b778d185daf5aee24936755b43da6/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-project.issue.navigator,-atl.general/batch.js","startTime":432.19999999552965,"connectEnd":432.19999999552965,"connectStart":432.19999999552965,"domainLookupEnd":432.19999999552965,"domainLookupStart":432.19999999552965,"fetchStart":432.19999999552965,"redirectEnd":0,"redirectStart":0,"requestStart":432.19999999552965,"responseEnd":486.5,"responseStart":486.5,"secureConnectionStart":432.19999999552965},{"duration":25.5,"initiatorType":"xmlhttprequest","name":"https://community.i2b2.org/jira/rest/webResources/1.0/resources","startTime":583.6000000014901,"connectEnd":583.6000000014901,"connectStart":583.6000000014901,"domainLookupEnd":583.6000000014901,"domainLookupStart":583.6000000014901,"fetchStart":583.6000000014901,"redirectEnd":0,"redirectStart":0,"requestStart":583.6000000014901,"responseEnd":609.1000000014901,"responseStart":609.1000000014901,"secureConnectionStart":583.6000000014901}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":60,"connectEnd":87,"secureConnectionStart":74,"requestStart":87,"responseStart":127,"responseEnd":189,"domLoading":130,"domInteractive":586,"domContentLoadedEventStart":586,"domContentLoadedEventEnd":618,"domComplete":834,"loadEventStart":834,"loadEventEnd":835,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":566.7999999970198},{"name":"bigPipe.sidebar-id.end","time":567.5},{"name":"bigPipe.activity-panel-pipe-id.start","time":567.6999999955297},{"name":"bigPipe.activity-panel-pipe-id.end","time":570},{"name":"activityTabFullyLoaded","time":629.6999999955297}],"measures":[],"correlationId":"2981a6688104f6","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":88,"dbReadsTimeInMs":7,"dbConnsTimeInMs":11,"applicationHash":"0629dd8d260e3954ece49053e565d01dabe11609","experiments":[]}}