Skip to content

Conversation

@rodrigo-o
Copy link
Collaborator

Motivation

We were setting the FD limit after the storage initialization, which made the node unable to start if we stopped it after a sync.

Description

Just move the FD limit before the storage setup

@github-actions github-actions bot added the L1 Ethereum client label Oct 13, 2025
@rodrigo-o rodrigo-o marked this pull request as ready for review October 13, 2025 16:19
@rodrigo-o rodrigo-o requested a review from a team as a code owner October 13, 2025 16:19
Copilot AI review requested due to automatic review settings October 13, 2025 16:19
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a startup issue where the node fails to restart after being stopped during sync by moving the file descriptor (FD) limit setting before storage initialization.

  • Move raise_fd_limit()? call from after metrics initialization to before storage setup
  • Ensures FD limits are properly configured before any storage operations that might require file handles

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@ethrex-project-sync ethrex-project-sync bot moved this to In Review in ethrex_l1 Oct 13, 2025
@rodrigo-o
Copy link
Collaborator Author

This was the log after starting an already synced node:

2025-10-13T14:47:14.460826Z  INFO ethrex::utils: ══════════════════════════════════════════════════════════════════════
2025-10-13T14:47:14.460846Z  INFO ethrex::utils: NETWORK CONFIGURATION
2025-10-13T14:47:14.460849Z  INFO ethrex::utils: ══════════════════════════════════════════════════════════════════════
2025-10-13T14:47:14.460887Z  INFO ethrex::utils: Chain ID: 1 (mainnet)
2025-10-13T14:47:14.460889Z  INFO ethrex::utils: 
2025-10-13T14:47:14.460890Z  INFO ethrex::utils: Network is post-merge
2025-10-13T14:47:14.460892Z  INFO ethrex::utils: 
2025-10-13T14:47:14.460893Z  INFO ethrex::utils: Post-Merge hard forks (timestamp based):
2025-10-13T14:47:14.460895Z  INFO ethrex::utils: - Shanghai: @1681338455
2025-10-13T14:47:14.460896Z  INFO ethrex::utils: - Cancun: @1710338135
2025-10-13T14:47:14.460898Z  INFO ethrex::utils: - Prague: @1746612311
2025-10-13T14:47:14.460899Z  INFO ethrex::utils: - Osaka: @1764798551
2025-10-13T14:47:14.460901Z  INFO ethrex::utils: 
2025-10-13T14:47:14.519490Z  INFO ethrex::utils: Genesis Block Hash: d4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3
2025-10-13T14:47:14.519503Z  INFO ethrex::utils: ══════════════════════════════════════════════════════════════════════
2025-10-13T14:47:14.519517Z  INFO ethrex_storage::store: Opening storage engine engine=RocksDB path="/home/admin/.local/share/ethrex"
2025-10-13T14:47:14.527617Z  INFO ethrex_storage::store_db::rocksdb: Found existing column families: ["default", "transaction_locations", "pending_blocks", "block_numbers", "receipts", "canonical_block_hashes", "headers", "state_trie_nodes", "storage_tries_nodes", "snap_state", "invalid_ancestors", "chain_data", "account_codes", "bodies"]

thread 'main' panicked at cmd/ethrex/initializers.rs:156:42:
Failed to create Store: Custom("Failed to open RocksDB: IO error: While open a file for random read: /home/admin/.local/share/ethrex/003579.sst: Too many open files")
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Now, they are working

@ilitteri ilitteri enabled auto-merge October 13, 2025 16:22
@ilitteri ilitteri added this pull request to the merge queue Oct 13, 2025
auto-merge was automatically disabled October 13, 2025 17:03

Pull Request is not mergeable

Merged via the queue into main with commit 38626cd Oct 13, 2025
35 checks passed
@ilitteri ilitteri deleted the move-fd-limit-before-storage branch October 13, 2025 17:29
@github-project-automation github-project-automation bot moved this from In Review to Done in ethrex_l1 Oct 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L1 Ethereum client

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants