startMaintenance and multi user support

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

startMaintenance and multi user support

NorbertHartl
In my multi user setup the startMaintenance script does not work. It assumes things like SeasidePlatformSupport/WADispatcher being present. I chose a setup where the DataCurator is only the bootstrapped code and addtional users load things like seaside, pier and the like.

For the time being I triggered the MFC manually via gemtools. Today I freed 1GB of space which forced me not to postpone the fix any longer. I would exchange things like

WADispatcher default

with

AllUsers do: [:user|
        ((user symbolList objectNamed: #UserGlobals) at: #WADispatcher ifAbsent: [ nil ])
                ifNotNilDo: [:dispatcher|
                        ... ]]


I think this will work for cleaning the WASession objects. But the part that uses SeasidePlatform with transactions and forks I'm not sure if this is going to cause trouble if I just put a loop around it.

thanks in advance,

Norbert

Reply | Threaded
Open this post in threaded view
|

Re: startMaintenance and multi user support

Dale
Norbert,

For your situation, I would:

  - remove the MFC from the startMaintenance script
  - then run the modified startMaintenance script for each user actively running
    Seaside
  - arrange for a separate MFC script to be run that runs your mfc as frequently as
    needed

You only need one gem/script running MFC for the system, but you'll need one gem per unique seaside user cleaning up session state ...

Dale

----- "Norbert Hartl" <[hidden email]> wrote:

| In my multi user setup the startMaintenance script does not work. It
| assumes things like SeasidePlatformSupport/WADispatcher being present.
| I chose a setup where the DataCurator is only the bootstrapped code
| and addtional users load things like seaside, pier and the like.
|
| For the time being I triggered the MFC manually via gemtools. Today I
| freed 1GB of space which forced me not to postpone the fix any longer.
| I would exchange things like
|
| WADispatcher default
|
| with
|
| AllUsers do: [:user|
| ((user symbolList objectNamed: #UserGlobals) at: #WADispatcher
| ifAbsent: [ nil ])
| ifNotNilDo: [:dispatcher|
| ... ]]
|
|
| I think this will work for cleaning the WASession objects. But the
| part that uses SeasidePlatform with transactions and forks I'm not
| sure if this is going to cause trouble if I just put a loop around
| it.
|
| thanks in advance,
|
| Norbert
Reply | Threaded
Open this post in threaded view
|

Re: startMaintenance and multi user support

NorbertHartl
Dale,
On 20.04.2010, at 19:04, Dale Henrichs wrote:

> Norbert,
>
> For your situation, I would:
>
>  - remove the MFC from the startMaintenance script
>  - then run the modified startMaintenance script for each user actively running
>    Seaside
>  - arrange for a separate MFC script to be run that runs your mfc as frequently as
>    needed
>
> You only need one gem/script running MFC for the system, but you'll need one gem per unique seaside user cleaning up session state ...
>
of course, you are right. I did it and it works. The biggest trouble was the usage of displayString which isn't available for the DataCurator user in my image. It seems to be OB dependent.

I want to understand the sections in the start maintenance files in order to make my scripts fit best.

There is

- open log file
- do some breakpoint setup stuff. what for?
- acquire the seaside mutex. needed?
- cleaning sessions
- mfc
- uninstall exception handlers

Can you elaborate on the points please? Especially the questioned one. I'm just trying to figure out what I really need. For my own scripts I think I'm going to remove the endless loop and configure the script via cron.

thanks,

Norbert

> ----- "Norbert Hartl" <[hidden email]> wrote:
>
> | In my multi user setup the startMaintenance script does not work. It
> | assumes things like SeasidePlatformSupport/WADispatcher being present.
> | I chose a setup where the DataCurator is only the bootstrapped code
> | and addtional users load things like seaside, pier and the like.
> |
> | For the time being I triggered the MFC manually via gemtools. Today I
> | freed 1GB of space which forced me not to postpone the fix any longer.
> | I would exchange things like
> |
> | WADispatcher default
> |
> | with
> |
> | AllUsers do: [:user|
> | ((user symbolList objectNamed: #UserGlobals) at: #WADispatcher
> | ifAbsent: [ nil ])
> | ifNotNilDo: [:dispatcher|
> | ... ]]
> |
> |
> | I think this will work for cleaning the WASession objects. But the
> | part that uses SeasidePlatform with transactions and forks I'm not
> | sure if this is going to cause trouble if I just put a loop around
> | it.
> |
> | thanks in advance,
> |
> | Norbert

Reply | Threaded
Open this post in threaded view
|

Re: startMaintenance and multi user support

Dale
In reply to this post by NorbertHartl
Norbert,

Ah okay ... if you don't have GLASS installed in DataCurator, then the maintenance script would be different.

- open log file

The pid for the gem is recorded in a file so that the runSeaside script can stop the gem ... if you are using things like daemontools, then you might not need this.

- do some breakpoint setup stuff. what for?

The breakpoint notification section is there to make remote breakpoints. This is only needed in your seaside gem scripts and isn't needed in a maintenance script.

- acquire the seaside mutex. needed?

This section is for handling sigaborts ... the seaside mutex isn't needed, but no do need to do a 'System abortTransaction' instead of acquiring the mutex.

- cleaning sessions

not needed for mfc only vm

- mfc

this is the one thing you want for your mfc gem ... the logging that is going on is using the object log, so you will need to remove that code if GLASS isn't installed.

- uninstall exception handlers

This uninstalls the breakpoint exception handler ... so isn't needed either.

Dale
----- "Norbert Hartl" <[hidden email]> wrote:

| Dale,
| On 20.04.2010, at 19:04, Dale Henrichs wrote:
|
| > Norbert,
| >
| > For your situation, I would:
| >
| >  - remove the MFC from the startMaintenance script
| >  - then run the modified startMaintenance script for each user
| actively running
| >    Seaside
| >  - arrange for a separate MFC script to be run that runs your mfc as
| frequently as
| >    needed
| >
| > You only need one gem/script running MFC for the system, but you'll
| need one gem per unique seaside user cleaning up session state ...
| >
| of course, you are right. I did it and it works. The biggest trouble
| was the usage of displayString which isn't available for the
| DataCurator user in my image. It seems to be OB dependent.
|
| I want to understand the sections in the start maintenance files in
| order to make my scripts fit best.
|
| There is
|
| - open log file
| - do some breakpoint setup stuff. what for?
| - acquire the seaside mutex. needed?
| - cleaning sessions
| - mfc
| - uninstall exception handlers
|
| Can you elaborate on the points please? Especially the questioned one.
| I'm just trying to figure out what I really need. For my own scripts I
| think I'm going to remove the endless loop and configure the script
| via cron.
|
| thanks,
|
| Norbert
|
| > ----- "Norbert Hartl" <[hidden email]> wrote:
| >
| > | In my multi user setup the startMaintenance script does not work.
| It
| > | assumes things like SeasidePlatformSupport/WADispatcher being
| present.
| > | I chose a setup where the DataCurator is only the bootstrapped
| code
| > | and addtional users load things like seaside, pier and the like.
| > |
| > | For the time being I triggered the MFC manually via gemtools.
| Today I
| > | freed 1GB of space which forced me not to postpone the fix any
| longer.
| > | I would exchange things like
| > |
| > | WADispatcher default
| > |
| > | with
| > |
| > | AllUsers do: [:user|
| > | ((user symbolList objectNamed: #UserGlobals) at: #WADispatcher
| > | ifAbsent: [ nil ])
| > | ifNotNilDo: [:dispatcher|
| > | ... ]]
| > |
| > |
| > | I think this will work for cleaning the WASession objects. But
| the
| > | part that uses SeasidePlatform with transactions and forks I'm
| not
| > | sure if this is going to cause trouble if I just put a loop
| around
| > | it.
| > |
| > | thanks in advance,
| > |
| > | Norbert