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

AWS Funqy Lambda native image Timeout #13595

Closed
EzxD opened this issue Dec 1, 2020 · 9 comments · Fixed by #13610
Closed

AWS Funqy Lambda native image Timeout #13595

EzxD opened this issue Dec 1, 2020 · 9 comments · Fixed by #13610

Comments

@EzxD
Copy link

EzxD commented Dec 1, 2020

Describe the bug
Deploying my funqy lamda function in jvm works perfectly fine.
After cleaning and building new with mvn package -Pnative -Dquarkus.native.container-build=true and deploying with ./manage.sh native create the functions times out https://i.imgur.com/JVfUfIy.png

Expected behavior
Maybe any response? :)

Actual behavior
Not getting any response :(

To Reproduce

https://github.com/EzxD/Quarkus-Funqy-Native-Example

Steps to reproduce the behavior:

  1. mvn package -Pnative -Dquarkus.native.container-build=true
  2. ./target/manage.sh native create
  3. send test from AWS get a time out

Configuration

quarkus.hibernate-orm.database.generation=drop-and-create
quarkus.funqy.export=helloWorld.

Screenshots
https://i.imgur.com/JVfUfIy.png

Environment (please complete the following information):

  • Output of uname -a or ver: Linux Pauls-PC 4.19.128-microsoft-standard Switch to the Maven distributed copy of the SubstrateVM annotations #1 SMP Tue Jun 23 12:58:10 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
  • Output of java -version:
  • GraalVM version (if different from Java): openjdk version "11.0.9.1" 2020-11-04
    OpenJDK Runtime Environment (build 11.0.9.1+1-Ubuntu-0ubuntu1.20.04)
    OpenJDK 64-Bit Server VM (build 11.0.9.1+1-Ubuntu-0ubuntu1.20.04, mixed mode, sharing)
  • Quarkus version or git rev: https://github.com/EzxD/Quarkus-Funqy-Native-Example (quarkus verion 1.10.1.Final)
  • Build tool (ie. output of mvnw --version or gradlew --version): Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
    Maven home: /mnt/c/apache-maven-3.6.3
    Java version: 11.0.9.1, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64
    Default locale: en, platform encoding: UTF-8
    OS name: "linux", version: "4.19.128-microsoft-standard", arch: "amd64", family: "unix"
@EzxD EzxD added the kind/bug Something isn't working label Dec 1, 2020
@ghost
Copy link

ghost commented Dec 1, 2020

/cc @Sanne, @gsmet, @matejvasek, @patriot1burke

@matejvasek
Copy link
Contributor

@EzxD Could you please try adding some input pram for the helloWorld function? I have suspicion there is an issue when function takes no input.

@matejvasek
Copy link
Contributor

I think that this is caused by this code:
4e2502b#diff-b0bcdc4c5807481b0e5fc7652e0ea523623924d6e2acfc0f555deb1a001082d3R66-R70

@steve-hb
Copy link

steve-hb commented Dec 1, 2020

I think that this is caused by this code:
[4e2502b#diff-b0bcdc4c5807481b0e5fc7652e0ea523623924d6e2acfc0f555deb1a001082d3R66-R70]
(4e2502b#diff-b0bcdc4c5807481b0e5fc7652e0ea523623924d6e2acfc0f555deb1a001082d3R66-R70)

Doesn't this only apply for JVM based artifacts?

@EzxD
Copy link
Author

EzxD commented Dec 1, 2020

Even using the native image with the createUser method the function is timing out
https://i.imgur.com/0jwlhOc.png

@EzxD
Copy link
Author

EzxD commented Dec 1, 2020

I am even getting a timeout using following application.properties

quarkus.datasource.db-kind=h2
quarkus.datasource.jdbc.url=jdbc:h2:tcp://localhost/mem:test
quarkus.hibernate-orm.log.sql=true
quarkus.hibernate-orm.database.generation=drop-and-create
quarkus.funqy.export=createUser

https://i.imgur.com/3qORuUv.png

thats the output of the CloudWatchLogs

Error loading class io.quarkus.funqy.lambda.FunqyStreamHandler: Metaspace: java.lang.OutOfMemoryError
java.lang.OutOfMemoryError: Metaspace

Exception in thread "main" java.lang.Error: java.lang.OutOfMemoryError: Metaspace
at lambdainternal.AWSLambda.startRuntime(AWSLambda.java:194)
at lambdainternal.AWSLambda.main(AWSLambda.java:187)
Caused by: java.lang.OutOfMemoryError: Metaspace
Exception in thread "Thread-4" java.lang.OutOfMemoryError: Metaspace
START RequestId: 89061110-0c92-4c14-b1df-a0fa705e7b6a Version: $LATEST
END RequestId: 89061110-0c92-4c14-b1df-a0fa705e7b6a
REPORT RequestId: 89061110-0c92-4c14-b1df-a0fa705e7b6a	Duration: 15003.09 ms	Billed Duration: 15000 ms	Memory Size: 256 MB	Max Memory Used: 53 MB	
2020-12-01T20:36:54.853Z 89061110-0c92-4c14-b1df-a0fa705e7b6a Task timed out after 15.00 seconds

Error loading class io.quarkus.funqy.lambda.FunqyStreamHandler: Metaspace: java.lang.OutOfMemoryError
java.lang.OutOfMemoryError: Metaspace

Exception in thread "main" java.lang.Error: java.lang.OutOfMemoryError: Metaspace
at lambdainternal.AWSLambda.startRuntime(AWSLambda.java:194)
at lambdainternal.AWSLambda.main(AWSLambda.java:187)
Caused by: java.lang.OutOfMemoryError: Metaspace
Exception in thread "Thread-4" java.lang.OutOfMemoryError: Metaspace
START RequestId: 4ccc99b9-f98b-43ea-9b7a-2e052d7f2ac8 Version: $LATEST
END RequestId: 4ccc99b9-f98b-43ea-9b7a-2e052d7f2ac8
REPORT RequestId: 4ccc99b9-f98b-43ea-9b7a-2e052d7f2ac8	Duration: 15014.73 ms	Billed Duration: 15000 ms	Memory Size: 256 MB	Max Memory Used: 54 MB	
2020-12-01T20:41:16.655Z 4ccc99b9-f98b-43ea-9b7a-2e052d7f2ac8 Task timed out after 15.01 seconds

Error loading class io.quarkus.funqy.lambda.FunqyStreamHandler: Metaspace: java.lang.OutOfMemoryError
java.lang.OutOfMemoryError: Metaspace

Exception in thread "main" java.lang.Error: java.lang.OutOfMemoryError: Metaspace
at lambdainternal.AWSLambda.startRuntime(AWSLambda.java:194)
at lambdainternal.AWSLambda.main(AWSLambda.java:187)
Caused by: java.lang.OutOfMemoryError: Metaspace
Exception in thread "Thread-4" java.lang.OutOfMemoryError: Metaspace

@steve-hb
Copy link

steve-hb commented Dec 1, 2020

We'll try to replace the H2 and use an in-memory list

@steve-hb
Copy link

steve-hb commented Dec 1, 2020

Ok, we tried the "UserCreate" function of our example and it worked. Conclusion would be, that it's really a problem with function not having parameters at all.

@matejvasek
Copy link
Contributor

I'll submit PR then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants