Quarkus: AWS Funqy Lambda native image Timeout

Created on 1 Dec 2020  路  9Comments  路  Source: quarkusio/quarkus

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 #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"
areamazon-lambda arefunqy arehibernate-orm arepersistence kinbug

Most helpful comment

I'll submit PR then.

All 9 comments

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

@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.

I think that this is caused by this code:
https://github.com/quarkusio/quarkus/commit/4e2502bee17e21b8870592abedd4bcad95301426#diff-b0bcdc4c5807481b0e5fc7652e0ea523623924d6e2acfc0f555deb1a001082d3R66-R70

I think that this is caused by this code:
[4e2502b#diff-b0bcdc4c5807481b0e5fc7652e0ea523623924d6e2acfc0f555deb1a001082d3R66-R70]
(https://github.com/quarkusio/quarkus/commit/4e2502bee17e21b8870592abedd4bcad95301426#diff-b0bcdc4c5807481b0e5fc7652e0ea523623924d6e2acfc0f555deb1a001082d3R66-R70)

Doesn't this only apply for JVM based artifacts?

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

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

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

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.

I'll submit PR then.

Was this page helpful?
0 / 5 - 0 ratings