Mutex region size - further analysis
Hi,
I seem to be having issues with mutex region size. Specific error message that I get is "Cannot allocate memory: unable to allocate memory for mutex; resize mutex region".
I have gone through all the posts and have increased set_max_mutex to a higher number and that seems to have resolved but I am trying to figure out the reasons for this problem surfacing now. As suggested in releasing mutexes, related to "unable to allocate memory for mutex" it could be a bug in my code but so far I havent found one.
Notable changes that I have made is:
1) Split multiple dbs into their own physical files.
2) Also added a second index db for the main db. Now I have roughly ~300 main dbs per environment and 2 index dbs for each of those totalling around 900 - 1000 primary and index dbs in an environment
API doc says that "Berkeley DB allocates a default number of mutexes based on the initial configuration of the database environment. That default calculation may be too small if the application has an unusual need for mutexes (for example, if the application opens an unexpectedly large number of databases)"
My questions are:
1) Could an increase from 600 - 700 to 1000 dbs cause this ? I dont see this happening on all environments. I have 15 - 20 of those.
2) This one is more about the way BDB uses these mutexes. I noticed that I get this error only on bdb writes and not on reads, in contrast to another post complaining about errors on read only. Can you confirm if we should see this only on writes and not on reads ? I am a bit puzzled by the fact that I dont see these on reads which I perform on snapshot isolation.
One more observation. I have a big env where this problem is pronounced. Env has multiple dbs with total size ~8 - 9 gigs. I have a process which scans all these dbs at night. At that time I see that this mutex count starts jumping and doesnt go down. I am performing these reads at snapshot level. Have already checked the code that is performing read op. I am closing cursors and transactions with proper java exception handling so on first thought I can not see this leak happening through my code, but this mutex count doesnt seem to drop at all.
3) I noticed that default value is 1 million which seems a bit too high. I increased it to 2 or 3 million on different environments which works but also seems a really high number; with my limited knowledge, I must add. Does this number seems normal by BDB standards?
Here ares some details on my bdb env:
1) uses JNI version with java API from tomcat
2) Highly transactional environment
3) Writes as default tralsaction type
4) All reads with snapshot isolation
Thanks in advance for all the help. I will be more than happy to provide more info about the bdb env and the way I use it.
Edited by: newbdb on Sep 29, 2010 9:29 AM
Hi Shishir,
Well, you seem to know how to resolve this already, that is, by increasing the number of mutexes via:
DB_ENV->mutex_set_max()
DB_ENV->mutex_set_increment()
Estimating the number of mutexes needed at run-time is complicated. The default value is based on a worst case scenario for small databases' page sizes. Each buffer (in cache) requires a mutex, there's a mutex for each region (environment shared memory region), a mutex for each logical database and open database handle etc.
1) Could an increase from 600 - 700 to 1000 dbs cause this ? Definitely yes.
With snapshot isolation, the cache size requirements are larger, hence the larger number of mutexes needed for the buffers in cache; also, there will be more mutexes for the buckets in cache (which will protect the chain of page versions).
The optimal way to approach this mutex sizing problem is to see how many mutexes are allocated during a normal initialization, add more for emergencies (say 1000), and go with that value.
You can used db_stat -x to see the mutex statistics. Or programmatically, using the DB_ENV->mutex_stat() method.
Also, if you are on a 5.0 or newer release, there will be additional mutex sizing requirements, because starting with 5.0 we switched to having a mutex per buffer in the cache, in order to increase concurrency. If so, look into the DB_ENV->set_mp_pagesize() method. This method sets the assumed page size which is used to provision the number of mutexes allocated to each memory pool cache. It defaults to 4KB if not explicitly set. If the page size for the databases in the application is smaller than 4KB then you should set to that page size.
Regards,
Andrei
Similar Messages
-
Unable to allocate memory for mutex; resize mutex region
I have BDB on linux. I am trying to run my app, but I am getting this when it tries to set up the environment. Do I need to set any environment variable or something?
Here is my setting.
<property name="allowCreate" value="true"/>
<property name="cacheSize" value="65535000"/>
<property name="cacheCount" value="30"/>
<property name="initializeCache" value="true"/>
<property name="initializeLocking" value="true"/>
<property name="transactional" value="true"/>
Thanks.
------------- Standard Error -----------------
unable to allocate memory for mutex; resize mutex region
Testcase: testRunService took 1.842 sec
Caused an ERROR
Cannot allocate memory
java.lang.OutOfMemoryError: Cannot allocate memory
at com.sleepycat.db.internal.db_javaJNI.DbEnv_open(Native Method)
at com.sleepycat.db.internal.DbEnv.open(DbEnv.java:262)
at com.sleepycat.db.EnvironmentConfig.openEnvironment(EnvironmentConfig.java:908)
at com.sleepycat.db.Environment.<init>(Environment.java:30)
Edited by: user635741 on Oct 23, 2008 9:19 AMHello,
Based on the error, unable to allocate memory for mutex; resize mutex region,
have you tried increasing the mutex region?
The documentation on the setMaxMutexes method is at:
http://www.oracle.com/technology/documentation/berkeley-db/db/java/com/sleepycat/db/EnvironmentConfig.html#setMaxMutexes(int)
You can run db_stat -x
to display the mutex subsystem statistics.
You'll see the information for statistics like:
Mutex region size
The number of region locks that required waiting (0%)
Mutex alignment
Mutex test-and-set spins
If that does not look to be the problem, just let me know.
Thanks,
Sandra -
How to set the size of mutex region?
I am using a berkeley xml db on a CMS system.
The server's memory is 562M. When more than 80 users visited the system (without setting the environment configuration of berkeley DB), the berkeley db got the following errors: unable to allocate memory for mutex; resize mutex region.
Firstly, I set the environment configuration programmatically. I used java class EnvironmentConfig.setMutexIncrement(int) to change the region of mutex. However, the same error still happened event after EnvironmentConfig.setMutexIncrement(200) was used.
Therefore, I change the cachesize to 1M. But got the same error.
My config is
config.setCacheSize(1 * 1024 * 1024);
config.setAllowCreate(true);
config.setInitializeCache(true);
config.setInitializeLocking(true);
config.setInitializeLogging(true);
config.setThreaded(true);
Any help would by gratefully received.
Best Regards
JosieHi Josie,
The solution is to allocate a bigger number of mutexes to allocate. This can be done by calling DbEnv::mutex_set_max or DbEnv::mutex_set_increment.
For more details, please check here:
C++ APIs: http://www.oracle.com/technology/documentation/berkeley-db/xml/api_cxx/mutex_set_max.html
Java APIs: http://www.oracle.com/technology/documentation/berkeley-db/db/java/com/sleepycat/db/EnvironmentConfig.html#setMaxMutexes(int)
http://www.oracle.com/technology/documentation/berkeley-db/db/java/com/sleepycat/db/EnvironmentConfig.html#setMutexIncrement(int)
Please try to apply the above suggestion, and let me know if it works.
Thanks,
Bogdan Coman -
How do I resize mutex regions....
I'm getting the following error, but can't figure out how to resize the region. Is this something I should set in DB_CONFIG?
MutexStats:
st_mutex_align=4
st_mutex_tas_spins=1
st_mutex_cnt=1346
st_mutex_free=9
st_mutex_inuse=1337
st_mutex_inuse_max=1346
st_region_wait=0
st_region_nowait=17142
st_regsize=73728
com.sleepycat.dbxml.XmlException: Error: Not enough space, errcode = DATABASE_ERROR
about to delete manager
XmlManager closed
unable to allocate memory for mutex; resize mutex regionHi,
Using the search box (left column on the forum page) would be a nice thing to try before posting the question. Using that feature, you can find threads like these:
How to set the size of mutex region?
Re: Error message "Not Enough Space"
Re: Problem: unable to allocate memory for mutex; resize mutex region
The same question was addressed in the threads above.
If you are still having problems in allocating a bigger number of mutexes, just let me know.
Bogdan Coman -
Paste notes in Piano Roll changes Region size
Hi,
When I copy/paste a note in the piano roll, using cmd+C, cmd+V, it also changes the Region size. Which is not convenient at all.
When I do it with alt+mouse, it works perfectly fine. But I work mainly with keyboard commands.
Also, sometimes it even creates a new region on its own.
I am on LogicPro X 10.0.1, OS X 10.8.4, iMac 2.5 Ghz, 16 Gb RAM.
I saw similar questions already, but no answer yet.
Thank you by advanceYou shouldn't have an issue...doing what you are doing.. and I cannot recreate it here..
But an alternative would be to simply copy the Region itself in the Arrange window....
Hold Down the Option key and drag region using mouse or trackpad.... -
Items detected on your pc require further analysis
Hello,
since last week FEP is displaying on our desktop a alert that says:
"Items detected on your pc require further analysis. By sending the files listed below, you can help Microsoft analysts determine whether these systems are malicious."
the application is is picking up a knon application that we use and it has not been updated at all.
Do you know what is causing this? how can we resolve this?
Thanks.Hi,
Thank you for your patience and support.
I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.
Thank you for your understanding and support.
Best Regards
Quan Gu -
We haven't a model ABC classification into Further Analyses
Hello guys,
We have BW 7.0 and we want to use Data Mining. We don't have an ABC model classification in the Further Analyses although we have all models Weighted, Table Scoring, Regression analysis, Prediction with decision tree and Prediction with cluster model.
I don´t understand why we don´t have the ABC model classification.
Can anybody help me?
ThanksI have also 'upgraded' from a 6110 Navigator to a 6210 Navigator and found the newer model to be considerably harder to use.
In particular, your point #4 about not having a warning beep when issuing a voice command while in bluetooth/car mode is my number 1 gripe as it makes my cars bluetooth and phones voice dialling completely useless.
If you have found a solution to that particular issue please let me know. -
Size contents to fit region size?
I have a HTML region that I have sized bigger than the default value. But when I have it embed the results of a URL I am not getting the entire new height of the region. is there a way to tell the region to size the contents to fit the region?
I have a HTML region that I have sized bigger than the default value. But when I have it embed the results of a URL I am not getting the entire new height of the region. is there a way to tell the region to size the contents to fit the region?
-
Anyone know how to make the editable region bigger?
> Anyone know how to make the editable region bigger?
Editable regions don't have a size.
Any size limitations are taken from whatever container
they've been placed
in.
Open the template.
Click in the editable region.
Look at the list of tags in the Quick Tag Editor (bottom left
margin of
design window) to see what containers it is placed in.
Alan
Adobe Community Expert, dreamweaver
http://www.adobe.com/communities/experts/ -
Repeat horizontal and vert regions SIZE
hi there i have used the very useful repeat region behavour from DW TEAM. is there a way to specify the size of the each table as currently they are all different sizes
code below
<table width="650" >
<tr>
<td><table >
<tr>
<?php
$Recordset2_endRow = 0;
$Recordset2_columns = 3; // number of columns
$Recordset2_hloopRow1 = 0; // first row flag
do {
if($Recordset2_endRow == 0 && $Recordset2_hloopRow1++ != 0) echo "<tr>";
?>
<td><p class="TitleBlack"><?php echo $row_Recordset2['name']; ?></p>
<p><span class="textwhite"><?php echo $row_Recordset2['PositionReq']; ?></span></p></td>
<?php $Recordset2_endRow++;
if($Recordset2_endRow >= $Recordset2_columns) {
?>
</tr>
<?php
$Recordset2_endRow = 0;
} while ($row_Recordset2 = mysql_fetch_assoc($Recordset2));
if($Recordset2_endRow != 0) {
while ($Recordset2_endRow < $Recordset2_columns) {
echo("<td> </td>");
$Recordset2_endRow++;
echo("</tr>");
}?>
</table></td>
</table>
thanksHi Beth - I tried adding the param in the AC_FL_RunContent function and it fixed the problem.
Thanks for your help.
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0','widt h','500','height','336','id','FLVPlayer','src','FLVPlayer_Progressive','flashvars','&MM_Co mponentVersion=1&skinName=Corona_Skin_3&streamName=http://www.dadentllc.com/willisgigi/fla sh/prasad5&autoPlay=true&autoRewind=true','quality','high','scale','noscale','name','FLVPl ayer','salign','lt','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1 _Prod_Version=ShockwaveFlash','movie','FLVPlayer_Progressive','wmode','transparent' ); -
I do not have NI-IMAQ or NI Vision.
I acquired the image using a picolo board then just saved it as a bitmap file.You want to convert it to an array of what? Of numbers? Of LabVIEW colors?
The "Read BMP File.vi" VI outputs a 1-D array of the pixels, but I suspect it is not exactly in the format that you need. I am NOT sure, but I think that each group of 3 elements of that 1-D array (which is inside the cluster "image data" that the VI outputs) represents the red, green and blue levels of a single pixel (but it may be hue, saturation and lum.). Also, since it is a 1-D array, you would have to divide it by the width (which is also included in the "image data" cluster) to get some sort of 2-D array of data.
You can find the "Read BMP File.vi" VI in the functions palete> "Graphics & sound">"Graphics Formats". -
Our company has been using BDB to store real-time traffic information (speed and incident). Traffic information, which we call a feed, comes in every three minutes for the entire US. We are creating databases for speed and incident separately. Each time we receive a feed, we creates DBs something like flow.traffic.5.db and incident.traffic.5.db. When DBs are becoming too old, we delete from the directory where we store them.
We are having trouble in using the Berkeley DB library (version 4.5.20) in our application. In our production environment (on rh5 machines), our server crashes after some time, apparently because certain memory and/or other resources are being used up. We need assistance in getting to the cause of this problem, which we weren't seeing back when we used an earlier version of BDB (4.3.27).
In my testing under Windows, I find that BDB soon runs out of available mutex locks, giving the message "unable to allocate memory for mutex; resize mutex region" from inside the __mutex_alloc_int() function. This is not under any kind of load at all, and a very simple configuration. The test is basically a repeated opening and closing of the databases in a serial fashion, so it is hard to see why the locks should be "used up" like that.
The way we are using BDB is like this; first we create a DBENV and this DBENV will never be closed in run-time. Then, we create, use and delete db files under this DBENV. In the life period of a db file, many mutex will be used by DBENV to manage access to db files.
We tried to increase the total mutex count by DBENV->mutex_set_max(int), but it just delay the crash.
Does anyone have similar problem or remedy for this type of issue? Thanks in advance,Here are requeted information when there was a crash. I hope this help you to understand what we are experiencing .
By the way, we are using BDB 4.5.20
=============================================================================
Stderr output was
“unable to allocate memory for mutex; resize mutex region
[errno: 12]: incident: Db::open: Cannot allocate memory
[errno: 12]: incident: open: unretryable error
terminate called after throwing an instance of 'DbException'
what(): Error opening incident database -- session aborted!
Aborted
=============================================================================
And,
output of db_stat -x:
3MB 792KB Mutex region size
0 The number of region locks that required waiting (0%)
4 Mutex alignment
200 Mutex test-and-set spins
34034 Mutex total count
0 Mutex free count
34034 Mutex in-use count
34034 Mutex maximum in-use count
Mutex counts
0 Unallocated
2 db handle
1 env dblist
1 env region
1 lock region
4 logical lock
1 log filename
1 log flush
2 log region
1231 mpoolfile handle
2 mpool filehandle
17 mpool file bucket
1 mpool handle
16381 mpool hash bucket
16381 mpool buffer I/O
1 mpool region
1 unknown mutex type
1 replication database
1 replication region
1 twister
1 txn active list
1 unknown mutex type
1 txn region
output of db_stat -t
1/12437971 File/offset for last checkpoint LSN
Sun Oct 26 20:19:28 2008 Checkpoint timestamp
0x80001964 Last transaction ID allocated
100 Maximum number of active transactions configured
0 Active transactions
2 Maximum active transactions
6500 Number of transactions begun
410 Number of transactions aborted
6090 Number of transactions committed
0 Snapshot transactions
0 Maximum snapshot transactions
0 Number of transactions restored
40KB Transaction region size
0 The number of region locks that required waiting (0%)
Active transactions:
output of db_stat -CA
Default locking region information:
4100 Last allocated locker ID
0x7fffffff Current maximum unused locker ID
9 Number of lock modes
1000 Maximum number of locks possible
1000 Maximum number of lockers possible
1000 Maximum number of lock objects possible
2 Number of current locks
4 Maximum number of locks at any one time
3 Number of current lockers
6 Maximum number of lockers at any one time
2 Number of current lock objects
4 Maximum number of lock objects at any one time
15458 Total number of locks requested
15456 Total number of locks released
0 Total number of locks upgraded
2049 Total number of locks downgraded
0 Lock requests not available due to conflicts, for which we waited
0 Lock requests not available due to conflicts, for which we did not wait
0 Number of deadlocks
1000000 Lock timeout value
0 Number of locks that have timed out
1000000 Transaction timeout value
0 Number of transactions that have timed out
344KB The size of the lock region
0 The number of region locks that required waiting (0%)
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Lock REGINFO information:
Lock Region type
5 Region ID
__db.005 Region name
0xad907000 Original region address
0xad907000 Region address
0xad95cf40 Region primary address
0 Region maximum allocation
0 Region allocated
REGION_JOIN_OK Region flags
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Lock region parameters:
32790 Lock region region mutex [0/64769 0% 11406/3086178512]
1031 locker table size
1031 object table size
343720 obj_off
335464 locker_off
0 need_dd
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Lock conflict matrix:
0 0 0 0 0 0 0 0 0
0 0 1 0 1 0 1 0 1
0 1 1 1 1 1 1 1 1
0 0 0 0 0 0 0 0 0
0 1 1 0 0 0 0 1 1
0 0 1 0 0 0 0 0 1
0 1 1 0 0 0 0 1 1
0 0 1 0 1 0 1 0 0
0 1 1 0 1 1 1 0 1
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Locks grouped by lockers:
Locker Mode Count Status ----------------- Object ---------------
1000 dd= 0 locks held 1 write locks 0 pid/thread 12222/2748504976
1000 READ 1 HELD flow.navteq.410.db handle 0
1001 dd= 0 locks held 0 write locks 0 pid/thread 12222/2748504976
1002 dd= 0 locks held 1 write locks 0 pid/thread 12222/2748504976
1002 READ 1 HELD sp_key.navteq.410.db handle 0
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Locks grouped by object:
Locker Mode Count Status ----------------- Object ---------------
1000 READ 1 HELD flow.navteq.410.db handle 0
1002 READ 1 HELD sp_key.navteq.410.db handle 0 -
Berkeley DB and DB optimization
Hi,
I have been testing BerkeleyDB-4.7.25 with 16 *.bdb files using BTREE on a Linux server 64bits. Each *.bdb file reaches approximately a size of 3.2 GB.
I have run a set of operations that include puts/gets/updates/deletes
I would like to ask a couple of questions, please:
1)
Is there is any Berkeley DB tool/function to optimize the *.bdb files for/after deletion.
2)
I have been running dbstat -e (please find the output of db_stat below) trying to improve some of the DB_CONFIG parameters.
set_flags DB_TXN_WRITE_NOSYNC
set_cachesize 0 2147483648 1
mutex_set_max 1000000
set_tx_max 500000
set_lg_regionmax 524288
set_lg_bsize 4194304
set_lg_max 20971520
set_lk_max_locks 10000
set_lk_max_lockers 10000
set_lk_max_objects 10000
I have increased the cache size, but it does not seem to be helping to improve the operation response times.
I would really appreciate any help.
Would the use of DB_SYSTEM_MEM (create the shared regions in system shared memory) help ?
Would the preallocation of the db files help ?
Would the increase of the log buffer help ?
Would the size of the log help (based on the values related to data written since last checkpoint in db_stat) ?
Could you please help ?
Thanks,
Mariella
This is the output of db_stat -e:
0x40988 Log magic number
14 Log version number
4MB Log record cache size
0 Log file mode
20Mb Current log file size
72M Records entered into the log (72944260)
92GB 761MB 385KB 636B Log bytes written
1GB 805MB 40KB 747B Log bytes written since last checkpoint
6596982 Total log file I/O writes
0 Total log file I/O writes due to overflow
7295 Total log file flushes
39228 Total log file I/O reads
4749 Current log file number
18526992 Current log file offset
4748 On-disk log file number
20970984 On-disk log file offset
1 Maximum commits in a log flush
1 Minimum commits in a log flush
4MB 512KB Log region size
303613 The number of region locks that required waiting (0%)
100 Last allocated locker ID
0x7fffffff Current maximum unused locker ID
9 Number of lock modes
10000 Maximum number of locks possible
10000 Maximum number of lockers possible
10000 Maximum number of lock objects possible
40 Number of lock object partitions
16 Number of current locks
274 Maximum number of locks at any one time
7 Maximum number of locks in any one bucket
0 Maximum number of locks stolen by for an empty partition
0 Maximum number of locks stolen for any one partition
100 Number of current lockers
108 Maximum number of lockers at any one time
16 Number of current lock objects
176 Maximum number of lock objects at any one time
4 Maximum number of lock objects in any one bucket
0 Maximum number of objects stolen by for an empty partition
0 Maximum number of objects stolen for any one partition
118M Total number of locks requested (118356655)
118M Total number of locks released (118356639)
119802 Total number of locks upgraded
16 Total number of locks downgraded
20673 Lock requests not available due to conflicts, for which we waited
0 Lock requests not available due to conflicts, for which we did not wait
0 Number of deadlocks
0 Lock timeout value
0 Number of locks that have timed out
500000 Transaction timeout value
0 Number of transactions that have timed out
7MB 768KB The size of the lock region
5019 The number of partition locks that required waiting (0%)
328 The maximum number of times any partition lock was waited for (0%)
0 The number of object queue operations that required waiting (0%)
280 The number of locker allocations that required waiting (0%)
958 The number of region locks that required waiting (0%)
4 Maximum hash bucket length
2GB Total cache size
1 Number of caches
1 Maximum number of caches
2GB Pool individual cache size
0 Maximum memory-mapped file size
0 Maximum open file descriptors
0 Maximum sequential buffer writes
0 Sleep after writing maximum sequential buffers
0 Requested pages mapped into the process' address space
150M Requested pages found in the cache (92%)
12M Requested pages not found in the cache (12855704)
8449044 Pages created in the cache
12M Pages read into the cache (12855704)
20M Pages written from the cache to the backing file (20044721)
32M Clean pages forced from the cache (32698230)
1171137 Dirty pages forced from the cache
9227380 Dirty pages written by trickle-sync thread
505880 Current total page count
356352 Current clean page count
149528 Current dirty page count
262147 Number of hash buckets used for page location
184M Total number of times hash chains searched for a page (184542797)
34 The longest hash chain searched for a page
945M Total number of hash chain entries checked for page (945465289)
430 The number of hash bucket locks that required waiting (0%)
34 The maximum number of times any hash bucket lock was waited for (0%)
5595 The number of region locks that required waiting (0%)
0 The number of buffers frozen
0 The number of buffers thawed
0 The number of frozen buffers freed
34M The number of page allocations (34375350)
76M The number of hash buckets examined during allocations (76979039)
18 The maximum number of hash buckets examined for an allocation
33M The number of pages examined during allocations (33869157)
4 The max number of pages examined for an allocation
2 Threads waited on page I/O
Pool File: file_p10.bdb
4096 Page size
0 Requested pages mapped into the process' address space
9376233 Requested pages found in the cache (92%)
800764 Requested pages not found in the cache
4096 Page size
0 Requested pages mapped into the process' address space
9376233 Requested pages found in the cache (92%)
800764 Requested pages not found in the cache
526833 Pages created in the cache
800764 Pages read into the cache
1179504 Pages written from the cache to the backing file
Pool File: file_p3.bdb
4096 Page size
4658/8873223 File/offset for last checkpoint LSN
Thu Apr 30 22:00:23 2009 Checkpoint timestamp
0x806584b8 Last transaction ID allocated
500000 Maximum number of active transactions configured
0 Active transactions
8 Maximum active transactions
6653112 Number of transactions begun
60327 Number of transactions aborted
6592785 Number of transactions committed
144048 Snapshot transactions
257302 Maximum snapshot transactions
0 Number of transactions restored
185MB 24KB Transaction region size
90116 The number of region locks that required waiting (0%)
Active transactions:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
129MB 720KB Mutex region size
108 The number of region locks that required waiting (0%)
4 Mutex alignment
200 Mutex test-and-set spins
1000000 Mutex total count
331261 Mutex free count
668739 Mutex in-use count
781915 Mutex maximum in-use count
Mutex counts
331259 Unallocated
16 db handle
1 env dblist
2 env handle
1 env region
43 lock region
274 logical lock
1 log filename
1 log flush
2 log region
16 mpoolfile handle
16 mpool filehandle
17 mpool file bucket
1 mpool handle
262147 mpool hash bucket
262147 mpool buffer I/O
1 mpool region
1 mutex region
1 twister
1 txn active list
1 transaction checkpoint
144050 txn mvcc
1 txn regionuser11096811 wrote:
i have same questionWhat is the question exactly? What DB release are you using?
user11096811 wrote:
the app throws com.sleepycat.db.LockNotGrantedException .what should i do?The LockNotGrantedException exception being thrown is a subclass of DeadlockException.
A LockNotGrantedException is thrown when a lock requested using the Environment.getLock or Environment.lockVector methods, where the noWait flag or lock timers were configured, could not be granted before the wait-time expired.
Additionally, LockNotGrantedException is thrown when a Concurrent Data Store database environment configured for lock timeouts was unable to grant a lock in the allowed time.
Additionally, LockNotGrantedException is thrown when lock or transaction timeouts have been configured and a database operation has timed out. Applications can handle all deadlocks by
catching the DeadlockException. You can read more on how to configure the locking subsystem and resolve the deadlocks at [The Locking Subsystem|http://www.oracle.com/technology/documentation/berkeley-db/db/gsg_txn/JAVA/lockingsubsystem.html].
Thanks,
Bogdan Coman -
Hello,
I am using:
Oracle: Berkeley DB XML 2.5.16: (December 22, 2009)
Berkeley DB 4.8.26: (December 18, 2009)
When attempting to open a container in an environment where the application process has been running for a while I get the following error:
XmlDatabaseError: XmlDatabaseError 12, Error: Cannot allocate memory
The Python bindings do not have support for errcall. I have added errcall support to the bindings but I do not appear to be receiving any message (but it is new code so I do not trust it completely).
Running the dbxml shell tool I get:
[root@localhost db]# dbxml
Joined existing environment
dbxml> open test.dbxml
stdin:1: openContainer failed, Error: Cannot allocate memory
dbxml>I don't appear to be out of locks:
127786 Last allocated locker ID
0x7fffffff Current maximum unused locker ID
9 Number of lock modes
20000 Maximum number of locks possible
10000 Maximum number of lockers possible
20000 Maximum number of lock objects possible
1 Number of lock object partitions
639 Number of current locks
691 Maximum number of locks at any one time
10 Maximum number of locks in any one bucket
0 Maximum number of locks stolen by for an empty partition
0 Maximum number of locks stolen for any one partition
1282 Number of current lockers
1320 Maximum number of lockers at any one time
571 Number of current lock objects
622 Maximum number of lock objects at any one time
3 Maximum number of lock objects in any one bucket
0 Maximum number of objects stolen by for an empty partition
0 Maximum number of objects stolen for any one partition
998958 Total number of locks requested
997936 Total number of locks released
0 Total number of locks upgraded
13055 Total number of locks downgraded
0 Lock requests not available due to conflicts, for which we waited
0 Lock requests not available due to conflicts, for which we did not wait
0 Number of deadlocks
0 Lock timeout value
0 Number of locks that have timed out
0 Transaction timeout value
0 Number of transactions that have timed out
10MB 152KB The size of the lock region
0 The number of partition locks that required waiting (0%)
0 The maximum number of times any partition lock was waited for (0%)
0 The number of object queue operations that required waiting (0%)
0 The number of locker allocations that required waiting (0%)
0 The number of region locks that required waiting (0%)
3 Maximum hash bucket lengthOr transactions:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
35511/10059360 File/offset for last checkpoint LSN
Thu Aug 12 17:25:26 2010 Checkpoint timestamp
0x80007128 Last transaction ID allocated
100 Maximum number of active transactions configured
0 Active transactions
3 Maximum active transactions
28968 Number of transactions begun
16699 Number of transactions aborted
12269 Number of transactions committed
0 Snapshot transactions
0 Maximum snapshot transactions
0 Number of transactions restored
40KB Transaction region size
0 The number of region locks that required waiting (0%)
Active transactions:Or mutexes:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
6MB 112KB Mutex region size
0 The number of region locks that required waiting (0%)
4 Mutex alignment
1 Mutex test-and-set spins
50000 Mutex total count
39829 Mutex free count
10171 Mutex in-use count
10201 Mutex maximum in-use count
Mutex counts
39829 Unallocated
509 db handle
1 env dblist
2 env handle
1 env region
4 lock region
691 logical lock
1 log filename
1 log flush
2 log region
815 mpoolfile handle
3896 mpool buffer
63 mpool filehandle
17 mpool file bucket
1 mpool handle
4099 mpool hash bucket
1 mpool region
1 mutex region
62 sequence
1 twister
1 txn active list
1 transaction checkpoint
1 txn regionAny ideas?See unable to allocate memory for mutex; resize mutex region
Edited by: Vitaliy Katochka on Nov 23, 2010 4:31 PM -
Db_checkpoint: Unable to allocate thread control block
Hello,
Every second day BDB 4.8 runs out of cache memory (size = 512MB).
We have 10 static worker processes (no segfaults) and one
db_checkpoint-process (checkpoints once a minute and exists).
We use only DB_WRITE_NOSYNC
After two days the db_checkpoint-process reports:
db_checkpoint: Unable to allocate thread control block
As soon as this error apears, I can neither checkpoint nor
db_recover.
Is there any chance (or a patch) to track down the memory leak?
ThanksHi Sandra,
It happened again one hour ago. I had hardly problems with BDB 4.6
Down below you will find a current "db_stat -e"
We have 10 workers with persistent db-connection and once a minute
a cronjob starts a checkpoint, then the cron-process exists.
Every second day (40 to 48 hours) the checkpoint-process can't connect
to the database and "db_checkpoint -1" says:
db_checkpoint: Unable to allocate thread control block
A normal "db_recover" would corrupt the database, I had to recover
catastrophic.
For sure the cache is not to small (512 MB, all database files: 1,3 GB)
Thanks
Markus
Mon Nov 30 17:32:44 2009 Local time
0x120897 Magic number
0 Panic value
4.8.24 Environment version
9 Btree version
9 Hash version
1 Lock version
15 Log version
4 Queue version
2 Sequence version
1 Txn version
Mon Nov 30 16:31:06 2009 Creation time
0x9d316701 Environment ID
2 Primary region allocation and reference count mutex [0/360 0% !Own]
11 References
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thread tracking information
75 Thread blocks allocated
4096 Thread allocation threshold
521 Thread hash buckets
Thread status blocks:
process/thread 5055/3086948768: out
process/thread 5686/3086850464: out
[...snip...]
process/thread 6056/3086653856: out
process/thread 6087/3086649760: out
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
0x40988 Log magic number
15 Log version number
16MB Log record cache size
0 Log file mode
10Mb Current log file size
370618 Records entered into the log
370MB 354KB 853B Log bytes written
4MB 466KB 1001B Log bytes written since last checkpoint
17691 Total log file I/O writes
0 Total log file I/O writes due to overflow
198 Total log file flushes
665 Total log file I/O reads
1786 Current log file number
8303086 Current log file offset
1786 On-disk log file number
3630597 On-disk log file offset
1 Maximum commits in a log flush
1 Minimum commits in a log flush
17MB Log region size
9 The number of region locks that required waiting (0%)
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
5387 Last allocated locker ID
0x7fffffff Current maximum unused locker ID
9 Number of lock modes
131072 Maximum number of locks possible
131072 Maximum number of lockers possible
131072 Maximum number of lock objects possible
30 Number of lock object partitions
622 Number of current locks
797 Maximum number of locks at any one time
13 Maximum number of locks in any one bucket
0 Maximum number of locks stolen by for an empty partition
0 Maximum number of locks stolen for any one partition
632 Number of current lockers
708 Maximum number of lockers at any one time
69 Number of current lock objects
160 Maximum number of lock objects at any one time
2 Maximum number of lock objects in any one bucket
0 Maximum number of objects stolen by for an empty partition
0 Maximum number of objects stolen for any one partition
13M Total number of locks requested (13372706)
13M Total number of locks released (13372083)
0 Total number of locks upgraded
5313 Total number of locks downgraded
9 Lock requests not available due to conflicts, for which we waited
1 Lock requests not available due to conflicts, for which we did not wait
0 Number of deadlocks
60M Lock timeout value (60000000)
0 Number of locks that have timed out
60M Transaction timeout value (60000000)
0 Number of transactions that have timed out
66MB 904KB The size of the lock region
2141 The number of partition locks that required waiting (0%)
465 The maximum number of times any partition lock was waited for (0%)
0 The number of object queue operations that required waiting (0%)
3 The number of locker allocations that required waiting (0%)
0 The number of region locks that required waiting (0%)
2 Maximum hash bucket length
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
320MB 1KB 604B Total cache size
1 Number of caches
1 Maximum number of caches
320MB 8KB Pool individual cache size
0 Maximum memory-mapped file size
0 Maximum open file descriptors
0 Maximum sequential buffer writes
0 Sleep after writing maximum sequential buffers
0 Requested pages mapped into the process' address space
17M Requested pages found in the cache (99%)
71264 Requested pages not found in the cache
67 Pages created in the cache
71264 Pages read into the cache
17944 Pages written from the cache to the backing file
0 Clean pages forced from the cache
0 Dirty pages forced from the cache
0 Dirty pages written by trickle-sync thread
71298 Current total page count
71014 Current clean page count
284 Current dirty page count
32771 Number of hash buckets used for page location
4096 Assumed page size used
16M Total number of times hash chains searched for a page (16751183)
8 The longest hash chain searched for a page
39M Total number of hash chain entries checked for page (39437498)
0 The number of hash bucket locks that required waiting (0%)
0 The maximum number of times any hash bucket lock was waited for (0%)
7 The number of region locks that required waiting (0%)
0 The number of buffers frozen
0 The number of buffers thawed
0 The number of frozen buffers freed
71627 The number of page allocations
0 The number of hash buckets examined during allocations
0 The maximum number of hash buckets examined for an allocation
0 The number of pages examined during allocations
0 The max number of pages examined for an allocation
0 Threads waited on page I/O
0 The number of times a sync is interrupted
Pool File: article.db
4096 Page size
0 Requested pages mapped into the process' address space
1868517 Requested pages found in the cache (99%)
13311 Requested pages not found in the cache
0 Pages created in the cache
13311 Pages read into the cache
3428 Pages written from the cache to the backing file
[...snip...]
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
1786/3630541 File/offset for last checkpoint LSN
Mon Nov 30 17:32:01 2009 Checkpoint timestamp
0x8000675a Last transaction ID allocated
4096 Maximum number of active transactions configured
0 Active transactions
3 Maximum active transactions
26458 Number of transactions begun
0 Number of transactions aborted
26458 Number of transactions committed
0 Snapshot transactions
0 Maximum snapshot transactions
0 Number of transactions restored
1MB 192KB Transaction region size
0 The number of region locks that required waiting (0%)
Active transactions:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
31MB 32KB Mutex region size
3 The number of region locks that required waiting (0%)
4 Mutex alignment
150 Mutex test-and-set spins
254163 Mutex total count
149165 Mutex free count
104998 Mutex in-use count
104998 Mutex maximum in-use count
Mutex counts
149165 Unallocated
1 env region
33 lock region
797 logical lock
1 log filename
1 log flush
1 log region
74 mpoolfile handle
71298 mpool buffer
17 mpool file bucket
32771 mpool hash bucket
1 mpool region
1 mutex region
1 transaction checkpoint
1 txn region
Maybe you are looking for
-
TextBlock does not aligns to right in DataGridTemplateColumn
Hello guys here: I am currently running into a nasty issue. What I wanna achieve is to put two text blocks horizontally in a DataGridTemplateColumn and I wanna align the right text block text to the right. Here is my code: <DataGrid ItemsSource="{Bin
-
Hi, Can anybody can give me the brief Explanation for work Flow ,steps to be followed in Work Flow, & with a brief Example Thank You
-
Missing movies in project since iOS 8 and iCloud Photo Library
Hi, I've been to Europe this summer and created a movie in iMovie for iOS. That was when iOS 7.1.2 was the most current release. Today, I wanted to finish up my project. I'm currently running on iPad air, iOS 8.0.2, latest release of iMovie and iClou
-
WEB UI- only Display authorization for LEADS to users
Hi Gurus, I have a requirement like i need to give only display authorizations for users to leads. I have created a new business role and assigned only search links. but in that search link we have Create New option. How i need to disable this. Users
-
Where did my folder go ?
I have just upgraded to Tiger. In my External HD I have(sic had) a folder with files created using SimpleText , TextEdit or Plain Text Editor . Now when I search for these files I find the folder is now a Pages Publication when I open Get Info. Anyon