[Seaside] Pharo disappears - revisited

David Pennington david at lhdavid.co.uk
Sat Jul 17 09:38:18 UTC 2021


I have had long discussions on Diascord but to no avail.  Perhaps a new statement of the problem might help.

I have a Pharo 9.0, MacOs M1 VM install where I run a Seaside app for my local scale plastic model club. The club as only about 16 members so the traffic is extremely light with most days the only such being search bots.

The pages are mostly designed to display photos of member’s models. The images are held on the server path. The data that makes up the pages is held in my own (what I call) TinyKV (Key Value database). This database uses the Pharo Filesystem to save and retrieve JSON text files.

The Pharo image doesn’t run for more than about 10 hours when it just disappears leaving no crash log or debug files. I have checked the database software and all files are opened and closed correctly so there are no hanging file handles (unless the underlying code doesn’t clean up but that’s a guess).

The Pharo image is running on a brand new 8GB M1 MacMini and is the only code running on that machine.

To test out my code, I recently ran what could be seen as a “Denial of Service” attack on my own web site. The following is the code that I ran on my M1 MacBookAir under Pharo 9/M1 VM.

| response content headers contentList|
Transcript show: Time now 	printString; cr.
contentList := OrderedCollection new.
1 to: 2000 do: [ : i | 
	response := ZnClient new 
    url: 'http://www.ipms-clacton.org.uk:8080/CNWHome';
    get;
    response.
	response := ZnClient new 
    url: 'http://www.ipms-clacton.org.uk:8080/CNWShowOneImage?ab?022020001.jpg';
    get;
    response.

contentList add: response contents.
].

Transcript show: Time now 	printString; cr.
^ contentList 

This hit the website with 2000 non-stop requests for the home page and for one of the pages that gets its data from the database (where “022020001.jpg” is a JSON file  whose content is 
"{"dateOfRecord" : ""owner" : "ab","text" : "1-72 Scale Airfix Lancaster BIII converted to Aries of EANS - Airfix (first mould) with M&E Lancastrian Conversion","imagePath" : "022020001.jpg”}”

I have also tried this code with 250 millisecond wait.

The server accepts all of these requests and even responds to other requests whilst this is happening so I can see nothing wrong with my code, be it the Seaside or the database.

I have run this code on a variety of machines under 8.0 and 9.0. I have run it under VAST on Windows 10 and Windows 2012 Server in addition to on the Mac. I have the same problem under 8.0 as 9.0 no matter which VM I use.

What do I do next?


More information about the seaside mailing list