ngs-doo / revenj

DSL Platform compatible backend
https://dsl-platform.com
BSD 3-Clause "New" or "Revised" License
268 stars 44 forks source link

OutOfMemoryError #182

Open araneta opened 2 years ago

araneta commented 2 years ago

I tried to run java -jar dsl-clc.jar on server i got this error OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:3332) at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:124) at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:448) at java.lang.StringBuilder.append(StringBuilder.java:136) at java.sql.SQLWarning.(SQLWarning.java:82) at org.postgresql.util.PSQLWarning.(PSQLWarning.java:16) at org.postgresql.core.v3.QueryExecutorImpl.receiveNoticeResponse(QueryExecutorImpl.java:2457) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2213) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308) at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441) at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365) at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:307) at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:293) at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:270) at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:266) at com.dslplatform.compiler.client.parameters.PostgresConnection$1.run(PostgresConnection.java:176) at java.lang.Thread.run(Thread.java:748)

is it possible to run this dsl-clc.jar in limited memory? how to solve this problem? Thanks

zapov commented 2 years ago

I'm assuming you asked it to apply the migration? You can ask it to just create the migration and you can apply it yourself.

Without more info its hard to tell what problem you are really experiencing.

araneta commented 2 years ago

yes here is the properties file: dsl=./dsl-tenant-wp42tagfpq postgres=localhost/multi?user=postgres&password=xxx migration apply force

so i have to change it to: dsl=./dsl-tenant-wp42tagfpq postgres=localhost/multi?user=postgres&password=xxx migration

like that? Thanks for your help

zapov commented 2 years ago

yes, that sounds good

araneta commented 2 years ago

Creating SQL migration for Postgres ... Running the migration took 123 second(s) Error saving migration script to /tmp/DSL-Platform/xx/postgres-sql-migration-1654244927113.sql /tmp/DSL-Platform/xx/postgres-sql-migration-1654244927113.sql (Permission denied)

is it possible to set the path of the migration sql file? Thanks

araneta commented 2 years ago

ok i found it -sql=

araneta commented 2 years ago

i can run the migration sql file using psql but I don't know how to use 'force' to apply the migration. do you know how to do that

zapov commented 2 years ago

force is not really relevant if you are applying sql via psql