First lock resources issues, now " record larger than maximum file size"
633200Jul 7 2008 — edited Jul 11 2008I recently changed a non-transactional app to use transactions and locks. Some of our cursor-using code eventually started giving us errors such as:
java.lang.OutOfMemoryError: Not enough space
Setting the error stream I eventually found out that we were running out of lock objects. I upped the MaxLockers, MaxLockObjects and MaxLocks in the app to 20000 as an attempt at a fix (and and the app just started crashing with hotspot errors). I reduced the values I raised to 5000 and the crashes continue - between each change of locker information I remove all of the __db.00? files associated with each environment.
The error I am currently seeing is this:
bash-3.00# : DB_ENV->log_put: record larger than maximum file size (52 > 0)
: PANIC: Invalid argument
Devices Panic Handler Invalid argument
java.lang.IllegalArgumentException: Invalid argument
at com.sleepycat.db.internal.db_javaJNI.DbEnv_open(Native Method)
at com.sleepycat.db.internal.DbEnv.open(DbEnv.java:235)
at com.sleepycat.db.EnvironmentConfig.openEnvironment(EnvironmentConfig.java:714)
at com.sleepycat.db.Environment.<init>(Environment.java:30)
at com.nmss.db.berkeleydb.Name_Address_Map.open(Name_Address_Map.java:356)
at com.nmss.db.berkeleydb.Name_Address_Map.retrieveAllNamesByType(Name_Address_Map.java:162)
at com.nmss.plugin.accessgate.Statistics.publish(Statistics.java:219)
at com.nmss.framework.statistics.Command.publish(Command.java:139)
at com.nmss.framework.statistics.Command.publish(Command.java:111)
at com.nmss.framework.statistics.Command.processArgs(Command.java:43)
at com.nmss.framework.statistics.Command.<init>(Command.java:30)
at com.nmss.framework.statistics.Command.main(Command.java:199)
null
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# SIGSEGV (0xb) at pc=0xf7fa1184, pid=5176, tid=1
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_13-b05 mixed mode, sharing)
# Problematic frame:
# C [libdb_java-4.3.so+0xa1184]
#
# An error report file with more information is saved as hs_err_pid5176.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
What does that record message mean? I've changed nothing about the size of the record I am writing.
Also, is there a more resource friendly way of dealing with excessive locker use? Perhaps changing page size or only deleting a max number of entries in a cursor per transaction, then starting a new transaction?
Thanks,
Mike