Discussion:
[squeak-dev] The Inbox: WebClient-Core-cbc.118.mcz
c***@source.squeak.org
0000-10-30 05:59:25 UTC
Permalink
A new version of WebClient-Core was added to project The Inbox:
http://source.squeak.org/inbox/WebClient-Core-cbc.118.mcz

==================== Summary ====================

Name: WebClient-Core-cbc.118
Author: cbc
Time: 28 October 2018, 5:08:23.571079 pm
UUID: 683fbe3b-418f-a443-9a20-3f2a7af4b7e1
Ancestors: WebClient-Core-pre.117

A hack to work around connectionTimedOut annoyances when opening packages from Trunk (sometimes).

=============== Diff against WebClient-Core-pre.117 ===============

Item was changed:
----- Method: WebClient>>httpGet:do: (in category 'methods') -----
httpGet: urlString do: aBlock
"GET the response from the given url"
"(WebClient httpGet: 'http://www.squeak.org') content"

+ | request errCount |
- | request |
self initializeFromUrl: urlString.
request := self requestWithUrl: urlString.
request method: 'GET'.
userAgent ifNotNil:[:ua | request headerAt: 'User-Agent' put: ua].
self contentDecoders ifNotNil: [:decoders | request headerAt: 'Accept-Encoding' put: decoders].
+
+ errCount := 0. "Let's try resending to get around 'connection issues' trunk connections"
+ [
+ aBlock value: request.
+ ^self sendRequest: request
+ ] on: Error, NetworkError do: [:e| debugLog ifNotNil: [debugLog cr; nextPutAll: 'httpGet error: ', e; flush]. (errCount := errCount + 1) > 3 ifTrue: [e outer]. e retry].!
- aBlock value: request.
- ^self sendRequest: requ
Chris Cunningham
2018-10-29 00:27:43 UTC
Permalink
Hi.

I was loading the VMMaker package(s), and after manually opening the
debugger and restarting at #httpGet:do: about 10 times, I implemented this
hack so that I didn't have to do that anymore.

I *think* this is fixing the issue - haven't had it raise errors while
'timing out' on loading packages since this (the timeout were sub-second -
the connection hadn't gone through yet). Still, it might just be timing -
this isn't really a repeatable bug.

Not in Trunk because it is definitely a hack - but it makes things work
nicer.

Also, committing packages to the inbox with this loaded doesn't result in
walkbacks (from timeouts and whatnot) for me. Although it does take a long
time to finish.

-cbc
Post by c***@source.squeak.org
http://source.squeak.org/inbox/WebClient-Core-cbc.118.mcz
==================== Summary ====================
Name: WebClient-Core-cbc.118
Author: cbc
Time: 28 October 2018, 5:08:23.571079 pm
UUID: 683fbe3b-418f-a443-9a20-3f2a7af4b7e1
Ancestors: WebClient-Core-pre.117
A hack to work around connectionTimedOut annoyances when opening packages
from Trunk (sometimes).
=============== Diff against WebClient-Core-pre.117 ===============
----- Method: WebClient>>httpGet:do: (in category 'methods') -----
httpGet: urlString do: aBlock
"GET the response from the given url"
"(WebClient httpGet: 'http://www.squeak.org') content"
+ | request errCount |
- | request |
self initializeFromUrl: urlString.
request := self requestWithUrl: urlString.
request method: 'GET'.
userAgent ifNotNil:[:ua | request headerAt: 'User-Agent' put: ua].
'Accept-Encoding' put: decoders].
+
+ errCount := 0. "Let's try resending to get around 'connection
issues' trunk connections"
+ [
+ aBlock value: request.
+ ^self sendRequest: request
+ ] on: Error, NetworkError do: [:e| debugLog ifNotNil: [debugLog
cr; nextPutAll: 'httpGet error: ', e; flush]. (errCount := errCount + 1) >
3 ifTrue: [e outer]. e retry].!
- aBlock value: request.
- ^self sendRequest: request
- !
Levente Uzonyi
2018-10-29 00:55:16 UTC
Permalink
Hi Chris,
Hi.
I was loading the VMMaker package(s), and after manually opening the debugger and restarting at #httpGet:do: about 10 times, I implemented this hack so that I didn't have to do that anymore.
I *think* this is fixing the issue - haven't had it raise errors while 'timing out' on loading packages since this (the timeout were sub-second - the connection hadn't gone through yet).  Still, it
might just be timing - this isn't really a repeatable bug.
I'm sure this change helps with that issue, but it has unwelcome side
effects to WebClient's other users.
The real solution would be to fix the server.

Where did you see sub-second timeouts? The default timeout should be 45
seconds.
Not in Trunk because it is definitely a hack - but it makes things work nicer.
Also, committing packages to the inbox with this loaded doesn't result in walkbacks (from timeouts and whatnot) for me.  Although it does take a long time to finish.
Uploads use PUT requests, so expect to still see walkbacks there.

Levente
-cbc
http://source.squeak.org/inbox/WebClient-Core-cbc.118.mcz
==================== Summary ====================
Name: WebClient-Core-cbc.118
Author: cbc
Time: 28 October 2018, 5:08:23.571079 pm
UUID: 683fbe3b-418f-a443-9a20-3f2a7af4b7e1
Ancestors: WebClient-Core-pre.117
A hack to work around connectionTimedOut annoyances when opening packages from Trunk (sometimes).
=============== Diff against WebClient-Core-pre.117 ===============
  ----- Method: WebClient>>httpGet:do: (in category 'methods') -----
  httpGet: urlString do: aBlock
        "GET the response from the given url"
        "(WebClient httpGet: 'http://www.squeak.org') content"
+       | request errCount |
-       | request |
        self initializeFromUrl: urlString.
        request := self requestWithUrl: urlString.
        request method: 'GET'.
        userAgent ifNotNil:[:ua | request headerAt: 'User-Agent' put: ua].
        self contentDecoders ifNotNil: [:decoders | request headerAt: 'Accept-Encoding' put: decoders].
+
+       errCount := 0. "Let's try resending to get around 'connection issues' trunk connections"
+       [
+               aBlock value: request.
+               ^self sendRequest: request
+       ] on: Error, NetworkError do: [:e| debugLog ifNotNil: [debugLog cr; nextPutAll: 'httpGet error: ', e; flush]. (errCount := errCount + 1) > 3 ifTrue: [e outer]. e retry].!
-       aBlock value: request.
-       ^self sendRequest: request
- !
Chris Cunningham
2018-10-29 02:15:26 UTC
Permalink
Post by Levente Uzonyi
Hi Chris,
Post by Chris Cunningham
Hi.
I was loading the VMMaker package(s), and after manually opening the
debugger and restarting at #httpGet:do: about 10 times, I implemented this
hack so that I didn't have to do that anymore.
Post by Chris Cunningham
I *think* this is fixing the issue - haven't had it raise errors while
'timing out' on loading packages since this (the timeout were sub-second -
the connection hadn't gone through yet). Still, it
Post by Chris Cunningham
might just be timing - this isn't really a repeatable bug.
I'm sure this change helps with that issue, but it has unwelcome side
effects to WebClient's other users.
This this definitely will not be going to trunk.
Post by Levente Uzonyi
The real solution would be to fix the server.
Where did you see sub-second timeouts? The default timeout should be 45
seconds.
It didn't wait 45 seconds - it is almost instantaneous for me. The error
received back (from Socket>>sendSomeData:startIndex:count:for: ) is
"ConnectionTimedOut: send data timeout; data not sent", but I'm pretty darn
certain it is that the socket isn't yet connected (trace put into
Socket>>waitForSendDoneFor: confirms this). Looking at
#waitForSendDoneFor: shows that before any wait, it checks if the socket is
connected - if not, it immediately exits with false, which triggers the
time out error in the caller.

If I trap it and immediately resend, then it works. Weird.

-cbc
Post by Levente Uzonyi
Post by Chris Cunningham
Not in Trunk because it is definitely a hack - but it makes things work
nicer.
Post by Chris Cunningham
Also, committing packages to the inbox with this loaded doesn't result
in walkbacks (from timeouts and whatnot) for me. Although it does take a
long time to finish.
Uploads use PUT requests, so expect to still see walkbacks there.
Levente
Post by Chris Cunningham
-cbc
http://source.squeak.org/inbox/WebClient-Core-cbc.118.mcz
==================== Summary ====================
Name: WebClient-Core-cbc.118
Author: cbc
Time: 28 October 2018, 5:08:23.571079 pm
UUID: 683fbe3b-418f-a443-9a20-3f2a7af4b7e1
Ancestors: WebClient-Core-pre.117
A hack to work around connectionTimedOut annoyances when opening
packages from Trunk (sometimes).
Post by Chris Cunningham
=============== Diff against WebClient-Core-pre.117 ===============
----- Method: WebClient>>httpGet:do: (in category 'methods')
-----
Post by Chris Cunningham
httpGet: urlString do: aBlock
"GET the response from the given url"
"(WebClient httpGet: 'http://www.squeak.org') content"
+ | request errCount |
- | request |
self initializeFromUrl: urlString.
request := self requestWithUrl: urlString.
request method: 'GET'.
userAgent ifNotNil:[:ua | request headerAt: 'User-Agent'
put: ua].
Post by Chris Cunningham
self contentDecoders ifNotNil: [:decoders | request
headerAt: 'Accept-Encoding' put: decoders].
Post by Chris Cunningham
+
+ errCount := 0. "Let's try resending to get around
'connection issues' trunk connections"
Post by Chris Cunningham
+ [
+ aBlock value: request.
+ ^self sendRequest: request
[debugLog cr; nextPutAll: 'httpGet error: ', e; flush]. (errCount :=
errCount + 1) > 3 ifTrue: [e outer]. e retry].!
Post by Chris Cunningham
- aBlock value: request.
- ^self sendRequest: request
- !
Levente Uzonyi
2018-10-29 20:54:52 UTC
Permalink
Post by Levente Uzonyi
Hi Chris,
Hi.
I was loading the VMMaker package(s), and after manually opening the debugger and restarting at #httpGet:do: about 10 times, I implemented this hack so that I didn't have to do that
anymore.
I *think* this is fixing the issue - haven't had it raise errors while 'timing out' on loading packages since this (the timeout were sub-second - the connection hadn't gone through
yet).  Still, it
might just be timing - this isn't really a repeatable bug.
I'm sure this change helps with that issue, but it has unwelcome side
effects to WebClient's other users.
This this definitely will not be going to trunk.
 
The real solution would be to fix the server.
Where did you see sub-second timeouts? The default timeout should be 45
seconds.
It didn't wait 45 seconds - it is almost instantaneous for me.  The error received back (from Socket>>sendSomeData:startIndex:count:for: ) is "ConnectionTimedOut: send data timeout; data not sent",
but I'm pretty darn certain it is that the socket isn't yet connected (trace put into Socket>>waitForSendDoneFor: confirms this).  Looking at #waitForSendDoneFor: shows that before any wait, it checks
if the socket is connected - if not, it immediately exits with false, which triggers the time out error in the caller.
If I trap it and immediately resend, then it works.  Weird.
I've never seen that happening. Do you have a stack trace of the error?

Levente
Post by Levente Uzonyi
-cbc 
Not in Trunk because it is definitely a hack - but it makes things work nicer.
Also, committing packages to the inbox with this loaded doesn't result in walkbacks (from timeouts and whatnot) for me.  Although it does take a long time to finish.
Uploads use PUT requests, so expect to still see walkbacks there.
Levente
-cbc
       http://source.squeak.org/inbox/WebClient-Core-cbc.118.mcz
       ==================== Summary ====================
       Name: WebClient-Core-cbc.118
       Author: cbc
       Time: 28 October 2018, 5:08:23.571079 pm
       UUID: 683fbe3b-418f-a443-9a20-3f2a7af4b7e1
       Ancestors: WebClient-Core-pre.117
       A hack to work around connectionTimedOut annoyances when opening packages from Trunk (sometimes).
       =============== Diff against WebClient-Core-pre.117 ===============
         ----- Method: WebClient>>httpGet:do: (in category 'methods') -----
         httpGet: urlString do: aBlock
               "GET the response from the given url"
               "(WebClient httpGet: 'http://www.squeak.org') content"
       +       | request errCount |
       -       | request |
               self initializeFromUrl: urlString.
               request := self requestWithUrl: urlString.
               request method: 'GET'.
               userAgent ifNotNil:[:ua | request headerAt: 'User-Agent' put: ua].
               self contentDecoders ifNotNil: [:decoders | request headerAt: 'Accept-Encoding' put: decoders].
       +
       +       errCount := 0. "Let's try resending to get around 'connection issues' trunk connections"
       +       [
       +               aBlock value: request.
       +               ^self sendRequest: request
       +       ] on: Error, NetworkError do: [:e| debugLog ifNotNil: [debugLog cr; nextPutAll: 'httpGet error: ', e; flush]. (errCount := errCount + 1) > 3 ifTrue: [e outer]. e retry].!
       -       aBlock value: request.
       -       ^self sendRequest: request
       - !
karl ramberg
2018-10-30 18:16:52 UTC
Permalink
Hi,
I get error on updating almost every time I try, and the fail is within a
second.
See log in attachment.
I'm on windows.

Cheers,
Karl
Post by Levente Uzonyi
Hi Chris,
Post by Chris Cunningham
Hi.
I was loading the VMMaker package(s), and after manually opening
the debugger and restarting at #httpGet:do: about 10 times, I implemented
this hack so that I didn't have to do that
Post by Levente Uzonyi
anymore.
Post by Chris Cunningham
I *think* this is fixing the issue - haven't had it raise errors
while 'timing out' on loading packages since this (the timeout were
sub-second - the connection hadn't gone through
Post by Levente Uzonyi
yet). Still, it
Post by Chris Cunningham
might just be timing - this isn't really a repeatable bug.
I'm sure this change helps with that issue, but it has unwelcome
side
Post by Levente Uzonyi
effects to WebClient's other users.
This this definitely will not be going to trunk.
The real solution would be to fix the server.
Where did you see sub-second timeouts? The default timeout should
be 45
Post by Levente Uzonyi
seconds.
It didn't wait 45 seconds - it is almost instantaneous for me. The
error received back (from Socket>>sendSomeData:startIndex:count:for: ) is
"ConnectionTimedOut: send data timeout; data not sent",
Post by Levente Uzonyi
but I'm pretty darn certain it is that the socket isn't yet connected
(trace put into Socket>>waitForSendDoneFor: confirms this). Looking at
#waitForSendDoneFor: shows that before any wait, it checks
Post by Levente Uzonyi
if the socket is connected - if not, it immediately exits with false,
which triggers the time out error in the caller.
Post by Levente Uzonyi
If I trap it and immediately resend, then it works. Weird.
I've never seen that happening. Do you have a stack trace of the error?
Levente
Post by Levente Uzonyi
-cbc
Post by Chris Cunningham
Not in Trunk because it is definitely a hack - but it makes
things work nicer.
Post by Levente Uzonyi
Post by Chris Cunningham
Also, committing packages to the inbox with this loaded doesn't
result in walkbacks (from timeouts and whatnot) for me. Although it does
take a long time to finish.
Post by Levente Uzonyi
Uploads use PUT requests, so expect to still see walkbacks there.
Levente
Post by Chris Cunningham
-cbc
A new version of WebClient-Core was added to project The
http://source.squeak.org/inbox/WebClient-Core-cbc.118.mcz
==================== Summary ====================
Name: WebClient-Core-cbc.118
Author: cbc
Time: 28 October 2018, 5:08:23.571079 pm
UUID: 683fbe3b-418f-a443-9a20-3f2a7af4b7e1
Ancestors: WebClient-Core-pre.117
A hack to work around connectionTimedOut annoyances when
opening packages from Trunk (sometimes).
Post by Levente Uzonyi
Post by Chris Cunningham
=============== Diff against WebClient-Core-pre.117
===============
Post by Levente Uzonyi
Post by Chris Cunningham
----- Method: WebClient>>httpGet:do: (in category
'methods') -----
Post by Levente Uzonyi
Post by Chris Cunningham
httpGet: urlString do: aBlock
"GET the response from the given url"
"(WebClient httpGet: 'http://www.squeak.org')
content"
Post by Levente Uzonyi
Post by Chris Cunningham
+ | request errCount |
- | request |
self initializeFromUrl: urlString.
request := self requestWithUrl: urlString.
request method: 'GET'.
'User-Agent' put: ua].
Post by Levente Uzonyi
Post by Chris Cunningham
self contentDecoders ifNotNil: [:decoders |
request headerAt: 'Accept-Encoding' put: decoders].
Post by Levente Uzonyi
Post by Chris Cunningham
+
+ errCount := 0. "Let's try resending to get around
'connection issues' trunk connections"
Post by Levente Uzonyi
Post by Chris Cunningham
+ [
+ aBlock value: request.
+ ^self sendRequest: request
+ ] on: Error, NetworkError do: [:e| debugLog
ifNotNil: [debugLog cr; nextPutAll: 'httpGet error: ', e; flush]. (errCount
:= errCount + 1) > 3 ifTrue: [e outer]. e retry].!
Post by Levente Uzonyi
Post by Chris Cunningham
- aBlock value: request.
- ^self sendRequest: request
- !
karl ramberg
2018-10-30 18:26:58 UTC
Permalink
And with WebClient-Core-cbc.118.mcz I don't get this error.

Cheers,
Karl
Post by karl ramberg
Hi,
I get error on updating almost every time I try, and the fail is within a
second.
See log in attachment.
I'm on windows.
Cheers,
Karl
Post by Levente Uzonyi
Hi Chris,
Post by Chris Cunningham
Hi.
I was loading the VMMaker package(s), and after manually
opening the debugger and restarting at #httpGet:do: about 10 times, I
implemented this hack so that I didn't have to do that
Post by Levente Uzonyi
anymore.
Post by Chris Cunningham
I *think* this is fixing the issue - haven't had it raise
errors while 'timing out' on loading packages since this (the timeout were
sub-second - the connection hadn't gone through
Post by Levente Uzonyi
yet). Still, it
Post by Chris Cunningham
might just be timing - this isn't really a repeatable bug.
I'm sure this change helps with that issue, but it has unwelcome
side
Post by Levente Uzonyi
effects to WebClient's other users.
This this definitely will not be going to trunk.
The real solution would be to fix the server.
Where did you see sub-second timeouts? The default timeout should
be 45
Post by Levente Uzonyi
seconds.
It didn't wait 45 seconds - it is almost instantaneous for me. The
error received back (from Socket>>sendSomeData:startIndex:count:for: ) is
"ConnectionTimedOut: send data timeout; data not sent",
Post by Levente Uzonyi
but I'm pretty darn certain it is that the socket isn't yet connected
(trace put into Socket>>waitForSendDoneFor: confirms this). Looking at
#waitForSendDoneFor: shows that before any wait, it checks
Post by Levente Uzonyi
if the socket is connected - if not, it immediately exits with false,
which triggers the time out error in the caller.
Post by Levente Uzonyi
If I trap it and immediately resend, then it works. Weird.
I've never seen that happening. Do you have a stack trace of the error?
Levente
Post by Levente Uzonyi
-cbc
Post by Chris Cunningham
Not in Trunk because it is definitely a hack - but it makes
things work nicer.
Post by Levente Uzonyi
Post by Chris Cunningham
Also, committing packages to the inbox with this loaded doesn't
result in walkbacks (from timeouts and whatnot) for me. Although it does
take a long time to finish.
Post by Levente Uzonyi
Uploads use PUT requests, so expect to still see walkbacks there.
Levente
Post by Chris Cunningham
-cbc
A new version of WebClient-Core was added to project The
http://source.squeak.org/inbox/WebClient-Core-cbc.118.mcz
==================== Summary ====================
Name: WebClient-Core-cbc.118
Author: cbc
Time: 28 October 2018, 5:08:23.571079 pm
UUID: 683fbe3b-418f-a443-9a20-3f2a7af4b7e1
Ancestors: WebClient-Core-pre.117
A hack to work around connectionTimedOut annoyances when
opening packages from Trunk (sometimes).
Post by Levente Uzonyi
Post by Chris Cunningham
=============== Diff against WebClient-Core-pre.117
===============
Post by Levente Uzonyi
Post by Chris Cunningham
----- Method: WebClient>>httpGet:do: (in category
'methods') -----
Post by Levente Uzonyi
Post by Chris Cunningham
httpGet: urlString do: aBlock
"GET the response from the given url"
"(WebClient httpGet: 'http://www.squeak.org')
content"
Post by Levente Uzonyi
Post by Chris Cunningham
+ | request errCount |
- | request |
self initializeFromUrl: urlString.
request := self requestWithUrl: urlString.
request method: 'GET'.
'User-Agent' put: ua].
Post by Levente Uzonyi
Post by Chris Cunningham
self contentDecoders ifNotNil: [:decoders |
request headerAt: 'Accept-Encoding' put: decoders].
Post by Levente Uzonyi
Post by Chris Cunningham
+
+ errCount := 0. "Let's try resending to get around
'connection issues' trunk connections"
Post by Levente Uzonyi
Post by Chris Cunningham
+ [
+ aBlock value: request.
+ ^self sendRequest: request
+ ] on: Error, NetworkError do: [:e| debugLog
ifNotNil: [debugLog cr; nextPutAll: 'httpGet error: ', e; flush]. (errCount
:= errCount + 1) > 3 ifTrue: [e outer]. e retry].!
Post by Levente Uzonyi
Post by Chris Cunningham
- aBlock value: request.
- ^self sendRequest: request
- !
Chris Cunningham
2018-10-30 19:18:53 UTC
Permalink
Hi Karl,

Thank you for responding with the stack trace - I was going to yesterday
but got completely distracted with other issues. THat is roughly where it
fails for me, too (one windows 10).

Also, glad it helped. It is still a hack that shouldn't be in the
production WebClient (too many other possible side-effects), but nice for
this process.

-cbc
Post by karl ramberg
And with WebClient-Core-cbc.118.mcz I don't get this error.
Cheers,
Karl
Post by karl ramberg
Hi,
I get error on updating almost every time I try, and the fail is within a
second.
See log in attachment.
I'm on windows.
Cheers,
Karl
Post by Levente Uzonyi
Hi Chris,
Post by Chris Cunningham
Hi.
I was loading the VMMaker package(s), and after manually
opening the debugger and restarting at #httpGet:do: about 10 times, I
implemented this hack so that I didn't have to do that
Post by Levente Uzonyi
anymore.
Post by Chris Cunningham
I *think* this is fixing the issue - haven't had it raise
errors while 'timing out' on loading packages since this (the timeout were
sub-second - the connection hadn't gone through
Post by Levente Uzonyi
yet). Still, it
Post by Chris Cunningham
might just be timing - this isn't really a repeatable bug.
I'm sure this change helps with that issue, but it has unwelcome
side
Post by Levente Uzonyi
effects to WebClient's other users.
This this definitely will not be going to trunk.
The real solution would be to fix the server.
Where did you see sub-second timeouts? The default timeout
should be 45
Post by Levente Uzonyi
seconds.
It didn't wait 45 seconds - it is almost instantaneous for me. The
error received back (from Socket>>sendSomeData:startIndex:count:for: ) is
"ConnectionTimedOut: send data timeout; data not sent",
Post by Levente Uzonyi
but I'm pretty darn certain it is that the socket isn't yet connected
(trace put into Socket>>waitForSendDoneFor: confirms this). Looking at
#waitForSendDoneFor: shows that before any wait, it checks
Post by Levente Uzonyi
if the socket is connected - if not, it immediately exits with false,
which triggers the time out error in the caller.
Post by Levente Uzonyi
If I trap it and immediately resend, then it works. Weird.
I've never seen that happening. Do you have a stack trace of the error?
Levente
Post by Levente Uzonyi
-cbc
Post by Chris Cunningham
Not in Trunk because it is definitely a hack - but it makes
things work nicer.
Post by Levente Uzonyi
Post by Chris Cunningham
Also, committing packages to the inbox with this loaded
doesn't result in walkbacks (from timeouts and whatnot) for me. Although
it does take a long time to finish.
Post by Levente Uzonyi
Uploads use PUT requests, so expect to still see walkbacks there.
Levente
Post by Chris Cunningham
-cbc
A new version of WebClient-Core was added to project The
http://source.squeak.org/inbox/WebClient-Core-cbc.118.mcz
Post by Levente Uzonyi
Post by Chris Cunningham
==================== Summary ====================
Name: WebClient-Core-cbc.118
Author: cbc
Time: 28 October 2018, 5:08:23.571079 pm
UUID: 683fbe3b-418f-a443-9a20-3f2a7af4b7e1
Ancestors: WebClient-Core-pre.117
A hack to work around connectionTimedOut annoyances when
opening packages from Trunk (sometimes).
Post by Levente Uzonyi
Post by Chris Cunningham
=============== Diff against WebClient-Core-pre.117
===============
Post by Levente Uzonyi
Post by Chris Cunningham
----- Method: WebClient>>httpGet:do: (in category
'methods') -----
Post by Levente Uzonyi
Post by Chris Cunningham
httpGet: urlString do: aBlock
"GET the response from the given url"
"(WebClient httpGet: 'http://www.squeak.org')
content"
Post by Levente Uzonyi
Post by Chris Cunningham
+ | request errCount |
- | request |
self initializeFromUrl: urlString.
request := self requestWithUrl: urlString.
request method: 'GET'.
'User-Agent' put: ua].
Post by Levente Uzonyi
Post by Chris Cunningham
self contentDecoders ifNotNil: [:decoders |
request headerAt: 'Accept-Encoding' put: decoders].
Post by Levente Uzonyi
Post by Chris Cunningham
+
+ errCount := 0. "Let's try resending to get
around 'connection issues' trunk connections"
Post by Levente Uzonyi
Post by Chris Cunningham
+ [
+ aBlock value: request.
+ ^self sendRequest: request
+ ] on: Error, NetworkError do: [:e| debugLog
ifNotNil: [debugLog cr; nextPutAll: 'httpGet error: ', e; flush]. (errCount
:= errCount + 1) > 3 ifTrue: [e outer]. e retry].!
Post by Levente Uzonyi
Post by Chris Cunningham
- aBlock value: request.
- ^self sendRequest: request
- !
Chris Muller
2018-10-31 18:43:04 UTC
Permalink
I have the server upgrade next on my list. Thanks for your patience.
On Tue, Oct 30, 2018 at 2:19 PM Chris Cunningham
Post by Chris Cunningham
Hi Karl,
Thank you for responding with the stack trace - I was going to yesterday but got completely distracted with other issues. THat is roughly where it fails for me, too (one windows 10).
Also, glad it helped. It is still a hack that shouldn't be in the production WebClient (too many other possible side-effects), but nice for this process.
-cbc
Post by karl ramberg
And with WebClient-Core-cbc.118.mcz I don't get this error.
Cheers,
Karl
Hi,
I get error on updating almost every time I try, and the fail is within a second.
See log in attachment.
I'm on windows.
Cheers,
Karl
Post by Levente Uzonyi
Post by Levente Uzonyi
Hi Chris,
Hi.
I was loading the VMMaker package(s), and after manually opening the debugger and restarting at #httpGet:do: about 10 times, I implemented this hack so that I didn't have to do that
anymore.
I *think* this is fixing the issue - haven't had it raise errors while 'timing out' on loading packages since this (the timeout were sub-second - the connection hadn't gone through
yet). Still, it
might just be timing - this isn't really a repeatable bug.
I'm sure this change helps with that issue, but it has unwelcome side
effects to WebClient's other users.
This this definitely will not be going to trunk.
The real solution would be to fix the server.
Where did you see sub-second timeouts? The default timeout should be 45
seconds.
It didn't wait 45 seconds - it is almost instantaneous for me. The error received back (from Socket>>sendSomeData:startIndex:count:for: ) is "ConnectionTimedOut: send data timeout; data not sent",
but I'm pretty darn certain it is that the socket isn't yet connected (trace put into Socket>>waitForSendDoneFor: confirms this). Looking at #waitForSendDoneFor: shows that before any wait, it checks
if the socket is connected - if not, it immediately exits with false, which triggers the time out error in the caller.
If I trap it and immediately resend, then it works. Weird.
I've never seen that happening. Do you have a stack trace of the error?
Levente
Post by Levente Uzonyi
-cbc
Not in Trunk because it is definitely a hack - but it makes things work nicer.
Also, committing packages to the inbox with this loaded doesn't result in walkbacks (from timeouts and whatnot) for me. Although it does take a long time to finish.
Uploads use PUT requests, so expect to still see walkbacks there.
Levente
-cbc
http://source.squeak.org/inbox/WebClient-Core-cbc.118.mcz
==================== Summary ====================
Name: WebClient-Core-cbc.118
Author: cbc
Time: 28 October 2018, 5:08:23.571079 pm
UUID: 683fbe3b-418f-a443-9a20-3f2a7af4b7e1
Ancestors: WebClient-Core-pre.117
A hack to work around connectionTimedOut annoyances when opening packages from Trunk (sometimes).
=============== Diff against WebClient-Core-pre.117 ===============
----- Method: WebClient>>httpGet:do: (in category 'methods') -----
httpGet: urlString do: aBlock
"GET the response from the given url"
"(WebClient httpGet: 'http://www.squeak.org') content"
+ | request errCount |
- | request |
self initializeFromUrl: urlString.
request := self requestWithUrl: urlString.
request method: 'GET'.
userAgent ifNotNil:[:ua | request headerAt: 'User-Agent' put: ua].
self contentDecoders ifNotNil: [:decoders | request headerAt: 'Accept-Encoding' put: decoders].
+
+ errCount := 0. "Let's try resending to get around 'connection issues' trunk connections"
+ [
+ aBlock value: request.
+ ^self sendRequest: request
+ ] on: Error, NetworkError do: [:e| debugLog ifNotNil: [debugLog cr; nextPutAll: 'httpGet error: ', e; flush]. (errCount := errCount + 1) > 3 ifTrue: [e outer]. e retry].!
- aBlock value: request.
- ^self sendRequest: request
- !
Tobias Pape
2018-10-29 07:58:54 UTC
Permalink
Post by Levente Uzonyi
Hi Chris,
Hi.
I was loading the VMMaker package(s), and after manually opening the debugger and restarting at #httpGet:do: about 10 times, I implemented this hack so that I didn't have to do that anymore.
I *think* this is fixing the issue - haven't had it raise errors while 'timing out' on loading packages since this (the timeout were sub-second - the connection hadn't gone through yet). Still, it
might just be timing - this isn't really a repeatable bug.
I'm sure this change helps with that issue, but it has unwelcome side effects to WebClient's other users.
The real solution would be to fix the server.
Concur!
Post by Levente Uzonyi
Where did you see sub-second timeouts? The default timeout should be 45 seconds.
Not in Trunk because it is definitely a hack - but it makes things work nicer.
Also, committing packages to the inbox with this loaded doesn't result in walkbacks (from timeouts and whatnot) for me. Although it does take a long time to finish.
Uploads use PUT requests, so expect to still see walkbacks there.
Best regards
-Tobias
Post by Levente Uzonyi
Levente
-cbc
http://source.squeak.org/inbox/WebClient-Core-cbc.118.mcz
==================== Summary ====================
Name: WebClient-Core-cbc.118
Author: cbc
Time: 28 October 2018, 5:08:23.571079 pm
UUID: 683fbe3b-418f-a443-9a20-3f2a7af4b7e1
Ancestors: WebClient-Core-pre.117
A hack to work around connectionTimedOut annoyances when opening packages from Trunk (sometimes).
=============== Diff against WebClient-Core-pre.117 ===============
----- Method: WebClient>>httpGet:do: (in category 'methods') -----
httpGet: urlString do: aBlock
"GET the response from the given url"
"(WebClient httpGet: 'http://www.squeak.org') content"
+ | request errCount |
- | request |
self initializeFromUrl: urlString.
request := self requestWithUrl: urlString.
request method: 'GET'.
userAgent ifNotNil:[:ua | request headerAt: 'User-Agent' put: ua].
self contentDecoders ifNotNil: [:decoders | request headerAt: 'Accept-Encoding' put: decoders].
+
+ errCount := 0. "Let's try resending to get around 'connection issues' trunk connections"
+ [
+ aBlock value: request.
+ ^self sendRequest: request
+ ] on: Error, NetworkError do: [:e| debugLog ifNotNil: [debugLog cr; nextPutAll: 'httpGet error: ', e; flush]. (errCount := errCount + 1) > 3 ifTrue: [e outer]. e retry].!
- aBlock value: request.
- ^self sendRequest: reque
Loading...