Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP service hangs when a http call is made inside a resource #3650

Closed
chalitha1989 opened this issue Nov 14, 2022 · 4 comments · Fixed by ballerina-platform/module-ballerina-http#1329
Assignees
Labels
module/http Points/1 Team/PCM Protocol connector packages related issues Type/Bug
Milestone

Comments

@chalitha1989
Copy link

chalitha1989 commented Nov 14, 2022

Description:

$subject. Please see the code and below steps to reproduce.

Steps to reproduce:

  1. Create a service using below code and then build and run.
import ballerina/http;


service / on new http:Listener(9090) {


    resource function get greeting() returns string|error {

         final http:Client clientEndpoint = check new ("https://run.mocky.io/v3/164eda0f-9980-4aa1-9e09-94d8ac6ca6e0");
         json resp = check clientEndpoint->get("/");
         return "Resp: " + resp.toBalString();
    }
}
  1. Execute below curl to invoke the service for the first time:

curl localhost:9090/greeting

  1. Execute the curl for the second time. The client and the server hangs.

Screenshot 2022-11-14 at 23 37 16

Affected Versions:

OS, DB, other environment details and versions:

Ballerina - 2201.2.3
Http - 2.4.3
Mac OS - 12.0.1 (21A559)

Related Issues (optional):

Suggested Labels (optional):

Suggested Assignees (optional):

@chalitha1989 chalitha1989 changed the title HTTP service hangs when a http call is made inside the resource HTTP service hangs when a http call is made inside a resource Nov 14, 2022
@chamil321 chamil321 added module/http Team/PCM Protocol connector packages related issues labels Nov 15, 2022
@chamil321
Copy link
Contributor

This occurs when client HTTP protocol is HTTP2 and backend service is HTTPS. As a workaround either you can downgrade the client to use HTTP1.1 or change the backend service to HTTP
We'll fix this and do a patch on 2201.2.x path

@chamil321
Copy link
Contributor

chamil321 commented Nov 15, 2022

Fix has been released with HTTP v2.4.4 to DEV CENTRAL for choreo testing today

@chamil321
Copy link
Contributor

chamil321 commented Nov 15, 2022

@github-actions
Copy link

This issue is NOT closed with a proper Reason/ label. Make sure to add proper reason label before closing. Please add or leave a comment with the proper reason label now.

      - Reason/EngineeringMistake - The issue occurred due to a mistake made in the past.
      - Reason/Regression - The issue has introduced a regression.
      - Reason/MultipleComponentInteraction - Issue occured due to interactions in multiple components.
      - Reason/Complex - Issue occurred due to complex scenario.
      - Reason/Invalid - Issue is invalid.
      - Reason/Other - None of the above cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module/http Points/1 Team/PCM Protocol connector packages related issues Type/Bug
Projects
None yet
3 participants