This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-04-22
Channels
- # beginners (114)
- # boot (10)
- # cljs-dev (18)
- # clojure (57)
- # clojure-russia (12)
- # clojure-spec (2)
- # clojure-uk (1)
- # clojurescript (62)
- # cursive (49)
- # datomic (3)
- # emacs (2)
- # mount (1)
- # off-topic (25)
- # onyx (58)
- # pedestal (5)
- # re-frame (5)
- # ring-swagger (1)
- # specter (8)
- # unrepl (2)
- # untangled (4)
- # vim (10)
- # yada (39)
I'm getting situations where the yada server stops responding, in order to send cljs figwheel app and request to the same origin I have an endpoint that hosts the static files, but that stops responding too. I don't know how to debug a running yada instance. I suspect one of the endpoints' buffers gets full. I have a few normal endpoints and one that sends datascript transactions via SSE using s/connect to a bus topic (this is awesome by the way). But now I can't figure out where it goes wrong.
@bbss Just a hunch from a few weeks ago, if you curl
to yada after it has locked up, does the same thing happen?
Are you using a reloaded workflow and resetting, or is the in prod?
If you're using a manofold @bbss are you certain you are shutting everything down and not leaving anything lingering across resets?
@malcolmsparks I am just starting manually using cider
(def server (yada/listener (routes) {:port 3000}))
#_((:close server))
It could be that the bus that I store in an atom causes some problems? How would I know?
I can paste the code, it's not very verbose, just a naïve sync to everyone interested in one datascript db.
It's been wonderful to work with so far. Really cool to prototype with and I hope I can eventually use it in production when I make something useful.
My thoughts are that perhaps closing the aleph server doesn't cause everything to be cleaned up, so there is some resource leakage eventually causing everything to lock up
But if you are storing a single bus in an atom that leads me to suspect that is not the problem. Unless you are ever re-requring the namespace containing that atom
Are you using defonce for the atom?
I'm a bit stumped. How quickly does the lock up manifest itself?
I don't have the issue now but I think the thing @dominicm was referring to is the browser having limits on open requests maybe. Which is a valid concern as when I close the server a ton of open subscriptions fail.
That's my thoughts. Could be to do with manifold streams
Right. Always check with curl
Browsers limit sse connections to the same origin to 4
Ah, good to know. Let me check, it might have been triggered by opening too many different subs.
Great to hear. Yada shares a lot of infrastructure with Netty, and a huge benefit is that when things go wrong it is usually in user-space.
Manifold is awesome but you have to be careful to tidy up
The way manifold is designed gives you the control, which is the right design in my view
Yes, I do feel like I am building on solid fundamentals. Manifold looks like a good choice for scaling. But yeah, I do need to figure out how to not get a memory leak somewhere or something like that. Not sure yet how to do that and how I will find out. I know storing this somewhat ephemeral bus in an atom is probably not the way to go.
periodic cleaning up of the buses with no downstream consumers seems like something I'll need to do.
The best advice I can give is to keep things simple and reason about your design, thinking about it until you properly understand what is going on. Take some time to draw pictures or diagrams on scrap paper if that helps.
Let me know how it works out @lmergen !