Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

spray-http: Potential memory leak #1106

Open
keynmol opened this issue Apr 21, 2016 · 2 comments
Open

spray-http: Potential memory leak #1106

keynmol opened this issue Apr 21, 2016 · 2 comments

Comments

@keynmol
Copy link

keynmol commented Apr 21, 2016

Prologue: I've been load testing our app with Apache Bench and noticed that sometimes same test would stop for a few seconds and then continue, other time the throughput was pretty much exactly what I expected from Spray. It felt random and annoying as I want to guarantee median response time within acceptable limits.

Spent ages investigating locks in all the libraries the project is using, but I seem to have tracked it down to random and long GC pauses. So I made a reproducible (I hope) example - it's very simple, really, so I guess I'm doing something exceptionally stupid.

Full example is here: https://github.com/keynmol/spray-test

The problem is that without sending any requests to the server the memory consumption keeps growing:

And the top heap histogram looks like this:

char[] and byte[] were visibly growing while I was taking the screenshot.

Any help would be appreciated, cheers.

@keynmol
Copy link
Author

keynmol commented Apr 21, 2016

While I was taking a shower, it kept on:

@jason-ni
Copy link

Not sure my case is the same with you. I have a Spray-can reverse proxy service and observed it has memory leaks. In my case, it's the akka memory leaks: akka/akka#19216
And in my test case, there's heavy load of the akka system.

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

No branches or pull requests

2 participants