Stream: pascal
Topic: Terminology Server
Alexander Kiel (Aug 13 2019 at 15:56):
We like to host our own FHIR Terminology Server. According to the CapabilityStatement, tx.fhir.org is run by the Reference Server. If so, is there an simple way to deploy the reference server, say through a Docker container? Or are there other options to run a Terminology Server?
Grahame Grieve (Aug 13 2019 at 21:22):
you can download and install it from http://www.healthintersections.com.au/FhirServer, but the process is not as smooth as it should be. Contributions welcome....
Jose Costa Teixeira (Aug 14 2019 at 02:09):
i did have a "portable / no install" version of the fhir server. is that useful?
Grahame Grieve (Aug 14 2019 at 02:21):
Not sure. The install doesn’t do that much
Alexander Kiel (Aug 14 2019 at 08:02):
@Grahame Grieve Thanks. Does it only run under Windows or is Linux also possible with some work?
Grahame Grieve (Aug 14 2019 at 08:38):
it's possible, but it's more than a little work
Alexander Kiel (Aug 14 2019 at 08:56):
According to https://wiki.hl7.org/Open_Source_FHIR_implementations there is not really an Open Source terminology server available. Is that right?
Jose Costa Teixeira (Aug 14 2019 at 09:19):
I do not recall the details, but there is a VocabTxServer in Grahame's server tools that is open source
Jose Costa Teixeira (Aug 14 2019 at 09:21):
@Alexander Kiel what is your need? Perhaps we need the same thing at Belgium and then i can help with the effort of getting it running.
Alexander Kiel (Aug 14 2019 at 09:33):
Currently I need ValueSet $expand to determine the CodeSystem of plain codes like gender with ValueSet binding. I like to host such a server myself because we also have our own custom ValueSets and I'm not sure whether tx.fhir.org is considered production ready.
Jose Costa Teixeira (Aug 14 2019 at 09:36):
Grahame can advise on the servers and the maturity, but I will take a look at the terminology server meanwhile
Jose Costa Teixeira (Aug 14 2019 at 09:47):
but AFAIK Grahame's open source server is the one that is running in tx.fhir.org
Grahame Grieve (Aug 14 2019 at 20:37):
- tx.fhir.org is fully open source
- The install is a little messy, yes, but it works otherwise
- the code is production ready from my pov.
- but tx.fhir.org is not for production use; I (and @Rob Hausam ) feel free to take it down at any time that suits us
Grahame Grieve (Aug 14 2019 at 20:39):
Note that you need delphi to compile the server (the free version is sufficient). but the free version doesn't cover osx/unix - that's expensive. It's been my intent to get it compiling under freepascal / Lazarus, but there's a bit where it was supposed to work under fpc 3.0, but doesn't, and I haven't had time to get it sorted...
Rob Hausam (Aug 14 2019 at 21:51):
I've recently gone through the steps to get it set up and compile it, so if I can help with anything let me know.
Alexander Kiel (Aug 15 2019 at 16:44):
@Grahame Grieve @Rob Hausam Thanks for your work. I'll try to run the server from http://www.healthintersections.com.au/FhirServer/ under Windows.
Jose Costa Teixeira (Aug 20 2019 at 10:55):
I am getting an issue converting loinc cache. or using the cache already in the download page (v261).
Rob Hausam (Aug 20 2019 at 18:51):
Not sure what you're trying to do, @Jose Costa Teixeira.
Jose Costa Teixeira (Aug 20 2019 at 18:56):
Just trying to get the tx server to run locally. It says it needs the loinc cache which needs to be regenerated using serverutils.exe
Jose Costa Teixeira (Aug 20 2019 at 18:57):
And I cannot walk through the code because the current commit has an issue (on my machine)
Rob Hausam (Aug 21 2019 at 13:07):
Got it. I've compiled but haven't tried to stand up an instance de novo, so hadn't run into that requirement. Yes, you use the FhirServer Tools LOINC Import to create the LOINC cache (from the distribution). I can help you work through that if you want.
Jose Costa Teixeira (Aug 27 2019 at 06:28):
I would like that. Is there any functional description of what the terminology server does?
Jose Costa Teixeira (Aug 27 2019 at 06:28):
for example, how does it fit in this
https://confluence.ihtsdotools.org/display/FHIR/Features+of+Known+Servers
Jose Costa Teixeira (Aug 28 2019 at 18:49):
@Rob Hausam I did what ou suggested (and IIRC i had successfully done before) but not it ain't working
Jose Costa Teixeira (Aug 28 2019 at 18:50):
@Grahame Grieve FHIR.Server.Context.pas lines 323 (and 324 and 325) are missing something
Jose Costa Teixeira (Aug 28 2019 at 18:50):
(i think)
Jose Costa Teixeira (Aug 28 2019 at 18:52):
what i saw: Upon server initialisation, TxServerFormUnit calls
ctxt := TFHIRServerContext.Create(store.Link, nil);
(line 427)
Jose Costa Teixeira (Aug 28 2019 at 18:55):
but TFHIRServerContext.Create needs serverFactory to be assigned:
constructor TFHIRServerContext.Create(storage: TFHIRStorageService; serverFactory : TFHIRServerFactory); ... FValidator := serverFactory.makeValidator; FValidatorContext := FValidator.Context.link; FIndexes := TFHIRIndexInformation.create(FValidatorContext.factory.link, ServerFactory.link);
Grahame Grieve (Aug 28 2019 at 19:25):
how are you running this?
Rob Hausam (Aug 28 2019 at 19:31):
Jose and I were just discussing getting together on Friday to go over the issues that he's having. But if you have thoughts or solutions now that's great.
Grahame Grieve (Aug 28 2019 at 19:36):
not sure... I guess you're running the vocab server?
Jose Costa Teixeira (Aug 28 2019 at 20:35):
yes, trying to
Jose Costa Teixeira (Sep 02 2019 at 08:09):
ok I learned that I was talking about something different. I was looking at the Voc TX POC thing, ut i understand now that the terminology server features are built in the main FHIR server. is that correct?
Grahame Grieve (Sep 02 2019 at 10:59):
it is. that should be what you generally use, not the vocab one, which is for a special purpose
Jose Costa Teixeira (Sep 02 2019 at 11:00):
ok thanks
Jose Costa Teixeira (Sep 03 2019 at 11:30):
It seems that the FHIR server configuration is changed (ini files etc). My "PortableFhirServer" no longer works...
I will try to get it back to a working state. Any advice what to look for?
Grahame Grieve (Sep 03 2019 at 18:55):
I have made no changes in anything like that
Jose Costa Teixeira (Sep 03 2019 at 19:06):
ok i start digging
Christoph Dolch (Sep 05 2019 at 08:12):
I try to install the terminology server (fhirserver 1.0.288) on Win 7 Enterprise and got some problems:
First I installed the visual c++ redistributables which the installer recomments and rebooted the system, but vcredist is still not detected from the installer.
After configuration of database-server the installer informs "databse exists but is not initialized".
The 2 optional package for initialization of the database are not available (1 shows 'Socket error 10060' and 2 shows 'connection timeout'). We have a proxy server activated, could be the reason for this?
vc-not-detected.PNG db-init.PNG
Grahame Grieve (Sep 05 2019 at 08:24):
yes proxy server problem there. I'm not sure what do about that
Christoph Dolch (Sep 05 2019 at 08:38):
i will ask someohne without proxy in the network to try the installation. later we will run on a real server, i just want to tryout how dificult the installation is.
i also got an error from MySQL-service (MySQL CE 5.7) because of the line
innodb_flush_method = O_DIRECT
which is described in the manual http://www.healthintersections.com.au/wiki/index.php?title=Install_FHIR_server_with_MySQL under
section 2b.
error-message in windows-log was: InnoDB: Unrecognized value O_DIRECT for innodb_flush_method
I removed this line and hope it is not very importend
Jose Costa Teixeira (Sep 05 2019 at 09:48):
innodb_flush_method should not matter
Jose Costa Teixeira (Sep 05 2019 at 09:49):
@Christoph Dolch are you using mysql or mariadb?
Jose Costa Teixeira (Sep 05 2019 at 09:51):
I think my recent issues may also be due to the database/odbc/vc++redist... stack. I will investigate
Grahame Grieve (Sep 05 2019 at 10:14):
I have no idea what innodb_flush_method is or where it enters the picture
Jose Costa Teixeira (Sep 05 2019 at 10:53):
it is for the mysql / mariadb setup
Grahame Grieve (Sep 05 2019 at 10:55):
but is it from something we do? where?
Jose Costa Teixeira (Sep 05 2019 at 10:55):
when i was starting to use mysql there was some tuning needed in my.ini, so I guess that is just a copy-paste leftover. I remember I trimmed down as much as possible at the time.
Grahame Grieve (Sep 05 2019 at 10:55):
but we don't make up my.ini?
Jose Costa Teixeira (Sep 05 2019 at 10:56):
It was written in the instructions. We could, i hadn't thought of it
Jose Costa Teixeira (Sep 05 2019 at 10:56):
(i presume you are talking about creating the my.ini from code / during the installer..?)
Christoph Dolch (Sep 05 2019 at 10:56):
im using mysql
Jose Costa Teixeira (Sep 05 2019 at 10:57):
ok i will see if I can get it working. which mysql version?
Jose Costa Teixeira (Sep 05 2019 at 10:58):
(not sure if I can do something today, though.)
Christoph Dolch (Sep 05 2019 at 11:00):
i use MySQL 5.2.27
Jose Costa Teixeira (Sep 05 2019 at 11:01):
oh and one thing: this was optimized for mariadb which at the time had a really stupid bug
Jose Costa Teixeira (Sep 05 2019 at 11:01):
you may want to remove
optimizer_switch=orderby_uses_equalities=off
Jose Costa Teixeira (Sep 05 2019 at 11:56):
@Christoph Dolch I can't find that version of mysql to test. can you send me a link where you downloaded it?
Christoph Dolch (Sep 05 2019 at 12:09):
https://dev.mysql.com/downloads/file/?id=487685
Jose Costa Teixeira (Sep 05 2019 at 12:23):
ah 5.7.27 :)
Christoph Dolch (Sep 05 2019 at 12:39):
ah, sorry, typo, not 5.2.27, yes 5.7.27
Jose Costa Teixeira (Sep 05 2019 at 16:47):
ok i have an issue with the connection on my end.
Jose Costa Teixeira (Sep 05 2019 at 16:47):
i think it may be due to the VcRedist stuff (they come out as not detected)
Jose Costa Teixeira (Sep 05 2019 at 16:49):
this was working a long time ago so I do not know what changed. Possibly my PC has updated something.
I will check my other servers to see if they work and go from there.
Jose Costa Teixeira (Sep 05 2019 at 16:49):
so @Christoph Dolch I am one step behind you and I cannot help more today. sorry
Jose Costa Teixeira (Sep 05 2019 at 22:26):
DeathByODBC...
Grahame Grieve (Sep 05 2019 at 22:26):
?
Jose Costa Teixeira (Sep 05 2019 at 22:27):
I think the mother of all my issues today is the ODBC + VCRedist that we need for ODBC...
Jose Costa Teixeira (Sep 05 2019 at 22:27):
I'm on it but will have to continue tomorrow.
Jose Costa Teixeira (Sep 05 2019 at 22:28):
this don't work:
pasted image
Jose Costa Teixeira (Sep 05 2019 at 22:29):
direct works
pasted image
Jose Costa Teixeira (Sep 05 2019 at 22:30):
and obcd itself says it's ok
pasted image
Jose Costa Teixeira (Sep 06 2019 at 08:17):
@Christoph Dolch did you fix your issue?
Christoph Dolch (Sep 06 2019 at 08:51):
not yet.
Jose Costa Teixeira (Sep 06 2019 at 09:25):
is this a proxy thing?
Jose Costa Teixeira (Sep 06 2019 at 09:25):
(as in : confirmed there is a proxy issue? Or do you want to do some manual tests?)
Jose Costa Teixeira (Sep 06 2019 at 09:26):
i think i can guide you through some of the steps. I still have some issues on my run but those are now just a config thing
Christoph Dolch (Sep 06 2019 at 09:36):
it seen that the problem with the database initialisation
db-init.PNG
is a proxy thing
Jose Costa Teixeira (Sep 06 2019 at 11:27):
i am getting this screen now
pasted image
Jose Costa Teixeira (Sep 06 2019 at 11:27):
this is because I selected the tx package
Jose Costa Teixeira (Sep 06 2019 at 11:29):
ok i se a few things:
Jose Costa Teixeira (Sep 06 2019 at 11:29):
the installer runs on win32 architecture, which explains my problems. I had the ODBC stuff on 64.bit
Jose Costa Teixeira (Sep 06 2019 at 11:30):
so you may want to check if you are using a 32-bit stack completely. odbc+vcredist at least
Grahame Grieve (Sep 06 2019 at 11:57):
yes the installer is win32 :-(
Grahame Grieve (Sep 06 2019 at 11:58):
Proxy is tough - I have to ask that in the installer and pass it through various interfaces
Jose Costa Teixeira (Sep 06 2019 at 12:10):
could it be that it is trying to init the DB and gets the error i had
EDefinitionException: Unknown base profile: "http://hl7.org/fhir/StructureDefinition/Composition"
and then thinks it is a connection issue?
Grahame Grieve (Sep 06 2019 at 12:10):
no.
Grahame Grieve (Sep 06 2019 at 12:11):
that one is gone if you use the latest code anyway
Jose Costa Teixeira (Sep 06 2019 at 12:11):
i was going to build a new installer to send to @Christoph Dolch with the latest changes
Jose Costa Teixeira (Sep 06 2019 at 12:12):
i am not sure I have everything in place to do that, but I am almost done building stuff
Grahame Grieve (Sep 06 2019 at 12:12):
do you have anything to commit? I can build a new release
Grahame Grieve (Sep 06 2019 at 12:12):
have you ever built the installer before? it's a pretty big task
Jose Costa Teixeira (Sep 06 2019 at 12:14):
i did, for the dependencies check (not my best work, i admit.. )
but building installer is ok even if risky (it is a pretty big checklist indeed)
Jose Costa Teixeira (Sep 06 2019 at 12:15):
i am now working to see why my fhirserver.exe for 64 bit ends up with 172 MB. must be the optimisation things that i did not set correctly
Jose Costa Teixeira (Sep 06 2019 at 12:17):
73 MB now. that's better
Jose Costa Teixeira (Sep 06 2019 at 12:42):
debugging installer, to me it fails here:
msg := MyDllInstallDatabase(ExpandConstant('{app}')+'\fhirserver.exe', ExpandConstant('{app}')+'\fhirserver.ini', pw, 'r4', pl2, mode, @InitCallback)
Jose Costa Teixeira (Sep 06 2019 at 12:46):
with values:
msg := MyDllInstallDatabase('C:\Program Files\FHIRServer\fhirserver.exe', 'C:\Program Files\FHIRServer\fhirserver.ini', 'x', 'r4', ',hl7.fhir.core#4.0.0', 'open', @InitCallback)
Jose Costa Teixeira (Sep 06 2019 at 13:20):
so, a few things I see here:
1. in my case the server admin password is "x". But my db password is "pass". It seems the parameter in the function call should be the DB password, and not the server admin password, right?
Jose Costa Teixeira (Sep 06 2019 at 13:20):
2. I don't like the comma in ',hl7.fhir.core#4.0.0'
Jose Costa Teixeira (Sep 06 2019 at 13:24):
3.
MyDllDownloadPackages('system', pl2, @InitCallback)
also fails.
pasted image
Jose Costa Teixeira (Sep 06 2019 at 13:25):
where did the h in hl7 go? is that a pchar/string thing?
Grahame Grieve (Sep 06 2019 at 20:03):
password is the server admin password; the database password is already in the ini file
Grahame Grieve (Sep 06 2019 at 20:03):
the comma is ok. I think
Grahame Grieve (Sep 06 2019 at 20:04):
but the hl7 thing... maybe there is a problem around the comma
Jose Costa Teixeira (Sep 06 2019 at 20:07):
ok. I can confirm that the installer is where i have the connection issue. The server itself is almost fine
Jose Costa Teixeira (Sep 06 2019 at 20:08):
almost= if I run the server without installing, then the server starts ok but has no resources, and the capabilitystatement says only reads are allowed. no create or update
Jose Costa Teixeira (Sep 07 2019 at 10:08):
the missing h was my bad. I hadn't realised that the list of packages always starts with a comma and you remove it in the DLL (clever but derailed my brain)
Jose Costa Teixeira (Sep 07 2019 at 10:29):
...and there's something wrong with that thing. the comma may not be welcome in the "install databases" part. I am looking at it
Jose Costa Teixeira (Sep 07 2019 at 13:34):
apparently comma is ok. I have one issue that I cannot work around: there is a transaction timeout somwhere when installing the r4 package
Jose Costa Teixeira (Sep 07 2019 at 13:35):
I committed some changes to installer - the download urls were hardcoded - so that would not work well
Jose Costa Teixeira (Sep 07 2019 at 13:36):
for the lock / transaction timeout, I will try with another DB server
Jose Costa Teixeira (Sep 07 2019 at 18:09):
no luck.
So: the comma/ missing "h" is OK (there is always a comma, but it has no impact. the missing H was that I had removed the first comma in the string and the DLL removed the first character as expected. Now it works.)
Jose Costa Teixeira (Sep 07 2019 at 18:11):
I have an issue with a transaction on mariaDB (presumably also mysql) during initialisation of r4 database. it seems the transaction is never committed, and eventually the DB server gives up. I think I will need help for that.
Jose Costa Teixeira (Sep 07 2019 at 18:12):
and the installer is not recognizing the database for some reason. Says it cannot connect. When i do it manually outside the installer,it connects ok (except for the timeout that i mention above)
Grahame Grieve (Sep 07 2019 at 20:49):
why change FastMM_FullDebugMode to FastMM_FullDebugMode64? that's wrong
Grahame Grieve (Sep 07 2019 at 20:52):
I have an issue with a transaction on mariaDB (presumably also mysql) during initialisation of r4 database. it seems the transaction is never committed, and eventually the DB server gives up. I think I will need help for that
What's your evidence?
Jose Costa Teixeira (Sep 08 2019 at 04:09):
why change FastMM_FullDebugMode to FastMM_FullDebugMode64? that's wrong
Right. In my machine i did not have the 32 and 64 execs and dll so i think i just changed it without thinking
Jose Costa Teixeira (Sep 08 2019 at 04:10):
MariaDB [(none)]> SHOW PROCESSLIST; +----+-------------+-----------------------------------+--------+---------+------+--------------------------+-----------------------------------------------------------+----------+ | Id | User | Host | db | Command | Time | State | Info | Progress | +----+-------------+-----------------------------------+--------+---------+------+--------------------------+-----------------------------------------------------------+----------+ | 1 | system user | | NULL | Daemon | NULL | InnoDB purge coordinator | NULL | 0.000 | | 3 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 4 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 2 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 5 | system user | | NULL | Daemon | NULL | InnoDB shutdown handler | NULL | 0.000 | | 16 | sa | fe80::20e4:bdf7:9d4:16c0%34:54568 | fhirdb | Sleep | 458 | | NULL | 0.000 | | 17 | sa | fe80::20e4:bdf7:9d4:16c0%34:54575 | fhirdb | Query | 458 | Updating | Update Types set LastId = 201 where ResourceTypeKey = 108 | 0.000 | | 19 | sa | ::1:54591 | NULL | Query | 0 | Init | SHOW PROCESSLIST | 0.000 | | 20 | sa | fe80::20e4:bdf7:9d4:16c0%34:54595 | fhirdb | Sleep | 345 | | NULL | 0.000 |
Jose Costa Teixeira (Sep 08 2019 at 04:11):
the "Update Types set LastId = 201 where ResourceTypeKey = 108" is there forever and I cannot find out why
Jose Costa Teixeira (Sep 08 2019 at 04:12):
at the time this happens, the server is showing this
##> 60 Process hl7.fhir.core#4.0.0 CarePlan/gpvisit 15:23:52 49: CarePlan/gpvisit ##> 60 Process hl7.fhir.core#4.0.0 CatalogEntry/example 15:23:52 50: CatalogEntry/example ##> 60 Process hl7.fhir.core#4.0.0 Claim/100150 15:23:52 51: Claim/100150 ##> 60 Process hl7.fhir.core#4.0.0 Claim/100152 15:23:52 52: Claim/100152
and does not move forward
Jose Costa Teixeira (Sep 08 2019 at 04:16):
I could not track where this happens in the code
Grahame Grieve (Sep 08 2019 at 08:15):
deadlock?
Grahame Grieve (Sep 08 2019 at 08:15):
hmm
Grahame Grieve (Sep 08 2019 at 08:16):
I will try and find time to investigate tomorrow
Jose Costa Teixeira (Sep 08 2019 at 08:17):
thanks. or we can look at this in Atlanta if you have time
Jose Costa Teixeira (Sep 08 2019 at 08:17):
perhaps easier, since I have the whole setup and perhaps you can spot something easily
Jose Costa Teixeira (Sep 08 2019 at 08:18):
whole setup = this happens on mariadb. I can try tomorrow to see if i have the same with mysql
Jose Costa Teixeira (Sep 08 2019 at 08:19):
btw, do you want me to revert the FastMM_FullDebugMode64 thing? i can quickly commit now
Grahame Grieve (Sep 08 2019 at 08:19):
actually, the last change I made yesterday might do this. Look in resolveReferenceForIndexing( in FHIR.Server.Database, and put a break point on FRepository.DB.GetConnection('Indexing Lookup') - if that fires just before it hangs.... then I know what the problem is (but not the solution)
Grahame Grieve (Sep 08 2019 at 08:19):
and yes please revert it
Jose Costa Teixeira (Sep 08 2019 at 08:54):
what is "just before it hangs"?
Jose Costa Teixeira (Sep 08 2019 at 08:55):
MariaDB [(none)]> show processlist; +----+-------------+-----------------------------------+--------+---------+------+--------------------------+-----------------------------------------------------------+----------+ | Id | User | Host | db | Command | Time | State | Info | Progress | +----+-------------+-----------------------------------+--------+---------+------+--------------------------+-----------------------------------------------------------+----------+ | 1 | system user | | NULL | Daemon | NULL | InnoDB purge coordinator | NULL | 0.000 | | 2 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 3 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 4 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 5 | system user | | NULL | Daemon | NULL | InnoDB shutdown handler | NULL | 0.000 | | 10 | root | ::1:60026 | NULL | Query | 0 | Init | show processlist | 0.000 | | 21 | sa | fe80::20e4:bdf7:9d4:16c0%34:61087 | fhirdb | Sleep | 84 | | NULL | 0.000 | | 22 | sa | fe80::20e4:bdf7:9d4:16c0%34:61107 | fhirdb | Query | 84 | Updating | Update Types set LastId = 201 where ResourceTypeKey = 108 | 0.000 | +----+-------------+-----------------------------------+--------+---------+------+--------------------------+-----------------------------------------------------------+----------+ 8 rows in set (0.000 sec)
Jose Costa Teixeira (Sep 08 2019 at 08:55):
after X seconds of inactivity, or when the db server gives a timeout?
Grahame Grieve (Sep 08 2019 at 09:10):
before that. Just does the breakpoint fire?
Jose Costa Teixeira (Sep 08 2019 at 09:46):
i am looking at this«
Jose Costa Teixeira (Sep 08 2019 at 09:46):
the breakpoint is never reached
Jose Costa Teixeira (Sep 08 2019 at 09:47):
problem is when indexing claim100152, and contained Practitioner provider-1
Jose Costa Teixeira (Sep 08 2019 at 10:17):
ok so before i get another BSOD,
Jose Costa Teixeira (Sep 08 2019 at 10:18):
stack:
FHIR.Server.Database.TFHIRNativeStorageService.NextResourceKeyGetId('Practitioner','')
FHIR.Server.Database.TFHIRNativeStorageService.GetNextKey(ktResource,'Practitioner','')
FHIR.Server.IndexingR4.TFhirIndexManager4.index($38A253B0,$1BE1A7F0,'Claim',66,0,$24014990,'care-team','')
FHIR.Server.IndexingR4.TFhirIndexManager4.evaluateByFHIRPath(66,$1BE1A7F0,$1BE1A7F0,$38A253B0)
FHIR.Server.IndexingR4.TFhirIndexManager4.execute(66,'100152',$1BE1A7F0,$3CA59790,$38A253B0)
FHIR.Server.Database.TFHIRNativeOperationEngine.ExecuteCreate($243E35B0,$38A253B0,$19A0EDA0,idMaybeNew,0)
FHIR.Server.Database.TFHIRNativeOperationEngine.ExecuteUpdate($243E35B0,$38A253B0,$19A0EDA0)
FHIR.Server.Database.TFHIRNativeOperationEngine.commitResource($38A253B0,$19A0EDA0,True,$391FAA40,52,$372BD3A0,$B43E720,$39518780)
FHIR.Server.Database.TFHIRNativeOperationEngine.ExecuteTransaction($1EFF5660,$38A253B0,$19A0EDA0)
FHIR.Server.Storage.TFHIROperationEngine.Execute($1EFF5660,$38A253B0,$19A0EDA0)
FHIR.Server.Web.TFhirWebServerEndpoint.ProcessRequest($1EFF5660,$38A253B0,$19A0EDA0)
FHIR.Server.Web.TFhirWebServerEndpoint.Transaction($B44CE60,True,'hl7.fhir.core#4.0.0','',(nil,nil))
FHIR.Server.Kernel.TFHIRService.Load('r4','hl7.fhir.core#4.0.0',ismOpenAccess)
FHIR.Server.Kernel.ExecuteFhirServer
Jose Costa Teixeira (Sep 08 2019 at 10:18):
it fails on
DB.ExecSQL('Update Types set LastId = '+inttostr(key)+' where ResourceTypeKey = '+inttostr(cfg.key), 'key-update');
Jose Costa Teixeira (Sep 08 2019 at 10:18):
for some reason at this mometn the database does not accept that
Jose Costa Teixeira (Sep 08 2019 at 10:19):
tried using another client, and if I issue the query at this moment, also crashes
Jose Costa Teixeira (Sep 08 2019 at 10:21):
breakpoint: FHIR.Server.IndexingR4,
line 1085, condition = key=66
(that is the resource where the issue appears)
Jose Costa Teixeira (Sep 08 2019 at 10:22):
then the "offending / offended" line is FHIR.Server.Database, 6939
Jose Costa Teixeira (Sep 08 2019 at 10:29):
at this time, the database looks like this:
MariaDB [(none)]> show processlist; +----+-------------+-----------------------------------+--------+---------+------+--------------------------+------------------+----------+ | Id | User | Host | db | Command | Time | State | Info | Progress | +----+-------------+-----------------------------------+--------+---------+------+--------------------------+------------------+----------+ | 1 | system user | | NULL | Daemon | NULL | InnoDB purge coordinator | NULL | 0.000 | | 2 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 3 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 4 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 5 | system user | | NULL | Daemon | NULL | InnoDB shutdown handler | NULL | 0.000 | | 16 | sa | fe80::20e4:bdf7:9d4:16c0%34:50436 | fhirdb | Sleep | 97 | | NULL | 0.000 | | 17 | sa | fe80::20e4:bdf7:9d4:16c0%34:50440 | fhirdb | Sleep | 97 | | NULL | 0.000 | | 18 | root | ::1:50481 | NULL | Query | 0 | Init | show processlist | 0.000 | +----+-------------+-----------------------------------+--------+---------+------+--------------------------+------------------+----------+ 8 rows in set (0.000 sec)
Jose Costa Teixeira (Sep 08 2019 at 10:29):
(so rather OK, it seems). Guess the problem is on my db setup
Grahame Grieve (Sep 08 2019 at 11:06):
hmm remind me how it fails?
Grahame Grieve (Sep 08 2019 at 11:06):
hanging, right? it really looks like a sql deadlock...
Jose Costa Teixeira (Sep 08 2019 at 12:06):
trying mysql.
Jose Costa Teixeira (Sep 08 2019 at 12:07):
mysql gives more info
14:43:00 52: Claim/100152 14:43:58 EODBC: [MySQL][ODBC 5.3(w) Driver][mysqld-5.7.27]Lock wait timeout exceeded; try restarting transaction
Jose Costa Teixeira (Sep 09 2019 at 05:37):
still hanging... :(
Grahame Grieve (Sep 09 2019 at 05:44):
you're installing R4, right?
Jose Costa Teixeira (Sep 09 2019 at 05:45):
yes
Grahame Grieve (Sep 09 2019 at 05:48):
what's your command line parameters?
Jose Costa Teixeira (Sep 09 2019 at 05:49):
-cmd remount -password sa -ini ".\fhirserver.ini" -packages hl7.fhir.core#4.0.0 -endpoint r4 -mode open
Jose Costa Teixeira (Sep 09 2019 at 05:49):
"sa" is the admin password, not the DB password
Grahame Grieve (Sep 09 2019 at 05:50):
k thx
Jose Costa Teixeira (Sep 09 2019 at 06:03):
it could be the problem is in my db setup.. but seems more likely in the application, no?
Grahame Grieve (Sep 09 2019 at 06:04):
yes in the app. what's the last thing on the console when it hangs?
Jose Costa Teixeira (Sep 09 2019 at 06:05):
##> 60 Process hl7.fhir.core#4.0.0 CarePlan/gpvisit 15:23:52 49: CarePlan/gpvisit ##> 60 Process hl7.fhir.core#4.0.0 CatalogEntry/example 15:23:52 50: CatalogEntry/example ##> 60 Process hl7.fhir.core#4.0.0 Claim/100150 15:23:52 51: Claim/100150 ##> 60 Process hl7.fhir.core#4.0.0 Claim/100152 15:23:52 52: Claim/100152
Grahame Grieve (Sep 09 2019 at 06:06):
well, update and try again and see if you get any further
Jose Costa Teixeira (Sep 09 2019 at 06:19):
nope, still the same.
I guess you don't have the issue on your side, right?
Grahame Grieve (Sep 09 2019 at 06:19):
I tried it out and fixed a couple of problems
Grahame Grieve (Sep 09 2019 at 06:20):
what happens if you walk it from the point of that log message?
Jose Costa Teixeira (Sep 09 2019 at 06:26):
what happens if you walk it from the point of that log message?
? you mean if i step through the code after it hangs?
Grahame Grieve (Sep 09 2019 at 06:28):
that message is that last one before it hangs - so put an additional write for that particular message and break on it, and then step until you see go bang.
Jose Costa Teixeira (Sep 09 2019 at 06:35):
but i know the exact line where it hangs
Grahame Grieve (Sep 09 2019 at 06:35):
oh? where?
Jose Costa Teixeira (Sep 09 2019 at 06:37):
(one sec, reassigning breaking points)
Jose Costa Teixeira (Sep 09 2019 at 06:37):
but it was the "update types" query
Grahame Grieve (Sep 09 2019 at 06:39):
that doesn't give you a stack, right? you got that from the sql server tools
Jose Costa Teixeira (Sep 09 2019 at 06:39):
the stack is here
Jose Costa Teixeira (Sep 09 2019 at 06:40):
server.database, line 6949 - is the offending line
Jose Costa Teixeira (Sep 09 2019 at 06:41):
FHIR.Server.Database.TFHIRNativeStorageService.NextResourceKeyGetId('Practitioner','1') FHIR.Server.Database.TFHIRNativeStorageService.GetNextKey(ktResource,'Practitioner','1') FHIR.Server.IndexingR4.TFhirIndexManager4.index($39047E20,$1BF392C0,'Claim',66,0,$244035B0,'care-team','') FHIR.Server.IndexingR4.TFhirIndexManager4.evaluateByFHIRPath(66,$1BF392C0,$1BF392C0,$39047E20) FHIR.Server.IndexingR4.TFhirIndexManager4.execute(66,'100152',$1BF392C0,$3CC0C290,$39047E20) FHIR.Server.Database.TFHIRNativeOperationEngine.ExecuteCreate($2411AC00,$39047E20,$19B32B40,idMaybeNew,0) FHIR.Server.Database.TFHIRNativeOperationEngine.ExecuteUpdate($2411AC00,$39047E20,$19B32B40) FHIR.Server.Database.TFHIRNativeOperationEngine.commitResource($39047E20,$19B32B40,True,$394A49F0,52,$375FC450,$CD4E720,$398C63F0) FHIR.Server.Database.TFHIRNativeOperationEngine.ExecuteTransaction($1F4B8480,$39047E20,$19B32B40) FHIR.Server.Storage.TFHIROperationEngine.Execute($1F4B8480,$39047E20,$19B32B40) FHIR.Server.Web.TFhirWebServerEndpoint.ProcessRequest($1F4B8480,$39047E20,$19B32B40) FHIR.Server.Web.TFhirWebServerEndpoint.Transaction($CD5CE60,True,'hl7.fhir.core#4.0.0','',(nil,nil))
Jose Costa Teixeira (Sep 09 2019 at 06:43):
i can send over a zipped version of my db if you want to see the fireworks and if you really want to help with this
Jose Costa Teixeira (Sep 09 2019 at 06:43):
i have it running portable (and before you ask, i had mysql installed, also crashed)
Grahame Grieve (Sep 09 2019 at 06:46):
ok update and try again and see if it's different
Jose Costa Teixeira (Sep 09 2019 at 07:00):
still same
Grahame Grieve (Sep 09 2019 at 07:03):
really? weird
Grahame Grieve (Sep 09 2019 at 07:03):
in the same place?
Grahame Grieve (Sep 09 2019 at 07:08):
oh yes, it will be.
Grahame Grieve (Sep 09 2019 at 07:25):
well, then, try again
Jose Costa Teixeira (Sep 15 2019 at 00:49):
k, package does not get installed automatically when I do -cmd remount -packages hl7.fhir.core#4.0.0
Jose Costa Teixeira (Sep 15 2019 at 00:50):
is there a special command to get the package?
Jose Costa Teixeira (Sep 15 2019 at 01:21):
i.e. a command line option for the server or something else like a curl..?
Last updated: Apr 12 2022 at 19:14 UTC