This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-08-10
Channels
- # announcements (1)
- # babashka (18)
- # beginners (122)
- # calva (18)
- # cider (3)
- # cljs-dev (2)
- # cljsrn (3)
- # clojure (102)
- # clojure-europe (15)
- # clojure-france (2)
- # clojure-nl (1)
- # clojure-portugal (1)
- # clojure-spec (3)
- # clojure-uk (8)
- # clojurescript (46)
- # clojureverse-ops (5)
- # code-reviews (1)
- # conjure (2)
- # cursive (15)
- # datalog (13)
- # datomic (18)
- # emacs (4)
- # fulcro (8)
- # helix (8)
- # instaparse (1)
- # introduce-yourself (2)
- # jobs (4)
- # leiningen (23)
- # lsp (26)
- # malli (21)
- # off-topic (34)
- # pedestal (21)
- # polylith (6)
- # reitit (5)
- # remote-jobs (3)
- # schema (1)
- # sci (8)
- # shadow-cljs (8)
- # spacemacs (3)
- # sql (30)
- # testing (31)
- # tools-deps (21)
- # vim (25)
- # xtdb (8)
I have a Heroku app and the backend db has been updated from postgres 9.x to 13.x. And now, even after updating jdbc to 0.7.12, I am seeing errors like this:
2021-08-10T22:40:06.634893+00:00 app[web.1]: WARNING: Having failed to acquire a resource, com.mchange.v2.resourcepool.BasicResour
cePool@22e131dc is interrupting all Threads waiting on a resource to check out. Will try again in response to new client requests.
2021-08-10T22:40:06.637060+00:00 app[web.1]: Aug 10, 2021 10:40:06 PM com.mchange.v2.resourcepool.BasicResourcePool
2021-08-10T22:40:06.637061+00:00 app[web.1]: WARNING: com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@14790d07
-- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed mo
re than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception:
2021-08-10T22:40:06.637062+00:00 app[web.1]: org.postgresql.util.PSQLException: This ResultSet is closed.
Any thoughts?
did you update your PG driver too?
Like I said, it’s an ancient app 😉
You’d think there’d be an error message somewhere suggesting incompatibility or something….
(updating java.jdbc
isn't going to help you there but it's nice to be on the most recent version anyway 🙂 )
Well, it looks like everything is fixed!
So it seems I was updating the wrong thing.
Actually, if that’s the case, the next app I’m fixing should be much simpler… I had to write a macro to handle the with-connection
change in a reasonable time, but that might not be necessary… stay tuned…
The PG driver has gone through major changes over time...
"the with-connection
change" @jmckitrick?
Yes, the jdbc I was using was so old, when I updated (apparently mistakenly) I had to change all the SQL calls to pass the connection spec instead of using with-connection
Wow, that must have been very old 👀
Yes, it really was. And running fine all this time.
Back when Clojure was unofficially supported on Heroku…
git
tells me that repo first commit was.. Dec 29, 2012
A testament to Clojure's stability I guess. The java.jdbc
API last changed about 5 1/2 years ago, removing functions that had been deprecated for "years".
I assume with-connection
was one of them? 😜
We still have some code written for Clojure 1.3 that is still running unchanged (although our more recent code is already taking advantage of 1.11 Alpha 1)
Changes in 0.3.0-rc1
Deprecate db-transaction (new in 0.3.0) in favor of with-db-transaction JDBC-81.
Add with-db-metadata macro and metadata-result function to make it easier to work with SQL metadata JDBC-80.
Add with-db-connection macro to make it easier to run groups of operations against a single open connection JDBC-79.
That was released at the end of 2013 🙂I’m out of the loop… where’s the list of exciting goodies in 1.11?
https://clojure.org/releases/devchangelog -- the named argument/hash map stuff is the only change so far in Clojure itself.
The CLI tooling / tools.build
has seen a lot of innovation recently 🙂
Oh yes, that was Fogus’ doing….
Are you keeping up with the CLI stuff?
Actually, no… I’m more focused on CIDER stuff
But we use tools.deps at our shop
Is there a similar change log for CLI tools?