Java crash OOM


#1

We’re running the current version as the Elastic Beanstalk image you provide, totally vanilla. The instance has 2GB of ram. These were the crash logs, taken from /var/log/metabase inside the container.

Blockquote
03-13 23:27:38 WARN metabase.driver :: Don’t know how to map class ‘class org.postgresql.jdbc.PgArray’ to a Field base_type, falling back to :type/.
03-13 23:27:38 WARN metabase.driver :: Don’t know how to map class ‘class org.postgresql.jdbc.PgArray’ to a Field base_type, falling back to :type/
.
03-13 23:27:38 DEBUG metabase.middleware :: GET /api/collection/root/items 200 (85 ms) (7 DB calls). Jetty threads: 8/50 (6 busy, 15 idle, 0 queued)
03-13 23:27:38 DEBUG metabase.middleware :: POST /api/dataset 200 (1 s) (4 DB calls). Jetty threads: 8/50 (5 busy, 16 idle, 0 queued)
03-13 23:27:38 DEBUG metabase.middleware :: POST /api/dataset 200 (1 s) (4 DB calls). Jetty threads: 8/50 (5 busy, 16 idle, 0 queued)
03-13 23:27:38 DEBUG metabase.middleware :: GET /api/collection/root 200 (5 ms) (2 DB calls). Jetty threads: 8/50 (6 busy, 16 idle, 0 queued)
03-13 23:27:38 DEBUG metabase.middleware :: GET /api/database 200 (7 ms) (3 DB calls). Jetty threads: 8/50 (6 busy, 16 idle, 0 queued)
03-13 23:27:38 DEBUG metabase.middleware :: GET /api/automagic-dashboards/database/2/candidates 200 (110 ms) (6 DB calls). Jetty threads: 8/50 (6 busy, 16 idle, 0 queued)
03-13 23:27:39 INFO api.common :: connection closed, canceling request
org.eclipse.jetty.io.EofException
at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:286)
at org.eclipse.jetty.io.WriteFlusher.flush(WriteFlusher.java:429)
at org.eclipse.jetty.io.WriteFlusher.write(WriteFlusher.java:323)
at org.eclipse.jetty.io.AbstractEndPoint.write(AbstractEndPoint.java:380)
at org.eclipse.jetty.server.HttpConnection$SendCallback.process(HttpConnection.java:804)
at org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241)
at org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224)
at org.eclipse.jetty.server.HttpConnection.send(HttpConnection.java:538)
at org.eclipse.jetty.server.HttpChannel.sendResponse(HttpChannel.java:795)
at org.eclipse.jetty.server.HttpChannel.write(HttpChannel.java:846)
at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:240)
at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:216)
at org.eclipse.jetty.server.HttpOutput.flush(HttpOutput.java:398)
at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:297)
at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141)
at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229)
at java.io.BufferedWriter.flush(BufferedWriter.java:254)
at metabase.api.common$fn__23142$fn__23143.invoke(common.clj:396)
at metabase.api.common$fn__23142.invokeStatic(common.clj:394)
at metabase.api.common$fn__23142.invoke(common.clj:385)
at ring.core.protocols$fn__23034$G__23029__23043.invoke(protocols.clj:8)
at ring.util.servlet$update_servlet_response.invokeStatic(servlet.clj:106)
at ring.util.servlet$update_servlet_response.invoke(servlet.clj:91)
at ring.util.servlet$update_servlet_response.invokeStatic(servlet.clj:95)
at ring.util.servlet$update_servlet_response.invoke(servlet.clj:91)
at ring.adapter.jetty$proxy_handler$fn__62260.invoke(jetty.clj:26)
at ring.adapter.jetty.proxy$org.eclipse.jetty.server.handler.AbstractHandler$ff19274a.handle(Unknown Source)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.eclipse.jetty.server.Server.handle(Server.java:531)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:352)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:281)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102)
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:762)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:680)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: Broken pipe
at sun.nio.ch.FileDispatcherImpl.writev0(Native Method)
at sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:51)
at sun.nio.ch.IOUtil.write(IOUtil.java:148)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:504)
at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:266)
… 41 more
03-13 23:27:43 DEBUG metabase.middleware :: GET /api/metric 200 (3 ms) (1 DB calls). Jetty threads: 8/50 (6 busy, 16 idle, 0 queued)
03-13 23:27:43 DEBUG metabase.middleware :: GET /api/segment 200 (4 ms) (2 DB calls). Jetty threads: 8/50 (6 busy, 15 idle, 0 queued)
03-13 23:27:43 DEBUG metabase.middleware :: GET /api/database 200 (164 ms) (6 DB calls). Jetty threads: 8/50 (5 busy, 16 idle, 0 queued)
03-13 23:27:46 DEBUG metabase.middleware :: GET /api/database/5/autocomplete_suggestions 200 (16 ms) (6 DB calls). Jetty threads: 8/50 (5 busy, 17 idle, 0 queued)
03-13 23:27:55 DEBUG metabase.middleware :: GET /api/database/5/autocomplete_suggestions 200 (6 s) (6 DB calls). Jetty threads: 8/50 (10 busy, 13 idle, 1 queued)
Exception in thread “C3P0PooledConnectionPoolManager[identityToken->1bqq1hfa1nkvzorenrjo4|aafa634]-HelperThread-#1” java.lang.OutOfMemoryError: Java heap space
Exception in thread “C3P0PooledConnectionPoolManager[identityToken->1bqq1hfa1nkvzorenrjo4|aafa634]-HelperThread-#0” java.lang.OutOfMemoryError: Java heap space
03-13 23:33:34 WARN server.HttpChannel :: /api/database/5/autocomplete_suggestions
java.lang.OutOfMemoryError: Java heap space


#2

This was the query which caused it:
select *
from document_uri
inner join annotation
on document_uri.document_id = annotation.document_id
where annotation.groupid = ‘xxxxxxxx’
and annotation.updated > date(‘2019-01-18’)