brefphp / bref

Serverless PHP on AWS Lambda
https://bref.sh
MIT License
3.05k stars 364 forks source link

CURL SSL_ERROR_SYSCALL calling another Lambda #1801

Closed LorenzoRogai closed 2 months ago

LorenzoRogai commented 2 months ago

Description:

cURL error 56: OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 0 (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://xxx.execute-api.eu-central-1.amazonaws.com/api/v1

This is happening with the latest PHP 8.3 version 22 ARM layer by calling another lambda's URL using Laravel 10 + Guzzle. Could you please check?

mnapoli commented 2 months ago

version 22

Do you mean version 2.2.22? (https://github.com/brefphp/aws-lambda-layers/releases/tag/2.2.22)

LorenzoRogai commented 2 months ago

@mnapoli brefphp 2.1.21 released 3 weeks ago that contains arm-php-83-fpm version 22

image

This the ARN arn:aws:lambda:eu-central-1:534081306603:layer:arm-php-83-fpm:22

mnapoli commented 2 months ago

ok thanks, FYI the layer version is not the most relevant part because there are many different numbers 😅 (https://github.com/brefphp/bref/blob/master/layers.json)

mnapoli commented 2 months ago

Is that error happening every single time, or randomly? Is that happening to all HTTP calls, or only this specific URL? Was it happening the moment you upgraded Bref to the latest version?

If you downgrade Bref, is it working? If yes, with which version? Any extra context would be helpful too.

LorenzoRogai commented 2 months ago

@mnapoli sorry, we found a problem on our code. We're closing this

jes490 commented 1 month ago

If anyone looking, in our case this was caused by sending an empty payload for GET requests. After removing the payload everything went back to normal. It is also probably related to the OpenSSL 3.2.0 upgrade. https://github.com/curl/curl/issues/13389

LorenzoRogai commented 1 month ago

@jes490 yes. It was something related, we were sending a GET request with a body. CURL was supporting this (https://stackoverflow.com/a/15656884). Now it doesn't