Fork me on GitHub
#datomic
<
2018-10-29
>
stijn12:10:48

what does this error mean? what can we do to speed up the 'loading of the database'. This is when we do a first request to an ion function and are trying to open a connection.

{
  "Type": "clojure.lang.ExceptionInfo",
  "Message": "Loading database",
  "Data": {
    "CognitectAnomaliesCategory": "CognitectAnomaliesUnavailable",
    "CognitectAnomaliesMessage": "Loading database"
  },
  "At": [
    "clojure.core$ex_info",
    "invokeStatic",
    "core.clj",
    4739
  ]
}

marshall12:10:32

@stijn This indicates that you’ve hit a node that hasn’t yet loaded the requested database. You should only see this on ‘startup’ - are you getting the error in an ongoing system?

stijn12:10:51

no, when deploying a new version of the ions

stijn12:10:05

but it takes quite a while (couple of minutes)

marshall12:10:24

are you on production or solo? also, how big is the database?

stijn12:10:54

this is a production topology, but with the desired instance count set to 1 (staging environment, we don't want HA)

marshall12:10:20

i’m surprised it takes minutes; i would expect order of 15 seconds or so

stijn12:10:20

the error persisted for 11 minutes. i'll check the database size.

stijn12:10:15

Storage size (in bytes) 259.36 MB Item count 242,223

stijn12:10:21

in the dynamo table

mgrbyte15:10:55

Hi, I'm looking for an example of the invocation syntax for using a classpath functions within a transaction - can anyone point me at one? (or have I misunderstood what they can do?) (on-prem)

favila15:10:15

It's subtle. Use a symbol instead of a keyword for the transaction function

favila15:10:21

in the transaction

favila15:10:46

[my/tx-fn a b c] instead of [:my/tx-fn a b c]

favila15:10:13

the latter needs to be created with d/function or #db/fn and transacted in the database

favila15:10:29

the former just needs to be on the transactor's classpath

mgrbyte15:10:36

great, many thanks! out of curiosity, where did you find this? my google foo has deserted me (couldn't find it in datomic docs)

favila16:10:16

they never call out specifically the difference that one is a keyword resolving to a :db/ident entry another is a symbol resolving to a clojure function on the classpath

favila16:10:30

but that shows the comparison in invocation

favila16:10:16

also the section above shows how to add to the transactor's classpath via an environment variable

favila16:10:30

instead of adding more jars to libs/

mgrbyte16:10:27

thanks, I've seen that before but my brain failed me.. 😆 thx again

ro617:10:04

Can anyone give advice on debugging a Datomic Ion CodeDeploy failure (Solo topology)? It times out on the ValidateService step with nothing helpful showing up in the CloudWatch logs at all.

ro618:10:29

I think what's happening is that for whatever reason the app is starting really slow, so even though it's working, CodeDeploy gives up and rolls back. Is there a way to increase the timeout on that?

ro618:10:48

@jaret I'm unable to deploy to my Solo topology. CodeDeploy succeeds all the way to the ApplicationStart event almost immediately, then hangs on ValidateService until it times out (2 minutes). Then, at least 30 seconds later, I start seeing CloudWatch logs related to Datomic setting up the system (eg ClusterNodeCreate, CreateSoloComponents, and Registered solo node), followed by logs from my app indicating successful startup. I can't hit the new version though due to the CodeDeploy rolling back.

jaret19:10:03

If you’re not seeing any errors in cloudwatch, could you try a trick that I sometimes use to print the stack to console. Add a string to the end of your deploy command.

clojure -Adev -m datomic.ion.dev '{:op :deploy, :group jaret-lambda-test-compute, :uname jaret-testcommand}' <string here>

ro619:10:09

Tryng now...

ro619:10:18

Just FYI, I've been running deploys from the Repl using a modified version of https://gist.github.com/olivergeorge/cc0ca9a945cb372d35d97e45573656ee

ro619:10:43

now that I ran from the CLI again, I do see this:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See  for further details.

ro619:10:31

failed again with the same pattern

jaret19:10:06

Did the stack print?