Image files cumulating

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

Image files cumulating

drush66
Hello,

I am using the latest Pharo based Pier one click image on debian
server, and I have set up Image persistency.

Problem is that backup images seem to be cumulating and eating my disk
space quite rapidly. As far as I have understood, there should be a
max of 3 backed images, while I have tens, and even hundreds of them.

I suspected that maybe it is the file rights issue, but everything
seems to be ok, (also if a process can create file, it usually can
also delete it).

Thanks in advance!

rush
http://www.cloud208.com/
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Image files cumulating

Lukas Renggli
The maximum number of images can be set in the configuration dialog in
"/systemmanagement/persistency", the default is 3.

To debug the deletion of old images you can debug the following expression:

    PRKernel instances anyOne persistency cleanupBackupImages

Cheers,
Lukas

On Tue, Apr 14, 2009 at 10:11 AM, Davorin Rusevljan
<[hidden email]> wrote:

> Hello,
>
> I am using the latest Pharo based Pier one click image on debian
> server, and I have set up Image persistency.
>
> Problem is that backup images seem to be cumulating and eating my disk
> space quite rapidly. As far as I have understood, there should be a
> max of 3 backed images, while I have tens, and even hundreds of them.
>
> I suspected that maybe it is the file rights issue, but everything
> seems to be ok, (also if a process can create file, it usually can
> also delete it).
>
> Thanks in advance!
>
> rush
> http://www.cloud208.com/
> _______________________________________________
> Magritte, Pier and Related Tools ...
> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
>



--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Image files cumulating

drush66
On 4/14/09, Lukas Renggli <[hidden email]> wrote:
> The maximum number of images can be set in the configuration dialog in
>  "/systemmanagement/persistency", the default is 3.

yes I have also that set to 3.

>  To debug the deletion of old images you can debug the following expression:
>
>     PRKernel instances anyOne persistency cleanupBackupImages

Interestingly, this also seems to be running fine when started alone,
it had cleaned all old files and kept only last 3. So something before
that (but after the image save) must be breaking persistency cycle.

Thanks!

rush
http://www.cloud208.com/
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Image files cumulating

Lukas Renggli
>>  To debug the deletion of old images you can debug the following expression:
>>
>>     PRKernel instances anyOne persistency cleanupBackupImages
>
> Interestingly, this also seems to be running fine when started alone,
> it had cleaned all old files and kept only last 3. So something before
> that (but after the image save) must be breaking persistency cycle.

I can't reproduce on my machine and on various servers.

What happens if you repeatedly evaluate the following expression?

    PRKernel instances anyOne persistency snapshot

This is the code that is executed whenever the image is saved. It
should create a backup copy of the current image, save the image under
the same name, and delete older images. Does that work for you if you
evaluate the expression repeatedly?

What version of Squeak and Pier are you working with?

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Image files cumulating

drush66
>  This is the code that is executed whenever the image is saved. It
>  should create a backup copy of the current image, save the image under
>  the same name, and delete older images. Does that work for you if you
>  evaluate the expression repeatedly?

PRKernel instances anyOne persistency snapshot

raises error every time I run it, her is TOS:
-------
Stack Trace

thisContext
HttpService(Object)>>error:
self
seaside [stopped] port: 8080
aString
'a service is already running on port 8080'
-------------

before that it saves image ok, and pier image keeps responding to
requests afterwards.

I am using latest (1.1.1) pier one-click image based on pharo,
downloaded from www.piercms.org

Probable is my pier app config, that is triggering the problem, i have:

--------
Server

Resource Base Url (unspecified)
Server Hostname clear
Server Path clear
Server Port revert to: 80 overriden from WAGlobalConfiguration
Server Protocol #http override inherited from WAGlobalConfiguration
-------

notice the port:80, this is the port that nginx responds to, and
forwards requests to pier image at port:8080

rush
http://www.cloud208.com/
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Image files cumulating

Lukas Renggli
> before that it saves image ok, and pier image keeps responding to
> requests afterwards.

Aha, now I understand. You have multiple web-server adapters listening
on the same port. After the image is saved they restart and throw an
exception. Stop them all using:

   WAKom withAllSubclassesDo: #stop

And then start your favorite adapter using:

   WAKom startOn: 8080

That should solve the problem.

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Image files cumulating

drush66
Ok, here is what I get. (I am doing this through Halo inspector web interface)

WAKom withAllSubclassesDo: #stop .  WAKomEncoded startOn: 8080 .
-- runs fine.

TcpService services (click on inspect buton)
-- nice only one Seside running service returned on port 8080.

PRKernel instances anyOne persistency snapshot
-- bangs with exception stack described few messages above.

TcpService services
-- not nice, now has 2 Seaside services on port 8080 one of them stoped.

thanks!

rush



_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Image files cumulating

Lukas Renggli
> -- bangs with exception stack described few messages above.
> TcpService services

Did you try stopping "TcpService services" as well?

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Image files cumulating

drush66
On Wed, Apr 15, 2009 at 8:27 AM, Lukas Renggli <[hidden email]> wrote:
> -- bangs with exception stack described few messages above.
> TcpService services

Did you try stopping "TcpService services" as well?

ok, now I have tried:

WAKom withAllSubclassesDo: #stop . TcpService services do: [:s | s stop]. WAKomEncoded startOn: 8080 .
-- ok, only one service left running on port 8080

PRKernel instances anyOne persistency snapshot
-- again same exception, also has 2 services on port 8080, one stoped other running.

So I think snapshot is somehow generating more than one service for port 8080. 

Also here is the Cloud208.sh script used to start pier if that migh give you some clue:
-----------------
#!/bin/sh

dir="/ebs/cloud208/Pier"
EXE="$dir/Contents/Linux686"
RES="$dir/Contents/Resources"

case "$1" in
        start)
                nohup su -c "$EXE/squeak -plugins $EXE -vm-display-null -vm-soun
d-null -mmap 100m $RES/pier.image '' port 8080" squeak &
                echo $! > $dir/pid
                ;;
        stop)
                kill `cat $dir/pid`
        ;;
        *)
                exit 3
        ;;
esac
-----------------

thanks!

rush


_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Image files cumulating

Lukas Renggli
> d-null -mmap 100m $RES/pier.image '' port 8080" squeak &
>                 echo $! > $dir/pid
>                 ;;

Looks like you should remove the "port 8080" thing.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Image files cumulating

drush66
On Wed, Apr 15, 2009 at 12:00 PM, Lukas Renggli <[hidden email]> wrote:
> d-null -mmap 100m $RES/pier.image '' port 8080" squeak &
>                 echo $! > $dir/pid
>                 ;;

Looks like you should remove the "port 8080" thing.

Lukas

yes, that was that. many thanks, and sorry for the trouble!

rush


_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki