Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yada may give out of memory exception (java.lang.OutOfMemoryError, OOM) when put under load #324

Open
ivarref opened this issue Aug 24, 2021 · 0 comments

Comments

@ivarref
Copy link
Contributor

ivarref commented Aug 24, 2021

Hi,

and thanks for a fine library.

Our yada server had been running fine for a few years. Recently however it has started experiencing OOM (out of memory) errors. It turns out that io.aleph/dirigiste version 0.1.5 has a known and fixed memory leak and that the latest yada version depends on dirigiste 0.1.5:

$ git remote -v
origin	[email protected]:juxt/yada.git (fetch)
origin	[email protected]:juxt/yada.git (push)

$ git checkout tags/1.2.15.1 -b v1.2.15.1
Switched to a new branch 'v1.2.15.1'

$ lein deps :tree | grep -B1 dirigiste
 [aero "1.0.1" :exclusions [[org.clojure/clojure]]]
 [aleph "0.4.4" :scope "test" :exclusions [[org.clojure/clojure] [io.aleph/dirigiste]]]
--
 [manifold "0.1.7-alpha5" :exclusions [[org.clojure/clojure]]]
   [io.aleph/dirigiste "0.1.5"]

dirigiste has some other serious issues, such as swallowing exceptions. I think the safest way to solve this problem as of now and as a yada user, is to simply pass in a standard thread pool when starting the yada server:

(yada.yada/listener some-routes
                    {:host     some-host
                     :port     some-port
                     :executor (java.util.concurrent.Executors/newFixedThreadPool 256)})

Hope this helps someone experiencing similar issues.

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

No branches or pull requests

1 participant