Closed stbrody closed 1 month ago
Okay, new version up that waits for up to 10 seconds for the model to become available and then proceeds with startup anyway if the model hasn't been loaded in time. New output if the model is unable to be synced:
[2024-07-23T21:31:30.142Z] IMPORTANT: Connected to anchor service 'https://cas-clay.3boxlabs.com' with supported anchor chains ['eip155:100']
[2024-07-23T21:31:30.143Z] WARNING: No pinned streams detected. This is expected if this is the first time this node has been run, but may indicate a problem with the node's persistence setup if it should have pinned streams
[2024-07-23T21:31:30.151Z] IMPORTANT: Waiting for Model kjzl6hvfrbw6cb9pd0bl7zmm28h3qszh56ccpn50vsmrl7clroy4fvln00z7q6q used to publish Node Metrics to be available locally
[2024-07-23T21:31:30.688Z] ERROR: Error loading Model kjzl6hvfrbw6cb9pd0bl7zmm28h3qszh56ccpn50vsmrl7clroy4fvln00z7q6q used to publish Node Metrics: HTTPError: block was not found locally (offline)
[2024-07-23T21:31:31.229Z] ERROR: Error loading Model kjzl6hvfrbw6cb9pd0bl7zmm28h3qszh56ccpn50vsmrl7clroy4fvln00z7q6q used to publish Node Metrics: HTTPError: block was not found locally (offline)
[2024-07-23T21:31:31.764Z] ERROR: Error loading Model kjzl6hvfrbw6cb9pd0bl7zmm28h3qszh56ccpn50vsmrl7clroy4fvln00z7q6q used to publish Node Metrics: HTTPError: block was not found locally (offline)
[2024-07-23T21:31:32.291Z] ERROR: Error loading Model kjzl6hvfrbw6cb9pd0bl7zmm28h3qszh56ccpn50vsmrl7clroy4fvln00z7q6q used to publish Node Metrics: HTTPError: block was not found locally (offline)
[2024-07-23T21:31:32.821Z] ERROR: Error loading Model kjzl6hvfrbw6cb9pd0bl7zmm28h3qszh56ccpn50vsmrl7clroy4fvln00z7q6q used to publish Node Metrics: HTTPError: block was not found locally (offline)
[2024-07-23T21:31:33.352Z] ERROR: Error loading Model kjzl6hvfrbw6cb9pd0bl7zmm28h3qszh56ccpn50vsmrl7clroy4fvln00z7q6q used to publish Node Metrics: HTTPError: block was not found locally (offline)
[2024-07-23T21:31:33.884Z] ERROR: Error loading Model kjzl6hvfrbw6cb9pd0bl7zmm28h3qszh56ccpn50vsmrl7clroy4fvln00z7q6q used to publish Node Metrics: HTTPError: block was not found locally (offline)
[2024-07-23T21:31:34.413Z] ERROR: Error loading Model kjzl6hvfrbw6cb9pd0bl7zmm28h3qszh56ccpn50vsmrl7clroy4fvln00z7q6q used to publish Node Metrics: HTTPError: block was not found locally (offline)
[2024-07-23T21:31:34.946Z] ERROR: Error loading Model kjzl6hvfrbw6cb9pd0bl7zmm28h3qszh56ccpn50vsmrl7clroy4fvln00z7q6q used to publish Node Metrics: HTTPError: block was not found locally (offline)
[2024-07-23T21:31:35.471Z] WARNING: Could not load Model kjzl6hvfrbw6cb9pd0bl7zmm28h3qszh56ccpn50vsmrl7clroy4fvln00z7q6q used to publish Node Metrics, disabling metrics publishing
[2024-07-23T21:31:35.480Z] IMPORTANT: Ceramic API running on 0.0.0.0:7007'
Increased the timeout to 15 seconds because in my local testing the node was taking more than 10 seconds to sync the model fairly regularly.
Interestingly, how long it takes the node to sync the model on an brand new clean node seems to vary quite wildly. I saw it sync within milliseconds, the data already being present by the time js-ceramic tried to load it the first time, and I also saw it take as long as almost 20 seconds at least once.
FYI @dav1do @nathanielc
Closing in favor of https://github.com/ceramicnetwork/js-ceramic/pull/3268
Builds on https://github.com/ceramicnetwork/js-ceramic/pull/3260/
When starting up a clean js-ceramic node for the first time with node metrics publishing enabled, the node needs to wait for the NodeMetrics model to be synced via recon and made available locally before it tries to index it. Example out from a clean node as it waits for this to happen below: