[squeak-dev] The Inbox: WebClient-Core-ul.123.mcz
Tim Johnson
digit at sonic.net
Tue Jun 30 14:14:51 UTC 2020
On Jun 28, 2020, at 7:34 PM, Levente Uzonyi wrote:
>> A more specific/holistic evaluation of the server image after this
>> fix:
>>
>> (Process allSubInstances select: [:ea | ea name includesSubstring:
>> 'WebServer']) size " => 2 "
>
> Do you have 2 WebServer instances as well?
No, just one. I previously destroyed the default instance via
"WebServer reset". It is my understanding that the default instance
is only used for testing and examples.
One of these two processes is this:
a Process in [] in DelayWaitTimeout>>wait
'WebServer''s listener process'
and the other is:
a Process in [] in BlockClosure>>newProcess
'[an IP address]:54090 - WebServer request handler'
>> ifTrue: [ receiver outerContext receiver class == WebServer ]
>> ifFalse: [ false ] ] ] ] " size => 4"
>>
>> WebServer allInstances first connections size " => 3"
>
> That should be 0 unless there are debuggers open or there are actual
> connections to your server.
> Perhaps the Seaside error handler does something that doesn't let
> connections to be removed.
Interesting, and very likely. I had indeed been doing some
development which brought up the error handler perhaps three times.
If I do the following:
Utilities closeAllDebuggers. 3 timesRepeat: [Smalltalk garbageCollect].
WebServer allInstances first connections do: [:ea | PointerFinder on:
ea]
Then all three look like this:
globals: Environment
declarations: IdentityDictionary
#WAServerManager -> WAServerManager class
default: WAValueHolder
contents: WAServerManager
adaptors: OrderedCollection
array: Array
1: WAWebServerAdaptor
server: WebServer
connections: IdentitySet
array: Array
494: Process
I tried using PointerFinder>>#on:except: to skip the WebServer's
connections array, but it did not seem to skip the connections
array. :)
Could some of my problem been due to my having inspected WebServer's
connections collection without acquiring a mutex? I see mention of
this in a comment in WebServer>>#connections ... but I also don't see
any methods in WebServer which seem to support safe public access to
the collection, so perhaps that remains TBD.
In any case, I have done the following:
WebServer allInstances first destroyConnections
And all of the stale connections are gone. :) I still have the
extra (second) request handler process hanging out though.
Thanks,
a Tim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200630/a99415f8/attachment.html>
More information about the Squeak-dev
mailing list
|