5
$\begingroup$

On my webMathematica server, certain input values are being saved between page loads on different computers. I assume this is because the kernel is not clearing the values after it finishes loading a page, which is the behavior that I would like. As per How do I clear all user defined symbols?, it seems there are a few ways to clear the kernel:

ClearAll["Global`*"]

and

Quit[]

and

Utilities`CleanSlate

My worry is this: Does calling one of these functions interfere with all pages that are currently being processed? I'm not sure I understand how the webMathematica kernel pool works, so I have no idea if multiple user accessing the server at the same time would be interfered with by clearing the Kernel. Also, would calling Quit[] quit the Kernel until it is restarted through some other process (e.g the Kernel Monitor), and would this interfere with multiple users accessing the page at the same time, or would it slow down the system with constant clearing and reloading?

Finally, would it be wise (assuming I'm not counting on packages staying loaded) to just add the lines

<KernelReleaseCode>
    Quit[]
</KernelReleaseCode>

to MSPConfiguration.xml?

I know there are several questions here, but what I'd really is just a explanation (or a link to one) of how the webMathematica kernel pool and kernels work - I assume the answers to these questions would be trivial once I understand that.

$\endgroup$

1 Answer 1

1
$\begingroup$

Maybe a little bit late answer, but this User Guide can help you.

Between requests, just Global context will be automatically cleaned, so you don't have to reload your package ever time a request is done (if you are using some).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.