This is a problem I'm having with the Redis-Clojure library, which is not strictly a Clojure issue. But, I know there are a lot of folks using it in the community, so I thought this might be a good shot for getting help. Sorry for the cross-post.
After adding about 16328 members to a set, the stack trace shows up. I believe it has to do with opening too many sockets on the Redis server, rather than the total number of members in the set. Is anyone using a connection pool with Redis-Clojure? If so, is there an example of one somewhere? Or, am I totally off base here? I think this error may also be causing a "Can't read correct number of bytes" error that is thrown by Redis-Clojure itself after some point (possibly after ports are all in use?). The code I'm using to reproduce this exception is here: http://gist.github.com/276511 Any suggestions appreciated. Thanks, Kyle adding member # 100000 ... counts down ... adding member # 83672 Exception in thread "main" java.net.NoRouteToHostException: Can't assign requested address (test_redis.clj:0) at clojure.lang.Compiler.eval(Compiler.java:4617) at clojure.lang.Compiler.load(Compiler.java:4931) at clojure.lang.Compiler.loadFile(Compiler.java:4898) at clojure.main$load_script__6637.invoke(main.clj:210) at clojure.main$init_opt__6640.invoke(main.clj:215) at clojure.main$initialize__6650.invoke(main.clj:243) at clojure.main$null_opt__6672.invoke(main.clj:268) at clojure.main$legacy_script__6687.invoke(main.clj:299) at clojure.lang.Var.invoke(Var.java:359) at clojure.main.legacy_script(main.java:32) at clojure.lang.Script.main(Script.java:20) Caused by: java.net.NoRouteToHostException: Can't assign requested address at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress (PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:432) at java.net.Socket.connect(Socket.java:525) at java.net.Socket.connect(Socket.java:475) at java.net.Socket.<init>(Socket.java:372) at java.net.Socket.<init>(Socket.java:186) at redis.internal$connect_to_server__44.invoke(internal.clj:32) at redis.internal$with_server_STAR___49.invoke(internal.clj:41) at user$add_random_value_to_set__588.invoke(test_redis.clj:38) at user$create_large_set__594.invoke(test_redis.clj:45) at user$eval__600.invoke(test_redis.clj:50) at clojure.lang.Compiler.eval(Compiler.java:4601) ... 10 more
-- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en