From 13f8f65a58bc9a31c8900e12ae2c3ed10003486f Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 12 May 2015 11:28:33 +0200 Subject: eth, ethdb: lower the amount of open files & improve err messages for db Closes #880 --- ethdb/database.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ethdb') diff --git a/ethdb/database.go b/ethdb/database.go index 15af02fdf..c351c024a 100644 --- a/ethdb/database.go +++ b/ethdb/database.go @@ -11,7 +11,7 @@ import ( "github.com/syndtr/goleveldb/leveldb/opt" ) -const openFileLimit = 128 +var OpenFileLimit = 64 type LDBDatabase struct { fn string @@ -26,7 +26,7 @@ type LDBDatabase struct { func NewLDBDatabase(file string) (*LDBDatabase, error) { // Open the db - db, err := leveldb.OpenFile(file, &opt.Options{OpenFilesCacheCapacity: openFileLimit}) + db, err := leveldb.OpenFile(file, &opt.Options{OpenFilesCacheCapacity: OpenFileLimit}) if err != nil { return nil, err } -- cgit