If when connected remotely a client has requested a very large or very complex query more from the server, more RAM may be needed by the remote client server than was allocated by default upon server startup.
The server process itself will try and allocate more RAM so long as we do not exceed the total number of segments allocated at startup.
When we attempt to exceed the allocated shared memory then the (6495) error will be generated.
To monitor the amount of shared memory used by the database, connect through PROMON to your database in shared memory. The PROMON utility will allow you to display the shared memory segment ids and shared memory segments memory in use for a specific database. This method can be used on Windows and Unix platforms.
$ promon dbname
At the "Enter your selection:" prompt, access the R&D Menu by typing:
R&D <return>
Select Option
1, for
Status DisplaysSelect Option
14, for
Shared Memory SegmentsSample output:
Status: Shared Memory Segments
Seg Id Size Used Free
1 6 268435456 268435444 12
2 7 268435456 268435220 236
3 8 120987648 116561868 4425780In this example,
There are 3 shared memory segments.
Only the last segment will have any appreciable space free (4425780).
If over time the amount of 'free' decreases, OpenEdge 10.1C introduced new functionality for the PROUTIL executable which allows online dynamic modification of some critical database server startup parameters which can be used to increase shared memory online. The parameters would be -B to allocate more memory for the buffer pool, or -Mxs to allocate extra excess memory.
$ proutil dbname -C increaseto -Mxs <value in KB>
The user running this cmd, must have the appropriate permissions to execute this utility. Please refer "OpenEdge Management: Database Administration - proutil increaseto qualifier"
All current promon connections must be stopped prior to running the 'proutil -C increaseto'
If existing connections have not yet connected to the shared memory or
an additional shared-memory segment needs to be allocated to satisfy the 'proutil -C increaseto' argument, a message will appear listing these connections and prompt "yes/no" to wait. Either these connected users need to 'do something' on the server-side to re-address the shared-memory segments or they need to be disconnected before the additional shared memory can be allocated.
When the database is eventually shutdown, startup parameters should be reviewed.
This information can also be queried with the
_segments VST table. This method can be used on Windows and Unix platforms.
FOR EACH _segments NO-LOCK:
DISPLAY _segments EXCEPT _segment-misc.
END.