Comments (9)
(def r (delay (redis-client ...)))
(@r [:get :foo])
should only connect when you make your first request. I think there's definitely value in having a :lazy-connect? option, though. Expect to see it in a future release.
from aleph.
Thanks Zach,
Tested out delaying the connection: dmix/documeds@2aca28b
But its still timing out on deploy. I've contacted Heroku, but its been almost 20hrs with no reply. So I imagine they dont have an easy answer either.
This may be more of a heroku problem than a Aleph, so I'll likely close this issue shortly unless I can think of some other ideas.
from aleph.
How is the timeout manifesting itself? I don't see a timeout on the Redis calls, this is just when it's connecting?
from aleph.
Could it be an issue with the options you pass to the client ?
From the names it seems you are using an URL instead of a hostname as a value for :host
https://github.com/dmix/documeds/blob/master/src/documeds/settings.clj#L4
https://github.com/dmix/documeds/blob/master/src/documeds/models/medication.clj#L19
from aleph.
Yeah I'd like to provide more details on where its timing out, but heroku/clojure isnt outputting anything. Here are the heroku logs https://gist.github.com/1842439
When I connect locally or to the remote repl ("heroku run lein run repl") and paste in the same aleph code, it works. So I imagine the credentials are fine. The url variable is indeed the RedisToGo host and not the full URL.
from aleph.
Okay, I see from your issue on the Heroku mailing list that it's never starting up the server. If you just
(def r nil)
does that boot up okay? If you've delayed the creation of the redis client, there's no way it should be interfering with the server starting up.
from aleph.
Yep, if I define (def r ()) it deploys fine.
from aleph.
Can you log when the redis-client is realized? Something like
(def r
(delay
(println "REALIZING...")
(redis-client {:host redis-url :password redis-pass :port redis-port})))
You might even try (.printStackTrace (Exception.)) within the delay scope to tell you what's triggering it. The only way the empty value and delay block can differ in the behavior is if something's realizing the client before the server binds to the port.
from aleph.
Went for a coffee and came back,now its running fine in production. Tried redeploying and it worked again.
It's possible that a) delaying the process fixed the issue and it didn't deploy properly earlier or b) a heroku staffer fixed the issue and hasnt notified me yet.
Either way its fixed and I appreciate the help.
from aleph.
Related Issues (20)
- Increase TCP SSL Buffer HOT 9
- Accept shutdownGracefully parameters HOT 15
- Wrong number of args (5) passed to: manifold.executor/thread-factory HOT 3
- `test-failed-ssl-handshake` broken on Java 8 HOT 5
- The client ignores content type when using byte arrays in multipart data HOT 3
- Impossible to set custom file name when using memory data in a multipart upload
- "Possibly confusing dependencies found" regression in 0.6.1 HOT 5
- Add support for `wrap-decompression` middleware HOT 9
- Please bump netty versions because of CVE-2023-34462 HOT 1
- Enable endpoint identification (aka hostname verification) for TLS clients by default? HOT 9
- Look into new Ring websocket support for Aleph HOT 2
- Add write backpressure by checking Channel writability
- Add support for aggregating all inbound data before calling server Ring handler HOT 2
- Default rejected-handler will leak buffers in raw stream HTTP servers HOT 1
- Overhaul docstring formatting for consistency HOT 2
- Hide application protocol config from users with `http-versions`
- Who uses Aleph? Add your name to this, we'd like to know HOT 4
- Reconsider `:aleph/`-namespaced keywords HOT 3
- io.netty.channel.AbstractChannelHandlerContext invokeExceptionCaught HOT 2
- 0.7.0-rc1 is crashing without brotli4j dependency #3530 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aleph.