Ok, I found the problem. It's not related to the Clojure JDBC API, but
to the number of ports opened on localhost in a very short period of
time. Linux has a TIME_WAIT configuration for connections opened, and
default TIME_WAIT period is set to 60s. The maximum number of open
connections is limited on a system, and if within a minute to many
connections are made to a machine, the TIME_WAIT setting can block any
new connections to the system.

I could work around this problem by setting
net.ipv4.tcp_tw_recycle=1
in /etc/sysctl.conf, but that setting might cause TCP problems as I've read.

With that setting, inserting 100.000 items into the table just ran
through without any problems/exceptions. Here's a blog post describing
some performance tuning settings for Ubuntu, for anyone running into a
similar problem:
http://samiux.blogspot.de/2011/04/howto-performance-tuning-on-ubuntu.html

Or just use c3p0 with clojure.java.jdbc.

- Raju

-- 
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

Reply via email to