Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:






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


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.

share|improve this question

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).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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