[8.6.3] HTTPS Post is extremely slow

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[8.6.3] HTTPS Post is extremely slow

jtuchel
Hi,


I am playing with a web service I want to connect to and see extremely bad response times.

While sending the the same POST Request with Firefox / HttpRequester gets an answer almost immediately, VA Smalltalk waits MORE THAN A MINUTE for an answer - on the same machine!

Here is my code snippet:

|client url response|
url
:= 'https://easy.smoice.com/api/2.0/login' sstAsUrl.
(client := SstHttpClient forTransportScheme: 'httpsl') startUp.
response
:= [
Transcript cr; show: (Time millisecondsToRun: [
client post
: '{"email": "test", "passwordHash":"encrypted PW"}' typed: 'application/json' at: url]) asString ] ensure: [ client shutDown ].
response

And this is the shockingly depressing output on my Transcript:

60622
60263


--->>> 60 Thousand milliseconds!!!!



And here is how long this takes with Firefox/HTTP Requestor on the same machine:





I'm using a fresh install of VAST 8.6.3. I followed the FAQs and copied the openssl libraries to the runtime directory (version 1.0.2k). Stepping through the code, I see that it's neither the startUp nor the shutDown that takes the time, it really is the post:typed:at: that takes so long.

Is the code I'm using wrong?
Is this an installation/config problem?
Do others see similar response (or should I say shipping) times?



Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [8.6.3] HTTPS Post is extremely slow

Wayne Johnston
I'm on 8.6.3 and getting a fast response in less than a second.  Using your exact snippet except moving the setting of <response>, I see the response mentioning
'...{"errorCode":110,"errorMessage":"Login failed"}'

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [8.6.3] HTTPS Post is extremely slow

jtuchel

Wayne,

Thanks for trying out. At least it proves it's not a general VAST problem. Thid would be a show stopper.

I don't really understand what you mean by "except moving the setting of <response>, but I guess it is not relevant.

So since I also see fast responses on the same machine using firefox and curl, chances are I need to look for problems with my VAST 8.6.3 Installation. Any ideas what coulc cause such lags?

Joachim


Am Freitag, 17. Februar 2017 13:14:26 UTC+1 schrieb Wayne Johnston:
I'm on 8.6.3 and getting a fast response in less than a second.  Using your exact snippet except moving the setting of <response>, I see the response mentioning
'...{"errorCode":110,"errorMessage":"Login failed"}'

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [8.6.3] HTTPS Post is extremely slow

Louis LaBrunda
In reply to this post by jtuchel
Hi Joachim,

I get these times running exactly your code three times on VAST 8.6.3 with a small Seaside program I'm playing with.

1796
703
735

Lou

On Friday, February 17, 2017 at 6:47:01 AM UTC-5, Joachim Tuchel wrote:
Hi,


I am playing with a web service I want to connect to and see extremely bad response times.

While sending the the same POST Request with Firefox / HttpRequester gets an answer almost immediately, VA Smalltalk waits MORE THAN A MINUTE for an answer - on the same machine!

Here is my code snippet:

|client url response|
url
:= '<a href="https://easy.smoice.com/api/2.0/login" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Feasy.smoice.com%2Fapi%2F2.0%2Flogin\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFXVQFP-boSgN_b8jOldHgFd6Hf6g&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Feasy.smoice.com%2Fapi%2F2.0%2Flogin\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFXVQFP-boSgN_b8jOldHgFd6Hf6g&#39;;return true;">https://easy.smoice.com/api/2.0/login' sstAsUrl.
(client := SstHttpClient forTransportScheme: 'httpsl') startUp.
response
:= [
Transcript cr; show: (Time millisecondsToRun: [
client post
: '{"email": "test", "passwordHash":"encrypted PW"}' typed: 'application/json' at: url]) asString ] ensure: [ client shutDown ].
response

And this is the shockingly depressing output on my Transcript:

60622
60263


--->>> 60 Thousand milliseconds!!!!



And here is how long this takes with Firefox/HTTP Requestor on the same machine:





I'm using a fresh install of VAST 8.6.3. I followed the FAQs and copied the openssl libraries to the runtime directory (version 1.0.2k). Stepping through the code, I see that it's neither the startUp nor the shutDown that takes the time, it really is the post:typed:at: that takes so long.

Is the code I'm using wrong?
Is this an installation/config problem?
Do others see similar response (or should I say shipping) times?



Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [8.6.3] HTTPS Post is extremely slow

Wayne Johnston
In reply to this post by jtuchel
About moving the setting of "response" - I was just saying if you inspect response, it's the Transcript, where I assume it's more interesting to see the result of the #post:... call.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [8.6.3] HTTPS Post is extremely slow

jtuchel
Ah, I see...

I had added the millisecondsToRun: after I had made sure I get the response I wanted. Of course the snippet doestnt make much sense the way I pasted it...

Joachim


Am Freitag, 17. Februar 2017 18:01:05 UTC+1 schrieb Wayne Johnston:
About moving the setting of "response" - I was just saying if you inspect response, it's the Transcript, where I assume it's more interesting to see the result of the #post:... call.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [8.6.3] HTTPS Post is extremely slow

jtuchel
In reply to this post by Louis LaBrunda
Lou,

thanks for checking. So I know it is not my code and not VAST 8.6.3. I will try with a clean install on another machine later.
I wanted to give VirtualBox a try anyways.

Joachim


Am Freitag, 17. Februar 2017 17:26:48 UTC+1 schrieb Louis LaBrunda:
Hi Joachim,

I get these times running exactly your code three times on VAST 8.6.3 with a small Seaside program I'm playing with.

1796
703
735

Lou

On Friday, February 17, 2017 at 6:47:01 AM UTC-5, Joachim Tuchel wrote:
Hi,


I am playing with a web service I want to connect to and see extremely bad response times.

While sending the the same POST Request with Firefox / HttpRequester gets an answer almost immediately, VA Smalltalk waits MORE THAN A MINUTE for an answer - on the same machine!

Here is my code snippet:

|client url response|
url
:= '<a href="https://easy.smoice.com/api/2.0/login" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Feasy.smoice.com%2Fapi%2F2.0%2Flogin\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFXVQFP-boSgN_b8jOldHgFd6Hf6g&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Feasy.smoice.com%2Fapi%2F2.0%2Flogin\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFXVQFP-boSgN_b8jOldHgFd6Hf6g&#39;;return true;">https://easy.smoice.com/api/2.0/login' sstAsUrl.
(client := SstHttpClient forTransportScheme: 'httpsl') startUp.
response
:= [
Transcript cr; show: (Time millisecondsToRun: [
client post
: '{"email": "test", "passwordHash":"encrypted PW"}' typed: 'application/json' at: url]) asString ] ensure: [ client shutDown ].
response

And this is the shockingly depressing output on my Transcript:

60622
60263


--->>> 60 Thousand milliseconds!!!!



And here is how long this takes with Firefox/HTTP Requestor on the same machine:





I'm using a fresh install of VAST 8.6.3. I followed the FAQs and copied the openssl libraries to the runtime directory (version 1.0.2k). Stepping through the code, I see that it's neither the startUp nor the shutDown that takes the time, it really is the post:typed:at: that takes so long.

Is the code I'm using wrong?
Is this an installation/config problem?
Do others see similar response (or should I say shipping) times?



Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [8.6.3] HTTPS Post is extremely slow

jtuchel
In reply to this post by jtuchel

Another interesting observation:


SstHttp11ClientExample fetch: 'http://www.instantiations.com'

answers immediately in 8.6.3 - in the same image as the slow HTTPS sample. Answer's there within a few milliseconds.

So this is not a network configuration problem. But how can I find out what's wrong?
All I did was copy the libeay32.dll and ssleay32.dll into the vast root folder.

Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [8.6.3] HTTPS Post is extremely slow

jtuchel
In reply to this post by jtuchel
The more I play with this, the stranger it gets...


The code snippet I posted contained a wrong email-Address and password. If I try the exact snippet I posted here, I get an answer within less than 200 milliseconds. GOOD.
So we'd tend to think this is because of the login taking so long on the server side.

But sending the correct credentials with CURL or HTTPRequester also just takes around 200-400 msec, while VAST constantly takes more than a minute to be logged in. I've tried a few dozen times now, and there is no exception: VAST logs in in more than a minute, HTTPRequester is logged in in less than half a second.

So I definitely need help in finding the root cause for this long response time...


Joachim




Am Freitag, 17. Februar 2017 12:47:01 UTC+1 schrieb Joachim Tuchel:
Hi,


I am playing with a web service I want to connect to and see extremely bad response times.

While sending the the same POST Request with Firefox / HttpRequester gets an answer almost immediately, VA Smalltalk waits MORE THAN A MINUTE for an answer - on the same machine!

Here is my code snippet:

|client url response|
url
:= '<a href="https://easy.smoice.com/api/2.0/login" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Feasy.smoice.com%2Fapi%2F2.0%2Flogin\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFXVQFP-boSgN_b8jOldHgFd6Hf6g&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Feasy.smoice.com%2Fapi%2F2.0%2Flogin\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFXVQFP-boSgN_b8jOldHgFd6Hf6g&#39;;return true;">https://easy.smoice.com/api/2.0/login' sstAsUrl.
(client := SstHttpClient forTransportScheme: 'httpsl') startUp.
response
:= [
Transcript cr; show: (Time millisecondsToRun: [
client post
: '{"email": "test", "passwordHash":"encrypted PW"}' typed: 'application/json' at: url]) asString ] ensure: [ client shutDown ].
response

And this is the shockingly depressing output on my Transcript:

60622
60263


--->>> 60 Thousand milliseconds!!!!



And here is how long this takes with Firefox/HTTP Requestor on the same machine:





I'm using a fresh install of VAST 8.6.3. I followed the FAQs and copied the openssl libraries to the runtime directory (version 1.0.2k). Stepping through the code, I see that it's neither the startUp nor the shutDown that takes the time, it really is the post:typed:at: that takes so long.

Is the code I'm using wrong?
Is this an installation/config problem?
Do others see similar response (or should I say shipping) times?



Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [8.6.3] HTTPS Post is extremely slow

jtuchel
In reply to this post by jtuchel
Hi again,

Marten was so kind to give this a closer look on hins machine with correct login credentials, and he also had response times of more than a minute. He also debugged a little into this and I think there is a bug in VAST. So I contacted support.

Thanks everybody for your trying and posting your results.

Joachim




Am Freitag, 17. Februar 2017 12:47:01 UTC+1 schrieb Joachim Tuchel:
Hi,


I am playing with a web service I want to connect to and see extremely bad response times.

While sending the the same POST Request with Firefox / HttpRequester gets an answer almost immediately, VA Smalltalk waits MORE THAN A MINUTE for an answer - on the same machine!

Here is my code snippet:

|client url response|
url
:= '<a href="https://easy.smoice.com/api/2.0/login" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Feasy.smoice.com%2Fapi%2F2.0%2Flogin\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFXVQFP-boSgN_b8jOldHgFd6Hf6g&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Feasy.smoice.com%2Fapi%2F2.0%2Flogin\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFXVQFP-boSgN_b8jOldHgFd6Hf6g&#39;;return true;">https://easy.smoice.com/api/2.0/login' sstAsUrl.
(client := SstHttpClient forTransportScheme: 'httpsl') startUp.
response
:= [
Transcript cr; show: (Time millisecondsToRun: [
client post
: '{"email": "test", "passwordHash":"encrypted PW"}' typed: 'application/json' at: url]) asString ] ensure: [ client shutDown ].
response

And this is the shockingly depressing output on my Transcript:

60622
60263


--->>> 60 Thousand milliseconds!!!!



And here is how long this takes with Firefox/HTTP Requestor on the same machine:





I'm using a fresh install of VAST 8.6.3. I followed the FAQs and copied the openssl libraries to the runtime directory (version 1.0.2k). Stepping through the code, I see that it's neither the startUp nor the shutDown that takes the time, it really is the post:typed:at: that takes so long.

Is the code I'm using wrong?
Is this an installation/config problem?
Do others see similar response (or should I say shipping) times?



Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [8.6.3] HTTPS Post is extremely slow

jtuchel
So this issue is resolved now.

It was a bug in VAST, Seth from Instantiations has provided me with a patch for it and the response times are now down to something around 200 msec.
I guess the patch will soon be available for everybody.

Special thanks goes to Marten and Seth!


Joachim



Am Sonntag, 19. Februar 2017 13:40:33 UTC+1 schrieb Joachim Tuchel:
Hi again,

Marten was so kind to give this a closer look on hins machine with correct login credentials, and he also had response times of more than a minute. He also debugged a little into this and I think there is a bug in VAST. So I contacted support.

Thanks everybody for your trying and posting your results.

Joachim




Am Freitag, 17. Februar 2017 12:47:01 UTC+1 schrieb Joachim Tuchel:
Hi,


I am playing with a web service I want to connect to and see extremely bad response times.

While sending the the same POST Request with Firefox / HttpRequester gets an answer almost immediately, VA Smalltalk waits MORE THAN A MINUTE for an answer - on the same machine!

Here is my code snippet:

|client url response|
url
:= '<a href="https://easy.smoice.com/api/2.0/login" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Feasy.smoice.com%2Fapi%2F2.0%2Flogin\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFXVQFP-boSgN_b8jOldHgFd6Hf6g&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Feasy.smoice.com%2Fapi%2F2.0%2Flogin\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFXVQFP-boSgN_b8jOldHgFd6Hf6g&#39;;return true;">https://easy.smoice.com/api/2.0/login' sstAsUrl.
(client := SstHttpClient forTransportScheme: 'httpsl') startUp.
response
:= [
Transcript cr; show: (Time millisecondsToRun: [
client post
: '{"email": "test", "passwordHash":"encrypted PW"}' typed: 'application/json' at: url]) asString ] ensure: [ client shutDown ].
response

And this is the shockingly depressing output on my Transcript:

60622
60263


--->>> 60 Thousand milliseconds!!!!



And here is how long this takes with Firefox/HTTP Requestor on the same machine:





I'm using a fresh install of VAST 8.6.3. I followed the FAQs and copied the openssl libraries to the runtime directory (version 1.0.2k). Stepping through the code, I see that it's neither the startUp nor the shutDown that takes the time, it really is the post:typed:at: that takes so long.

Is the code I'm using wrong?
Is this an installation/config problem?
Do others see similar response (or should I say shipping) times?



Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [8.6.3] HTTPS Post is extremely slow

Seth Berman
Hi all,

Well, this problem goes back a long way, so I'll put some code here to solve the issue in any given release, but it will be in a slightly different form when it arrives in the next release.
The point of the change being, that for any given send/recv call in a blocking SSL socket...you have to do the logic as it's describing in it's looping send/recv counterpart.

SciSslBlockingDispatcher>>callRecvWith: socketHandle with: arg2 with: arg3 with: arg4
^self callLoopingRecvWith: socketHandle with: arg2 with: arg3 with: arg4

SciSslBlockingDispatcher>>callSendWith: socketHandle with: arg2 with: arg3 with: arg4
^self callLoopingSendWith: socketHandle with: arg2 with: arg3 with: arg4

-- Seth

On Sunday, February 19, 2017 at 2:30:12 PM UTC-5, Joachim Tuchel wrote:
So this issue is resolved now.

It was a bug in VAST, Seth from Instantiations has provided me with a patch for it and the response times are now down to something around 200 msec.
I guess the patch will soon be available for everybody.

Special thanks goes to Marten and Seth!


Joachim



Am Sonntag, 19. Februar 2017 13:40:33 UTC+1 schrieb Joachim Tuchel:
Hi again,

Marten was so kind to give this a closer look on hins machine with correct login credentials, and he also had response times of more than a minute. He also debugged a little into this and I think there is a bug in VAST. So I contacted support.

Thanks everybody for your trying and posting your results.

Joachim




Am Freitag, 17. Februar 2017 12:47:01 UTC+1 schrieb Joachim Tuchel:
Hi,


I am playing with a web service I want to connect to and see extremely bad response times.

While sending the the same POST Request with Firefox / HttpRequester gets an answer almost immediately, VA Smalltalk waits MORE THAN A MINUTE for an answer - on the same machine!

Here is my code snippet:

|client url response|
url
:= '<a href="https://easy.smoice.com/api/2.0/login" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Feasy.smoice.com%2Fapi%2F2.0%2Flogin\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFXVQFP-boSgN_b8jOldHgFd6Hf6g&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Feasy.smoice.com%2Fapi%2F2.0%2Flogin\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFXVQFP-boSgN_b8jOldHgFd6Hf6g&#39;;return true;">https://easy.smoice.com/api/2.0/login' sstAsUrl.
(client := SstHttpClient forTransportScheme: 'httpsl') startUp.
response
:= [
Transcript cr; show: (Time millisecondsToRun: [
client post
: '{"email": "test", "passwordHash":"encrypted PW"}' typed: 'application/json' at: url]) asString ] ensure: [ client shutDown ].
response

And this is the shockingly depressing output on my Transcript:

60622
60263


--->>> 60 Thousand milliseconds!!!!



And here is how long this takes with Firefox/HTTP Requestor on the same machine:





I'm using a fresh install of VAST 8.6.3. I followed the FAQs and copied the openssl libraries to the runtime directory (version 1.0.2k). Stepping through the code, I see that it's neither the startUp nor the shutDown that takes the time, it really is the post:typed:at: that takes so long.

Is the code I'm using wrong?
Is this an installation/config problem?
Do others see similar response (or should I say shipping) times?



Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [8.6.3] HTTPS Post is extremely slow

Wayne Johnston
Seth, can you characterize the scope of this bug?  My application uses SSL as a web services client, and we hit those methods but we've not noticed such a delay.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [8.6.3] HTTPS Post is extremely slow

Seth Berman
Hi Wayne,

As the manual for SSL_read states (provided this is a blocking socket...which the dispatcher dictates it is)
"If the underlying BIO is blocking, SSL_read() will only return, once the read operation has been finished or an error occurred, except when a renegotiation take place, in which case a SSL_ERROR_WANT_READ may occur. This behavior can be controlled with the SSL_MODE_AUTO_RETRY flag of the SSL_CTX_set_mode(3) call."

Basically, "except when a renegotiation take place" is the key here.  If that happens, and you only read once (i.e. the non-looping version)...then you've only done a partial read because the SSL_ERROR_WANT_READ error got ignored.  Data actually got written on the other side, so more needs to be read, in order to complete the SSL/TLS handshake.  You need to go into a read loop...the one seen in the looping version.
The same principles apply for write.

If it happen that there was no renegotiation, then your fine.  Otherwise, what will probably happen in practice is that the socket blocks until a timeout occurs...or maybe forever.  In Joachim's case, there was a 60 second tcp timeout, so it eventually completed...though not in the correct way.  It misidentified the initial response header because of the partial read.

It also only impacts callers of SciAbstractSocket>>primitiveReceive:length:from:flags:looping:copy:    (and primitiveSend:.....)
where the looping argument is false and the concrete socket is an SSL socket.

-- Seth


On Monday, February 20, 2017 at 1:05:13 PM UTC-5, Wayne Johnston wrote:
Seth, can you characterize the scope of this bug?  My application uses SSL as a web services client, and we hit those methods but we've not noticed such a delay.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Loading...