diff --git a/hive/db/adapter.py b/hive/db/adapter.py index e3dd7852e0eed34cb2c5af77cd40a5fd0ce3b486..ffca8499834565379f17f05c2a4ea2a1dcd862ec 100644 --- a/hive/db/adapter.py +++ b/hive/db/adapter.py @@ -180,8 +180,8 @@ class Db: Stats.log_db(sql, perf() - start) return result except Exception as e: - log.error("[SQL-ERR] %s in query %s (%s)", - e.__class__.__name__, sql, kwargs) + log.info("[SQL-ERR] %s in query %s (%s)", + e.__class__.__name__, sql, kwargs) raise e @staticmethod diff --git a/hive/server/serve.py b/hive/server/serve.py index 547edf4cf7489e54d9bcc0f8af7d93f9174098f0..f20b17c01efa0f3d4f3d7a43ea7ad5d67a85c9a6 100644 --- a/hive/server/serve.py +++ b/hive/server/serve.py @@ -102,14 +102,8 @@ def run_server(conf): try: return await hive_api.db_head_state() except OperationalError as e: - if 'could not connect to server: Connection refused' in str(e): - log.warning("could not get head state (connection refused)") - return None - if 'the database system is shutting down' in str(e): - log.warning("could not get head state (db shutting down)") - return None - if 'terminating connection due to administrator command' in str(e): - log.warning("could not get head state (admin terminated)") + if conf.get('sync_to_s3'): + log.info("could not get head state (%s)", e) return None raise e diff --git a/hive/steem/block/schedule.py b/hive/steem/block/schedule.py index c88ea8b6738e40b56b065840bc2c4f608811affa..1e989b9653e3e6d9a9797afd09499ac604745e31 100644 --- a/hive/steem/block/schedule.py +++ b/hive/steem/block/schedule.py @@ -61,8 +61,8 @@ class BlockSchedule: self._last_date = date else: self._drift_backward() - log.warning("block %d not available. head:%s drift:%fs", - num, self._head_num, self._drift) + log.info("block %d not available. head:%s drift:%fs", + num, self._head_num, self._drift) def _check_head_date(self, num, date): """Sanity-checking of head block date. diff --git a/scripts/entrypoint.sh b/scripts/entrypoint.sh index 6f4ce66265cd63b53ba8a2db31866be132fc636d..c5793c55acd3ec13afd70991a8a515aeb51dda24 100644 --- a/scripts/entrypoint.sh +++ b/scripts/entrypoint.sh @@ -77,7 +77,7 @@ echo hivemind: starting server if [[ ! "$SYNC_TO_S3" ]]; then exec "${POPULATE_CMD}" server else - exec "${POPULATE_CMD}" server 2>&1& + exec "${POPULATE_CMD}" server --log-level=warning 2>&1& mkdir -p /etc/service/hivesync cp /usr/local/bin/hivesync.sh /etc/service/hivesync/run chmod +x /etc/service/hivesync/run