-
Notifications
You must be signed in to change notification settings - Fork 758
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
[Bug]: Language Server shuts down when using a Ballerina project with large files #41862
Comments
The error is due to an out-of-memory issue occurring during the project build. The following error message is generated when we execute the
As a temporary measure, you can increase the max heap size allocated to the Ballerina Java process. |
I am using |
The issue happens at this point. According to this example, at this point, the syntax tree JSON element of Also, at this point, we can see a spike in memory usage in visualVM. Peek.2023-12-15.15-06.mp4 |
Seems like the above fix (#41569) I mentioned, is still not enough for this use case. |
One thing we can do here is to split large files into separate files. In this case, we have to do that from the open API side. Another one is, |
@KavinduZoysa I have manually split the |
Can you please attach your project? |
@KavinduZoysa You can download the project from here |
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. |
Description
When working with a Ballerina project that includes large files, particularly generated from an OpenAPI specification, the Ballerina Language Server unexpectedly shuts down, resulting in a "Stopping server timed out" error. This issue appears to be triggered when attempting to work with the generated Ballerina files.
Output log:
Steps to Reproduce
bal openapi -i esignature.rest.swagger-v2.1.json --mode client --client-methods resource
command to generate client.bal, types.bal, and utils.bal files.The text was updated successfully, but these errors were encountered: