Re: Error from OpenSSL after a while
Pietro Cerutti via Chicken-users <[email protected]>
| Newsgroups | gmane.lisp.scheme.chicken |
|---|---|
| Message-ID | <01070197e65f52f3-7da28133-b246-4d83-9f98-42c81e6bcb7f-000000@eu-central-1.amazonses.com> |
On Jul 07 2025, 18:12 +0000, Kristian Lein-Mathisen <[email protected]> wrote: [-- Type: text/plain; charset=UTF-8, Encoding: 7bit, Size: 2.5K --] >I'm unable to reproduce this. I replaced (read) with (thread-sleep! 1) and >after 100s I C-c'd. Hi Kristian, it usually takes longer for me to repro. A few hours. > Could this be the google servers that's banning your IP >quicker than mine, and quickly shutting down the TCP connection? I don't >know what else could be causing this. Perhaps you could try with a local >https service. No, I don't think so. I've used google.com as an example, but I'm having an issue in production with Dropbox download URLs. Several of them. > >==== >$ chicken-status -list|grep ssl >(openssl "2.2.6") > >On Mon, Jul 7, 2025, 15:57 Pietro Cerutti via Chicken-users < >[email protected]> wrote: > >> I've been chasing this for months. I have a long-running process that >> sometimes needs to do an HTTPS call. The call sometimes fails with an >> error out of OpenSSL. >> >> Here's the code: >> >> --------------------------------------------------------------------- >> (import >> (scheme) >> (openssl) >> (only (chicken base) cut) >> (only (chicken condition) condition->list handle-exceptions) >> (only (chicken format) printf) >> (only (chicken io) read-string) >> (only (chicken time) current-seconds) >> (only (chicken time posix) seconds->string) >> (only (http-client) call-with-input-request)) >> >> >> (define (dd . msg) >> (printf "~A - ~A~%" (seconds->string (current-seconds)) msg)) >> >> (let loop () >> (read) >> (handle-exceptions exn >> (begin >> (dd "call failed" (condition->list exn))) >> (begin >> (dd "call start") >> (call-with-input-request >> "https://google.com" >> #f >> (lambda (in) >> (dd (string-length (read-string #f in))))) >> (dd "call end"))) >> (loop)) >> --------------------------------------------------------------------- >> >> And here's what I get after triggering the fetch a few time: >> >> $ chicken-csi -s openssl-error.scm >> foo >> Mon Jul 7 11:53:36 2025 - (call start) >> Mon Jul 7 11:53:36 2025 - (17789) >> Mon Jul 7 11:53:36 2025 - (call end) >> foo >> Mon Jul 7 11:53:41 2025 - (call start) >> Mon Jul 7 11:53:41 2025 - (34456) >> Mon Jul 7 11:53:41 2025 - (call end) >> foo >> Mon Jul 7 11:56:24 2025 - (call start) >> Mon Jul 7 11:56:24 2025 - (34456) >> Mon Jul 7 11:56:24 2025 - (call end) >> foo >> Mon Jul 7 13:31:49 2025 - (call start) >> Mon Jul 7 13:31:49 2025 - (call failed ((exn message error:0A000197:SSL >> routines::shutdown while in init location ssl-shutdown arguments ()) (i/o) >> (net) (openssl status ssl))) >> --------------------------------------------------------------------- >> >> Can people reproduce it? Do people have any clue? >> >> Thanks! >> >> -- >> Pietro Cerutti >> I have pledged to give 10% of income to effective charities >> and invite you to join me - https://givingwhatwecan.org >> >> [-- Alternative Type #1: text/html; charset=UTF-8, Encoding: quoted-printable, Size: 3.9K --] -- Pietro Cerutti I have pledged to give 10% of income to effective charities and invite you to join me - https://givingwhatwecan.org