When running multiple simulations on web api it is possible that the COE can act strangely
The behavior of COE can be:
Works fine
When adding/removing multiple simulations from the COE at the same time the COE will sometimes respond with 400/500 error respectivly, with a java io error being output to the console as seen below, all other working directory folders were removed as expected without error
java.io.IOException: Unable to delete file: 9bd684e2-29e6-4e81-b267-2774289f85db\{fmu}\equations.log
at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2279)
at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1653)
at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1535)
at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2270)
at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1653)
at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1535)
at org.intocps.orchestration.coe.httpserver.RequestProcessors.processDestroy(RequestProcessors.java:452)
at org.intocps.orchestration.coe.httpserver.RequestHandler.destroy(RequestHandler.java:287)
at org.intocps.orchestration.coe.httpserver.RequestHandler.handleRequest(RequestHandler.java:227)
at org.intocps.orchestration.coe.httpserver.NanoWSDImpl.serveHttp(NanoWSDImpl.java:70)
at fi.iki.elonen.NanoWSD.serve(NanoWSD.java:861)
at fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:927)
at fi.iki.elonen.NanoHTTPD$ClientHandler.run(NanoHTTPD.java:194)
at java.base/java.lang.Thread.run(Thread.java:832)
Sometimes will entirely crash the COE
The COE sometimes appears to close the log file before log4j as seen log4j:ERROR Attempted to append to closed appender named [null].
These issues seem to be specific to when multiple simulations are being run concurrently by the COE.
The issues will occur more frequently if the COE was started from within the INTO-CPS application.
All of the errors can be somewhat alleviated by introducing a delay between the addition/removal of each simulation, however, if the Web-API was deployed on a central location with multiple users contacting it this would not be a viable solution.
When running multiple simulations on web api it is possible that the COE can act strangely
The behavior of COE can be:
log4j:ERROR Attempted to append to closed appender named [null].
These issues seem to be specific to when multiple simulations are being run concurrently by the COE. The issues will occur more frequently if the COE was started from within the INTO-CPS application. All of the errors can be somewhat alleviated by introducing a delay between the addition/removal of each simulation, however, if the Web-API was deployed on a central location with multiple users contacting it this would not be a viable solution.