questdb / questdb/questdb

OOM exception is not well handled from HTTP Server

Open
#6,144 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

hacktoberfest
Dominant language
Java
Stars
17.3k
Forks
1.6k
Avg merge
5d 10h
Merged PRs (30d)
28

Description

To reproduce

HTTP connection times out when server experiences OOM here:

2025-09-15T13:10:47.0890734Z 0000-00-00T00:00:00.000000Z C Unhandled exception in worker minhttp_0
2025-09-15T13:10:47.0891595Z io.questdb.cairo.CairoException: [-1] global RSS memory limit exceeded [usage=7330513230, RSS_MEM_LIMIT=7330513230, size=64, memoryTag=33]
2025-09-15T13:10:47.0892945Z 	at io.questdb@9.0.4-SNAPSHOT/io.questdb.cairo.CairoException.instance(CairoException.java:375)
2025-09-15T13:10:47.0894187Z 	at io.questdb@9.0.4-SNAPSHOT/io.questdb.cairo.CairoException.nonCritical(CairoException.java:133)
2025-09-15T13:10:47.0895176Z 	at io.questdb@9.0.4-SNAPSHOT/io.questdb.std.Unsafe.checkAllocLimit(Unsafe.java:331)
2025-09-15T13:10:47.0897091Z 	at io.questdb@9.0.4-SNAPSHOT/io.questdb.std.Unsafe.malloc(Unsafe.java:248)
2025-09-15T13:10:47.0898003Z 	at io.questdb@9.0.4-SNAPSHOT/io.questdb.cutlass.http.HttpHeaderParser$BoundaryAugmenter.<init>(HttpHeaderParser.java:979)
2025-09-15T13:10:47.0899411Z 	at io.questdb@9.0.4-SNAPSHOT/io.questdb.cutlass.http.HttpHeaderParser.<init>(HttpHeaderParser.java:58)
2025-09-15T13:10:47.0901270Z 	at io.questdb@9.0.4-SNAPSHOT/io.questdb.cutlass.http.DefaultHttpHeaderParserFactory.newParser(DefaultHttpHeaderParserFactory.java:35)
2025-09-15T13:10:47.0902612Z 	at io.questdb@9.0.4-SNAPSHOT/io.questdb.cutlass.http.HttpConnectionContext.<init>(HttpConnectionContext.java:148)
2025-09-15T13:10:47.0904103Z 	at io.questdb@9.0.4-SNAPSHOT/io.questdb.cutlass.http.HttpServer$HttpContextFactory.lambda$new$0(HttpServer.java:371)
2025-09-15T13:10:47.0905338Z 	at io.questdb@9.0.4-SNAPSHOT/io.questdb.std.WeakMutableObjectPool.newInstance(WeakMutableObjectPool.java:69)
2025-09-15T13:10:47.0906921Z 	at io.questdb@9.0.4-SNAPSHOT/io.questdb.std.WeakMutableObjectPool.newInstance(WeakMutableObjectPool.java:31)
2025-09-15T13:10:47.0908022Z 	at io.questdb@9.0.4-SNAPSHOT/io.questdb.std.WeakObjectPoolBase.fill(WeakObjectPoolBase.java:92)
2025-09-15T13:10:47.0909432Z 	at io.questdb@9.0.4-SNAPSHOT/io.questdb.std.WeakMutableObjectPool.<init>(WeakMutableObjectPool.java:38)
2025-09-15T13:10:47.0911026Z 	at io.questdb@9.0.4-SNAPSHOT/io.questdb.network.IOContextFactoryImpl.lambda$new$0(IOContextFactoryImpl.java:43)
2025-09-15T13:10:47.0911858Z 	at io.questdb@9.0.4-SNAPSHOT/io.questdb.std.ThreadLocal.get(ThreadLocal.java:46)
2025-09-15T13:10:47.0913245Z 	at io.questdb@9.0.4-SNAPSHOT/io.questdb.network.IOContextFactoryImpl.setup(IOContextFactoryImpl.java:86)
2025-09-15T13:10:47.0914564Z 	at io.questdb@9.0.4-SNAPSHOT/io.questdb.network.AbstractIODispatcher.setup(AbstractIODispatcher.java:243)
2025-09-15T13:10:47.0915401Z 	at io.questdb@9.0.4-SNAPSHOT/io.questdb.mp.Worker.run(Worker.java:136)
2025-09-15T13:11:47.1173458Z 2025-09-15T13:11:47.112274Z I server-main QuestDB is shutting down...
QuestDB version:

latest

OS, in case of Docker specify Docker and the Host OS:

Linux (arm)

File System, in case of Docker specify Host File System:

ext4

Full Name:

Vlad Ilyushechenko

Affiliation:

QuestDB

Have you followed Linux, MacOs kernel configuration steps to increase Maximum open files and Maximum virtual memory areas limit?
  • Yes, I have
Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the stack trace through HttpHeaderParser, DefaultHttpHeaderParserFactory, HttpConnectionContext, and HttpServer, then inspect how the worker handles the CairoException from Unsafe.checkAllocLimit. Determine the expected HTTP connection behavior when parser allocation hits the global RSS limit and verify the result against the reported shutdown sequence.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.