Project

General

Profile

How to: Isolate a uses session on a single process

Added by José Luis Rey almost 6 years ago

Hello,

I known that this is possible on v 3.3.4, but Is there any sample of how to activate user/session isolation ?

Best regards

J.Rey


Replies (8)

RE: How to: Isolate a uses session on a single process - Added by Roel Standaert almost 6 years ago

You can configure whether to use one shared process or dedicated processes in wt_config.xml, as is described here: http://www.webtoolkit.eu/wt/doc/reference/html/overview.html#config_session. The example wt_config.xml should already have a section with commented out. If you uncomment that, and comment out the bit, then every session will be handled on its own process.

Regards,

Roel

RE: How to: Isolate a uses session on a single process - Added by José Luis Rey almost 6 years ago

Thanks very much form the info, it is exactly what I need.

RE: How to: Isolate a uses session on a single process - Added by José Luis Rey almost 6 years ago

Hello Roel,

Sorry but I didn't found any wt_config.xml sample, I've added the entries manually, but I'm not sure of the correct section/value, is this ok:





......



true



.......


RE: How to: Isolate a uses session on a single process - Added by Roel Standaert almost 6 years ago

This is the default in the sample wt_config.xml (https://github.com/kdeforche/wt/blob/master/wt_config.xml.in):

<dedicated-process>
  <max-num-sessions>100</max-num-sessions>
</dedicated-process>

Regards,

Roel

RE: How to: Isolate a uses session on a single process - Added by José Luis Rey almost 6 years ago

Hello Roel,

I cannot launch the wt server in dedicated-process mode, I've installed 3.3.4 and recompiled all, I've added this to my wt_config.xml:





c:\temp\wtlog.txt



100



....

And the log file opening a def app from two different sessions, I saw that all run under pid 10812, and I didn't see any other host launched,

I'm missing something?

For me is very important to enable dedicated-process, specially because our beta app still have some crashes and I don't want all uses to loose his job when one uses crashes until we debug all.

Log file:

[2015-Feb-02 12:03:11.957828] 10812 - [info] "config: reading Wt config file: ./wt_config.xml (location = 'C:\server\m\ChronoScan\debug\Chrono_wci.exe')"

[2015-Feb-02 12:03:11.968828] 10812 - [info] "WServer/wthttp: initializing built-in wthttpd"

[2015-Feb-02 12:03:12.444828] 10812 - [info] "wthttp: started server: http://0.0.0.0:10000"

[2015-Feb-02 12:03:21.073828] 10812 - [info] "Wt: session created (#sessions = 1)"

[2015-Feb-02 12:03:21.074828] 10812 [/ RZpATRYsU13iBaqy] [info] "WEnvironment: UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.94 Safari/537.36"

[2015-Feb-02 12:03:21.314828] 10812 - [info] "WebRequest: took 241ms"

[2015-Feb-02 12:03:21.316828] 10812 - [info] "Wt: session created (#sessions = 2)"

[2015-Feb-02 12:03:21.317828] 10812 [/ oRngS4A25PcvSTwd] [info] "WEnvironment: UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.94 Safari/537.36"

[2015-Feb-02 12:03:21.318828] 10812 [/ oRngS4A25PcvSTwd] [info] "Wt: signal from dead session, sending reload."

[2015-Feb-02 12:03:21.318828] 10812 - [info] "WebController: Removing session oRngS4A25PcvSTwd"

[2015-Feb-02 12:03:21.318828] 10812 [/ oRngS4A25PcvSTwd] [info] "Wt: session destroyed (#sessions = 1)"

[2015-Feb-02 12:03:21.350828] 10812 - [info] "WebRequest: took 35ms"

[2015-Feb-02 12:03:21.421828] 10812 - [info] "WebRequest: took 40ms"

[2015-Feb-02 12:03:21.524828] 10812 - [info] "WebRequest: took 8ms"

[2015-Feb-02 12:03:26.485828] 10812 - [info] "Wt: session created (#sessions = 2)"

[2015-Feb-02 12:03:26.485828] 10812 [/ IOywbtQsTSmMTmYL] [info] "WEnvironment: UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"

[2015-Feb-02 12:03:26.602828] 10812 - [info] "WebRequest: took 117ms"

[2015-Feb-02 12:03:26.800828] 10812 - [info] "WebRequest: took 40ms"

[2015-Feb-02 12:03:27.303828] 10812 - [info] "WebRequest: took 81ms"

RE: How to: Isolate a uses session on a single process - Added by Roel Standaert almost 6 years ago

Yes, I forgot to mention that the tag shouldn't be directly under the tag, but actually under the tag, so it should work if you change it to:

<server>
  <application-settings location="*">
    <log-file>c:\temp\wtlog.txt</log-file>
    <session-management>
      <dedicated-process>
        <max-num-sessions>100</max-num-sessions>
      </dedicated-process>
    </session-management>
    ...

RE: How to: Isolate a uses session on a single process - Added by José Luis Rey almost 6 years ago

Yes, it is working now, but only using debug dlls, if I try to activate it on an application using the release version (that is working ok without decicated-process), the request is processed but nothing is received by the client,

Thanks for your support,

RE: How to: Isolate a uses session on a single process - Added by Roel Standaert almost 6 years ago

I'm afraid I don't know what's going wrong when you use the release version. It works when I test it. Could you maybe provide more details?

    (1-8/8)