I am using msgget()
function in my IPC based application. How can I clean up the queue filled up with old message queues?
How to cleanup the IPC message-queue
cipcmessage-queue
cipcmessage-queue
I am using msgget()
function in my IPC based application. How can I clean up the queue filled up with old message queues?
ENOSPC
from msgget
indicates that the system-wide maximum number of message queues has been reached.
You may be able to configure this limit - eg in Linux you can tweak /proc/sys/kernel/msgmni
.
Several tips:
pragma journal_mode
). There is NORMAL
, and then there is OFF
, which can significantly increase insert speed if you're not too worried about the database possibly getting corrupted if the OS crashes. If your application crashes the data should be fine. Note that in newer versions, the OFF/MEMORY
settings are not safe for application level crashes.PRAGMA page_size
). Having larger page sizes can make reads and writes go a bit faster as larger pages are held in memory. Note that more memory will be used for your database.CREATE INDEX
after doing all your inserts. This is significantly faster than creating the index and then doing your inserts.INTEGER PRIMARY KEY
if possible, which will replace the implied unique row number column in the table.!feof(file)
!
Best Answer
To delete a queue, use the following command:
SYSTEM CALL: msgctl()