CounterpartyXCP / counterparty-core

Counterparty Protocol Reference Implementation
http://counterparty.io
MIT License
287 stars 206 forks source link

Node Chokes Intermittently #2603

Open adamkrellenstein opened 3 weeks ago

adamkrellenstein commented 3 weeks ago
Screenshot 2024-10-27 at 11 29 07 AM image
adamkrellenstein commented 2 weeks ago

This is causing issues...

Screenshot 2024-11-07 at 1 05 26 PM
adamkrellenstein commented 6 days ago

Able to reproduce with Locust tests against dev.counterparty.io:4000. When the latency spikes there are no logs for slow requests (at DEBUG) on the node and there are just fewer logs being captured! hm....

https://console.cloud.google.com/logs/query;query=resource.type%3D%22gce_instance%22%0Aresource.labels.instance_id%3D%228878289658435634410%22;cursorTimestamp=2024-11-15T22:42:08.663543005Z;startTime=2024-11-15T22:38:20.000Z;endTime=2024-11-15T22:44:20.000Z?inv=1&invt=AbhlpA&project=noted-extension-407918

Screenshot 2024-11-15 at 6 30 00 PM

image

adamkrellenstein commented 6 days ago

Seems like this is probably insufficient CPU, esp. with the asset conservation check...

adamkrellenstein commented 4 days ago

https://console.cloud.google.com/logs/query;query=resource.labels.instance_id%3D%228878289658435634410%22;cursorTimestamp=2024-11-18T01:25:08.948325060Z;startTime=2024-11-18T00:59:00.000Z;endTime=2024-11-18T01:26:00.000Z?project=noted-extension-407918&inv=1&invt=AbhxUQ

Screenshot 2024-11-17 at 8 24 45 PM Screenshot 2024-11-17 at 8 22 57 PM
adamkrellenstein commented 4 days ago

Three strategies for dealing with this:

  1. profile sqlite3
  2. add / update tracing for API watcher procesS
  3. record queries that trigger the problem for playback
adamkrellenstein commented 4 days ago

Also seeing this with the mempool and asset conservation check disabled

adamkrellenstein commented 4 days ago

there could be lots of obvious errors in the Gunicorn logs that we're not seeing https://github.com/CounterpartyXCP/counterparty-core/issues/2515

adamkrellenstein commented 3 days ago

Weirdly enough, the load test on commit 657d5c09 causes the choking but on develop does not.