Shared memory parameters question
Posted in 1999
User's ESQL/C application on SunOS 5.6 failed to malloc more than 8MB despite setting SHMBASE to 0x50000000 in onconfig.ows. Responses suggested setting INFORMIXSHMBASE environment variable before app startup (not via putenv) with proper syntax (equals sign required).
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Server Administration
I have an ESQL/C application connected to Informix via shared memory.
When it tries to malloc() more than about 8 MB, the malloc fails.
I'm using
SHMBASE 0x50000000
in the onconfig.ows file, which seems like it should be plenty high.
The client program does
putenv("INFORMIXSHMBASE 1310720");
(this value is 0x50000000/1024); however, this doesn't seem to
make any difference; is it relevant?
The server is INFORMIX-OnLine Version 7.20.UC4
on SunOS 5.6 running on a SPARC.
Any ideas how I can solve this problem?
Please reply to me by email. Thanks!
David Anderson
anderson@surf.com
David Anderson wrote:
> I have an ESQL/C application connected to Informix via shared memory.
> When it tries to malloc() more than about 8 MB, the malloc fails.
> I'm using
>
> SHMBASE 0x50000000>
> in the onconfig.ows file, which seems like it should be plenty high.
> The client program does
> putenv("INFORMIXSHMBASE 1310720");
> (this value is 0x50000000/1024); however, this doesn't seem to
> make any difference; is it relevant?
Well, I wouldn't think the putenv would have any effect. I think that if
you want to set INFORMIXSHMBASE, you'll have to set it before you start
the application. Once you've started running, it's already set. Try
setting INFORMIXSHMBASE (to something higher) in your environment before
starting the app, and see if that makes a difference.
June
--
june_t@hotmail.com
Grounded in Palo Alto, living on M&M's (plain)
June Tong wrote:
> David Anderson wrote:
> > I have an ESQL/C application connected to Informix via shared
> > memory. When it tries to malloc() more than about 8 MB, the
> > malloc fails. I'm using
> >
> > SHMBASE 0x50000000> >
> > in the onconfig.ows file, which seems like it should be plenty high.
> > The client program does
> > putenv("INFORMIXSHMBASE 1310720");
> > (this value is 0x50000000/1024); however, this doesn't seem to
> > make any difference; is it relevant?
>
> Well, I wouldn't think the putenv would have any effect.
If it is set before any database operations occur, it should be
OK -- provided you set the environment correctly. The notation
shown is wrong; you need to use:
putenv("INFORMIXSHMBASE=1310720");
That equals sign is critical -- maybe you shouldn't use C Shell so
much because that does not use the '=' in the setenv command, but
puts it into the value actually in the environment.
> I think that if you want to set INFORMIXSHMBASE, you'll have to
> set it before you start the application.
This is safer, but not necessary as long as the putenv() call is
before the first database operation.
> Once you've started running, it's already set. Try setting
> INFORMIXSHMBASE (to something higher) in your environment before
> starting the app, and see if that makes a difference.
I'm not sure that it is a good idea to set the SHMBASE parameter
in the ONCONFIG file to the same value as INFORMIXSHMBASE. They
are referring to two different types of shared memory, and setting
them to the same value may confuse things.
--
Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net)
Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN
#include <disclaimer.h>
On 7 Jan 1999 23:34:40 GMT, anderson@ICSI.Berkeley.EDU (David
Anderson) wrote:
I had exactly the same problem and tried to change SHMBASE in
onconfig.ows (and restarting online) with exactly same result.
It must be a bug in Informix shared memory client. I had to switch to
TCP-IP and everything worked perfectly.
On HPUX the same version of client worked perfectly with shared
memory.
It seems to me unaccaptable and dangerous that you have to hardcode
shared memory location for client server code communication and malloc
can allocate exactly up to 8 Mbytes.
>I have an ESQL/C application connected to Informix via shared memory.
>When it tries to malloc() more than about 8 MB, the malloc fails.
>I'm using
>
>SHMBASE 0x50000000>
>in the onconfig.ows file, which seems like it should be plenty high.
>The client program does
>putenv("INFORMIXSHMBASE 1310720");
>(this value is 0x50000000/1024); however, this doesn't seem to
>make any difference; is it relevant?
>
>The server is INFORMIX-OnLine Version 7.20.UC4
>on SunOS 5.6 running on a SPARC.
>
>Any ideas how I can solve this problem?
>Please reply to me by email. Thanks!
>
>
>David Anderson
>anderson@surf.com
You have not give us information about wich operating sistem you are
using. But I recommed you to read the release notes in the release
directory. Usually there are a operating system configuration you should
put in your O.S. files.
This configuration tips are in the ONLINE_* file
Hope this helps.
Vicente Salvador
DEISTER, S.A. (Spain)
David Anderson wrote:
> I have an ESQL/C application connected to Informix via shared memory.
> When it tries to malloc() more than about 8 MB, the malloc fails.
> I'm using
>
> SHMBASE 0x50000000>
> in the onconfig.ows file, which seems like it should be plenty high.
> The client program does
> putenv("INFORMIXSHMBASE 1310720");
> (this value is 0x50000000/1024); however, this doesn't seem to
> make any difference; is it relevant?
>
> The server is INFORMIX-OnLine Version 7.20.UC4
> on SunOS 5.6 running on a SPARC.
>
> Any ideas how I can solve this problem?
> Please reply to me by email. Thanks!
>
> David Anderson
> anderson@surf.com
In article <36A1DEF7.876B9549@deistersoft.com>, V.Salvador <nospam_vsalv
ador@deistersoft.com> writes
>You have not give us information about wich operating sistem you are
^^^^^^^^^^^^^^^^
>using. But I recommed you to read the release notes in the release
>directory. Usually there are a operating system configuration you should
>put in your O.S. files.
>
>This configuration tips are in the ONLINE_* file
>
>Hope this helps.
>
>Vicente Salvador
>DEISTER, S.A. (Spain)
>
>David Anderson wrote:
>
>> I have an ESQL/C application connected to Informix via shared memory.
>> When it tries to malloc() more than about 8 MB, the malloc fails.
>> I'm using
>>
>> SHMBASE 0x50000000>>
>> in the onconfig.ows file, which seems like it should be plenty high.
>> The client program does
>> putenv("INFORMIXSHMBASE 1310720");
>> (this value is 0x50000000/1024); however, this doesn't seem to
>> make any difference; is it relevant?
>>
>> The server is INFORMIX-OnLine Version 7.20.UC4
>>
> on SunOS 5.6 running on a SPARC.
^^^^^^^^^
>>
>> Any ideas how I can solve this problem?
Remove the putenv, you should never use putenv for Informix
environment variables.
Also check the release notes.
Also I think it may be a known problem, talk to Informix Support
I thought I've heard about this problem before..
>> Please reply to me by email. Thanks!
>>
>> David Anderson
>> anderson@surf.com
>
--
David Williams