Happy Thursday everyone! I’m having an interesting issue which I would like to share and hear back from anyone who’s experienced something similar.
I have an Orthanc (1.11.2) container in docker and a simple PHP application in another container. Both are on the same docker network.
I’ve created a test.php page (which makes a POST call, with Async turned on) to Orthanc which in turn, pulls a study from a remote peer - when I call that page from my browser, I get the immediate response I expect (JobID) and the job registers in Orthanc and the study downloads. Nice!
Wanting to automate this, I went further and used the Lua OnHeartBeat function to make the call to test.php … but I never seem to get a response back and eventually Orthanc crashes. We do see (in the logs) that the HttpClient shows the POST to /transfers/peer but then that’s it. It feels like (this time) it didn’t accept the “Asynchronous” : true that it was sent - and we’ve checked the PHP code. My lead developer and I have gone through hours of testing this.
We’ve even changed the test.php page to just try to get the /system response and it still fails. Calling the same page from postman or a browser works without fail.
We question whether or not, when OnHeartBeat makes a call, it sits until it receives a response and (more importantly) nothing else can happen on the Orthanc server until that OnHeartBeat gets a response.
Would / does that make any sense? I read that “This implies that Lua scripting in Orthanc does not support any kind of concurrency.” but I don’t believe that’s relevant in this case, as whilst the Lua script is making the OnHeartBeat call, the response to the API call happens on the CivetWeb level, doesn’t it?
Thoughts?
BNOEAFK