Shmget failure when using a large cachesize with DB_SYSTEM_MEM flag enabled

This is probably due to me not understanding the requrements well enough. I am using bdb with given env flags (notabley DB_PRIVATE disabled, DB_SYSTEM_MEM enabled). I call set_shm_key with required args. However, this app fails at runtime with given error if I define a 1.5 GB cache size.
It seems that the system is calling shmget with value (117441140) that is beyond the kernel constraints (shmmax=33554432). This app runs well if I do NOT setup cachesize and let it default. This implies some relationship between cachesize & shared memory size. Is that correct? What am I doint wrong here. Any help is appreciated.
Thanks,
Usamah
Error:
=========================
shmget: key: 117441140: unable to create shared system memory region: Invalid argument
=========================
Setup:
==========================
envFlags = DB_INIT_CDB | DB_CREATE | DB_INIT_MPOOL | DB_THREAD | DB_SYSTEM_MEM;
dbEnv->set_cachesize(dbEnv, 1, 500 * 1024 * 1024, 4);
shMemSegId = ftok(errorFile, 7);
dbEnv->set_shm_key(hornetDbAbstract->dbEnv, (key_t)shMemSegId);
===========================
Kernel shared memory settings:
===========================
[umalik@tamerlane buzzer]$ cat /proc/sys/kernel/shmall
2097152
[umalik@tamerlane buzzer]$ cat /proc/sys/kernel/shmmax
33554432
[umalik@tamerlane buzzer]$ cat /proc/sys/kernel/shmmni
4096
============================
System:
============================
[umalik@tamerlane buzzer]$ cat /proc/version
Linux version 2.6.17-1.2142_FC4smp ([email protected]) (gcc version 4.0.2 20051125 (Red Hat 4.0.2-8)) #1 SMP Tue Jul 11 22:57:02 EDT 2006
[umalik@tamerlane buzzer]$ cat /proc/meminfo
MemTotal: 1814900 kB
MemFree: 157236 kB
Buffers: 39484 kB
Cached: 888456 kB
SwapCached: 0 kB
Active: 1222584 kB
Inactive: 356452 kB
HighTotal: 917312 kB
HighFree: 48980 kB
LowTotal: 897588 kB
LowFree: 108256 kB
SwapTotal: 1966072 kB
SwapFree: 1965500 kB
Dirty: 100 kB
Writeback: 0 kB
Mapped: 753796 kB
Slab: 55552 kB
CommitLimit: 2873520 kB
Committed_AS: 1052532 kB
PageTables: 8592 kB
VmallocTotal: 116728 kB
VmallocUsed: 4104 kB
VmallocChunk: 108876 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
Hugepagesize: 2048 kB
bdb version: 4.5.20
============================

Hi Usamah,
The values that you presented denote that you are running with the defaults settings for the shared system memory. If you print out the value of the generated key resulted after the "ftok" call, you will observe that the key 117441140 should be the base segment ID (that is, the key generated with the "ftok" call) plus 2, meaning the "shmget" call failed when attempting to allocate memory segments for the Memory Pool subsystem. You will need a total of 3 segment IDs; more information on this can be found here:
http://www.oracle.com/technology/documentation/berkeley-db/db/api_c/env_set_shm_key.html
It's possible that your system wasn't able to find and allocate contiguous memory, even though you specified that the 1,5GB cache should be broken in 4 portions.
I suggest you try to reconfigure the shared system memory by doing the following:
- edit /etc/sysctl.conf and add the following lines:
kernel.shmmax = 536870912
kernel.shmall = 536870912
- run the following from the console:
/sbin/sysctl -p
- reboot your system, and run again the test application.
Let us know if the issue gets resolved this way, and if you need further help.
Regards,
Andrei

Similar Messages

  • How to solve the error message "Could not activate cellular data network: PDP authentication failure"when using 3g or gPRS on safari with an iphone 4 and latest software updates

    Please can someone help me to solve the error message "Could not activate cellular data network: PDP authentication failure"when using 3G or GPRS on safari with an iphone 4GS and latest software updates. I have tried resetting the network and phone settings. I have restored the factory settings on itunes and still the problem persists.

    All iPhones sold in Japan are sold carrier locked and cannot be officially unlocked by the carrier. If you unlocked it, it was by unauthorized means (hacked), and support cannot be given to you in this forum.
    Hacked iPhones are subject to countermeasures by Apple, particularly when updating the firmware. It is likely permanently re-locked or permanently disabled.
    Message was edited by: modular747

  • LabView (8.2) hangs when using I/O operations with traditiona​l NI-DAQ 7.4.4 after aborting LabView program

    Hello!
    We have the following problem:
    LabView (8.2) hangs when using I/O operations with traditional NI-DAQ 7.4.4 after aborting LabView program
    We freshly installed LabView 8.2 (2006) and NI-DAQ 7.4.4 on a PC running Windows XP (Service Pack 3). We built a larger vi that remotely controls a traditional NI-DAQ card (AT-AO-10) on a second PC via NI-VISA 5.0.3. We were successfully running this program until a power failure caused the first computer to crash. After this crash we were unable to start the program again: LabView freezes while loading the vi. LabView itself can be started but freezes when adding I/O operations from the NI-DAQ palette to a block diagram.
    We have tried to re-install NI-DAQ 7.4.4, but it did not help. We then re-installed all NI software, but still no improvement. In the end we decided to reinstall ALL software, first Windows XP, then LabView and finally NI-DAQ 7.4.4. This worked. However, after a few days of running the program we had to abort LabView via Windows Task manager and afterward we again experienced the same problem as before: LabView freezes when loading the program.
    Obviously, we cannot afford to reinstall Windows every time. Are there any known Windows XP / NI-DAQ issues that might cause the freezing of LabView? We would be very grateful for any idea.
    Best regards,
    Matthias

    Hello Sprice,
    Browse the shipping examples according to “Directory Structure” and then select
    DAQ to find the Traditional DAQ examples. 
    There a lot of examples that are written for counters (Counter >>
    daq-stc.llb >> Count Edges (DAQ-STC).vi). 
    What kind of signals are your photons creating?  Are they TTL compatible at a certain
    frequency?  You don’t care about overwriting
    your buffer?
    Respectfully,
    Rob F
    Test Engineer
    Condition Measurements
    National Instruments

  • Wouldl like to use an large external with my mac book-if so how can I shut the lid without losing the screen?

    Wouldl like to use an large external with my mac book…if so how can I shut the lid without losing the screen?

    This is the article on the subject:
    Mac notebooks: How to use your computer in closed clamshell (display closed) mode with an ...
    But it does not cool as well when closed. I suggest you arrange your workflow across the two screens side to side, or put the Big Display up on blocks and open the laptop below it, and use both screens in Extended Desktop:

  • When using facetime having difficulty with video, sound is ok.screen says reconnecting.

    When using facetime having difficulty with video.msound is ok. Screen says reconnecting

    There have been numerous reports of FaceTime problems for the last several days and it is unclear what the cause if. Following is one of many discussions of the issue: https://discussions.apple.com/thread/6096640?tstart=120

  • How to numberformat when using sql:query alogn with c:forEach JSTL tags

    Is there anyway to format the numeric values returned from the database when using <sql:query> alogn with <c:forEach> tags
    Here is my jsp code
    <sql:query..../>
    <c:forEach var="row" items="${queryResults.rows}">
    <tr>
    <td><c:out value="${row.COL1}" /></td>
    <td><c:out value="${row.COL2}" /></td>
    </tr>
    </c:forEach>
    Col1 values are numeric without any formats Eg: 1000, 10000, 1000000 etc.
    how can i format them to 1,000 , 10,1000 , 100,000 etc

    It is polite to mention what your answer was. These posts are not just here for you to ask questions, but to be used as a resource for other people to find answers. Saying "I solved it" with no details helps noone.
    I presume you discovered the JSTL <fmt:formatNumber> tag?

  • When using printer Epson R1900 with Aperture 3 and if I mistakenly choose the wrong paper such as, epson's luster instead of glossy, does that change the exposure? Like make it too dark one or two stops!

    When using printer Epson R1900 with Aperture 3 and if I mistakenly choose the wrong paper such as, epson's luster instead of glossy, does that change the exposure? Like make it too dark one or two stops!

    Hi,
       If you choose the incorrect settings for printing, yes - the print quality will be affected.
    Different papers absorb the ink differently, so you can end up with prints that are too light, too dark, or have a colour cast if you make incorrect choices in your Aperture or printer settings.

  • HT201178 when using apple bluetooth keyboard with iPad, hitting the enter/return key while typing in iMessage only adds another line not 'send' the message? is there a setting to change that somewhere?

    when using apple bluetooth keyboard with iPad, hitting the enter/return key while typing in iMessage only adds another line not 'send' the message? is there a setting to change that somewhere?

    Everywhere that I've checked it is not possible to do this. I would like to even do this using the vkb. I hate having to stretch my thumb all the way up just to send a message. It's messaging, not a report or email. Seems backwards. Hopefully some day Apple can add this option.

  • Sand Box has stopped working error when using System Exec.vi with wait until completion is true

    I get the following error message in Windows 7 "Sand Box has stopped working" when using System Exec.vi with wait until completion set to true, if I set it to false there is no error message.

    Hello JJVerdi
    mmm well System Exec.vi simulates a DOS command window, can you run the sandbox from the cmd window using the same commands without any errors? 
    you may take a look to this KB, it may be related to your issue:
    http://digital.ni.com/public.nsf/websearch/2393462​BD57B854186256C4F007B706A?OpenDocument
    Regards
    Mart G

  • When using i-Cloud PAGES with another shared person, how to you shift ownership control of the file to the other who started as a collaborator?

    When using i-Cloud PAGES with another shared person who is a collaborator, how to you shift ownership control of the file to the shared person who started as a collaborator and needs to take over file ownership responsibilities?

    Thanks, but I have searched here but have not found or heard a direct answer to my question as stated above...

  • Conversion failure when using PDF Pack to convert a publisher file

    Up until the last few months, I used acrobat 8 to convert my church's newsletter from Publisher to PDF for posting on our church website.  When we switched to Windows 8 in January my Acrobat 8 couldn't be installed.  We just registered for the PDF pack with the yearly subscription fee and I have tried twice to convert our most recent newsletter.  Both time the conversion failed with the second time sending the message that the file was too complex or too large to convert.
    What do I need to do to make Acrobat XI as least as capable as Acrobat 8 in converting publisher files?

    Hi eec hampton,
    Adobe PDF Pack and Acrobat XI are two different things. PDF Pack is an online service, whereas Acrobat XI is a much more current version of the Acrobat that you had on your computer until recently.
    There is a file size limit to the files that you convert with PDF Pack (100MB), but even when a file falls below that file size, the complexity of the file (how much text and graphics, and so on) can cause conversion failure. (You could be dealing with bandwidth issues, for example, as the file is uploaded to the Internet for conversion.)
    One option it to convert smaller portions of the newsletter. You can also download a free 30-day trial of Acrobat XI from www.adobe.com/products/acrobat.html, and convert your publisher document using that.
    Please let us know how it goes.
    Best,
    Sara

  • Connection failure when connecting to the net with...

    I hope someone can help me. I have got Nokia PC suite on my PC. I often use it to connect to the net. Just recently I had a few viruses on my pc and now since they have been cleaned off I keep getting a connection failure when I try to connect. I have tried uninstalling and reinstalling my software but nothing seems to help. I know it is something to do with my pc as I have tried four different phones that do work on other pc's, just not this one.
    I have checked to make sure all the modem settings are right and that the phone is detected as a modem.
    What should I try that might help solve this??
    Thanks
    Katherine

    Make sure you have entered the access point in the one touch access settings, enter the settings maually and try to connect.
    If a reply has solved your problem click Accept as solution button, doing it will help others know the solution. Thanks.

  • Random Authentication Failures when using AdminConnectionFactory

    Has anyone experienced this problem when using the AdminConnectionFactory to create a JMXConnector. I have a Sun ticket open on this issue, but wanted to see if anyone else had any suggestions. Ticket # is 72502922
    Our application uses the Sun AdminConnectionFactory to obtain a JMXConnector object. The code is being executed in a loop at a regular frequency. There is no dynamic nature to the code. All the information required to open a connection using the AdminConnectionFactory comes from static property files. So there is no question of one call being any different than a second call.
    Every so often the call to create a connection fails with the exception message:
    Cannot create JMXConnector to JMS server [jmssys.putnaminv.com:7683] using username [JMXMetricsClient.User] and password [XXX]
    at com.putnam.jms.jmx.JMXUtil.<init>(JMXUtil.java:146)
    at com.putnam.jms.metrics.core.MetricsRetrievalJob.run(MetricsRetrievalJob.java:58)
    at com.putnam.jms.metrics.core.MetricsRetrievalJob.execute(MetricsRetrievalJob.java:37)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)
    Caused by: javax.management.JMException: Caught exception when creating JMXConnector
    at com.sun.messaging.AdminConnectionFactory.createConnection(AdminConnectionFactory.java:219)
    at com.putnam.jms.jmx.JMXUtil.<init>(JMXUtil.java:138)
    ... 4 more
    Caused by: java.lang.SecurityException: JMX connector server jmxrmi: Failure detected during authentication java.security.AccessControlException: [B4043]: Connection not authenticated
    at com.sun.messaging.jmq.jmsserver.management.agent.MQJMXAuthenticator.authenticate(MQJMXAuthenticator.java:125)
    at javax.management.remote.rmi.RMIServerImpl.doNewClient(RMIServerImpl.java:213)
    at javax.management.remote.rmi.RMIServerImpl.newClient(RMIServerImpl.java:180)
    at sun.reflect.GeneratedMethodAccessor60.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
    at sun.rmi.transport.Transport$1.run(Transport.java:159)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:619)
    at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
    at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
    at javax.management.remote.rmi.RMIServerImpl_Stub.newClient(Unknown Source)
    at javax.management.remote.rmi.RMIConnector.getConnection(RMIConnector.java:2312)
    at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:277)
    at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:248)
    at com.sun.messaging.AdminConnectionFactory.createConnection(AdminConnectionFactory.java:217)
    ... 5 more
    The code to create a connection using the AdminConnectionFactory is straight forward:
         JMXConnector jmxc = null;
    try {
    AdminConnectionFactory acf = new AdminConnectionFactory();
    acf.setProperty(AdminConnectionConfiguration.imqAddress, hostname + ":" + port);
    jmxc = acf.createConnection(user, password);
    } catch (JMSException jmse) {
    message = logMsgPrefix + "Cannot create JMXConnector to JMS server [" + hostname + ":" + port + "] using username [" + user + "] and password [" + password + "]";
    log.error(message);
    throw new GenericJMXException(message, jmse);
    } catch (JMException jme) {
    message = logMsgPrefix + "Cannot create JMXConnector to JMS server [" + hostname + ":" + port + "] using username [" + user + "] and password [" + password + "]";
    log.error(message);
    throw new GenericJMXException(message, jme);
    What is causing this connection creation to fail. The same application will work just fine a few minutes later.
    Thanks
    Aspi Engineer
    Putnam Investments

    Thank you for the response.
    Bug 6906978 is a defect that shows itself under high concurrency situations. In our case, we have a single quart based timer that is being triggered every 2 minutes to open a JMX connector. So my guess is that bug 6906978 and the problem that we have been experiencing are two different things.
    But I am willing to try out 4.4U1P1. Any idea where I can download it from?
    - Aspi

  • Bad performance when using  complex database view with Toplink

    Hi
    Problem description
    1. I have a complex query that collects the data from many DB tables. For this reason I create a database view based on this select. Using EJB 3.0 with Toplink I
    mapped this view to a java object the same way I map database tables. The method I use to get the results is:
    snippet code...
    public List<VwKartela> VwKartela(Integer pperid) {
    List<VwKartela> results = null;
    Session session = getSessionFactory().acquireSession();
    ExpressionBuilder bankfile = new ExpressionBuilder();
    Expression exp1 = bankfile.get("perid").equal(pperid);
    ReadAllQuery query = new ReadAllQuery();
    query.setReferenceClass(VwKartela.class);
    query.setSelectionCriteria(exp1);
    results =(List<VwKartela>)session.executeQuery(query);
    When running the select on the view prom SQL Plus I haven’t any performance problem.
    2.Question: How can I improve the performance? I referenced to Toplink docs but I didn't improve the it.
    Have anyone any experience is such cases?
    Thank you
    Thanos

    Hi
    After my last tests I conclude at the followings:
    The query returns 1-30 records
    Test 1: Using Form Builder
    -     Execution time 7-8 seconds
    Test 2: Using Jdeveloper/Toplink/EJB 3.0/ADF and Oracle AS 10.1.3.0
    -     Execution time 25-27 seconds
    Test 3: Using JDBC/ADF and Oracle AS 10.1.3.0
    - Execution time 17-18 seconds
    When I use:
    session.setLogLevel(SessionLog.FINE) and
    session.setProfiler(new PerformanceProfiler())
    I don’t see any improvement in the execution time of the query.
    Thank you
    Thanos

  • ORA-00907: missing right parenthesis when using group by clause with xmlagg

    I have the following query and I am getting ORA 00907 Error when I am using group by clause with the xmlagg function.
    select xmlelement("Mitigation",
                    xmlelement("m_szMethodName",tm.DisplayName),
                    xmlelement("SubstanceInterferenceProtocolList",
                                (select xmlagg(xmlelement("MitigationProtocol",
                                        xmlelement("m_szMethodName",tm.DisplayName),
                                        xmlelement("m_szInterferenceProtocolName",tmp.protocol_name),
                                        xmlelement("m_szInterferenceSubstance",tmp.intf_mtrl_prod_code),
                                        xmlelement("m_ProtocolParameters",
                                            xmlelement("m_szProtocolName",tmp.protocol_name),
                                                xmlelement("m_Consumables",
                                                    xmlelement("Consumable",
                                                        xmlelement("m_szConsumId", xrl.rgnt_pack_name),
                                                        xmlelement("m_szProductCode",xrl.pack_prod_code),
                                                        xmlelement("m_nVolume",tmp.fluid_vol),
                                                        xmlelement("m_szProtocolStep",xps.protocol_step_name))),
                                                    xmlelement("m_ProtParamList",
                                                        xmlagg(
                                                        xmlelement("ParameterValues",
                                                            xmlelement("m_szProtocolName",tmp.protocol_name),
                                                            xmlelement("m_Time",xpsd.parameter_ntime_value))
                                                        group by tmp.ccd_test_id,tmp.intf_mtrl_prod_code)
                    order by tmp.ccd_test_id, tmp.intf_mtrl_prod_code, xps.protocol_step_intprotocolstep )
                    from XPR_tdef_mitigation_protocol tmp, xp_reagentlist xrl,
                    xpr_protocol_settings xps, xpr_protocol_settings_default xpsd
                    where tmp.ccd_test_id = tm.ccd_test_id
                    and tmp.ccd_test_id = xrl.ccd_test_id
                    and tmp.pack_prod_code = xrl.pack_prod_code
                    and tmp.intf_type = 1
                    and xps.protocol_name = xpsd.protocol_name
                    and xps.protocol_step_name = xpsd.protocol_step_name
                    and xps.ps_action_parameterlist = xpsd.ps_action_parameterlist
                    and xps.protocol_name =  tmp.PROTOCOL_NAME
    from XPtoXPRTdef_defn_mapping tm
    where tm.DisplayName = 'SYPH'If I remove the xmlagg clause along with the group by clause, the query runs fine and give me the output.
    But in that XML format of the output is incorrect for my application.
    Could someone help here?

    Hi,
    userAtoZ wrote:
    I have the following query and I am getting ORA 00907 Error when I am using group by clause with the xmlagg function.
    ... xmlagg(
    xmlelement("ParameterValues",
    xmlelement("m_szProtocolName",tmp.protocol_name),
    xmlelement("m_Time",xpsd.parameter_ntime_value))
    group by tmp.ccd_test_id,tmp.intf_mtrl_prod_code)Please don't post unformatted code. When posting any formatted text on this site, type these 6 characters:
    \(small letters only, inside curly brackets) before and after each section of formatted text, to preserve spacing.
    If the code above were formatted well, so that you could match each '(' with its closing ')', it would look something like this:... xmlagg ( xmlelement ( "ParameterValues"
                        , xmlelement ( "m_szProtocolName"
                                       , tmp.protocol_name
                        , xmlelement ( "m_Time"
                                       , xpsd.parameter_ntime_value
    group by tmp.ccd_test_id
                        ,     tmp.intf_mtrl_prod_code
    This is exactly what you posted, only the whitespace has been changed.
    This makes it clear that the GROUP BY is inside the parentheses with the argument to XMLAGG.  You can have an ORDER BY clause there, but not a GROUP BY clause.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Maybe you are looking for