RE: Virtual Shared Memory
Posted in 2001
Yup - users blame the whole system for <ctrl>-S events.
Locks *can* be retried in while loops
LET locked = -1
WHILE locked
LET locked = 0
try_do_query
IF query_locked THEN
LET locked = -1
END IF
other_error_handling
END WHILE
The problem is that (almost) every hit on the DB has to be wrapped up in
this kind of loop where a single call to LOCK MODE WAIT simplifies
the programmer's task.
The ability to use a call-back would help (C, C++, and Java languages, but
not 4gl/basic) something like ...
int lock_check( int() call_back_query, int() error_handler, varg
call_back_arg_list )
-----Original Message-----
From: Mark D. Stock [mailto:mdstock@mydas.freeserve.co.uk]
Sent: 25 January 2001 23:03
To: Jonathan Leffler
Cc: informix-list@iiug.org
Subject: Re: Virtual Shared Memory
Jonathan Leffler wrote:
>
> Sharok wrote:
> > Recently I get this message in online.log file.
> > Who knows what' wrong!!!
> >
> > Message:
> > 00:58:36 shmat: [EINVAL][22]: shared memory base address illegal
> > 00:58:36 using 0xd0000000, needs 0xffffffff
> > 00:58:36 out of virtual shared memory>
> You're out of virtual memory -- you haven't configured enough swap
> space. And your server wants some more memory and can't get it.
>
> Speaking personally, and only with respect to non-production systems, I
> always place an upper limit on the amount of shared memory that any
> OnLine system is allowed to use via the SHMTOTAL parameter in the
> onconfig file. I would probably try that on production systems too, but
> others may disagree with me and have the experience with production
> systems to provide counter-arguments for why it is a bad idea to control
> the amount of memory OnLine is allowed to use.
Simple, users. If it weren't for them, I would agree, but users define
the stability of the system. If their application runs slowly, they get
upset, but never let it crash, or give errors and exit, which is the
same thing to them.
I know, I know, the application should put up a message saying "I'm
terribly sorry, but there is no more memory available at present. Could
you please take a short break and try again later"....., but I've never
come across one that does. It's also no good telling them the database
server is up and running fine, as far as they are concerned, it's down.
:-)
Cheers,
--
Mark.
+----------------------------------------------------------+-----------+
| Mark D. Stock mailto:mdstock@mydas.freeserve.co.uk |//////// /|
| http://www.informix.com http://www.informixhandbook.com |///// / //|
| http://www.iiug.org +-----------------------------------+//// / ///|
| |This email will self-destruct in |/// / ////|
| |10 sec. If you received this email |// / /////|
| |in error, sorry about the mess. |/ ////////|
+----------------------+-----------------------------------+-----------+