Concurrent runs of compiled standalone executable fail with "Could not access the MCR component cache"
1 view (last 30 days)
Show older comments
Costas Vogiatzis
on 26 Mar 2015
Answered: Titus Edelhofer
on 27 Mar 2015
I am running a compiled ("deployed") MATLAB application from within a third party optimization program. The optimizer starts up to 10 multiple simultaneous instances of the deployed application. At random times one of these instances fails with a "Could not access the MCR component cache" error. Sometimes that happens after the app has executed 30 times others after it has run for hundreds of times. The deployed app takes only a few seconds to run and the optimizer at times tries to start multiple instances at the exact same time. Can multiple instances of deployed apps run on the same system without conflicts? What can I do to resolve the issue I am seeing? Currently runs are done on Win7, 64 bit with MATLAB R2013b. Would the situation be different with another version of MATLAB or another OS?
0 Comments
Accepted Answer
Titus Edelhofer
on 27 Mar 2015
Hi Costas,
usually simultaneous calls of compiled applications should not interfer with each other. Otherwise it would not work at all and crash the second call.
I must admit, I don't have a definite solution to your problem :(, your setup with many concurrent calls is probably less common ... ;-).
One thing that comes to my mind is the cache size: maybe increasing it could help? Call
winopen(mcrcachedir)
to open the cache folder. Edit the .max_size file and replace the 32 MByte (33554432 bytes) by some larger value, e.g. 64 MByte.
An alternative would be to not embed the .ctf file into the application (adding parameter -C). This way the ctf is extracted locally instead of somewhere in the user profile.
If you need a more sophisticated (and probably faster) way of doing such calls, an alternative would be to use the MATLAB Production Server as a server for executing MATLAB based computations ...
Titus
0 Comments
More Answers (0)
See Also
Categories
Find more on MATLAB Web App Server in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!