creatdb error

Post Reply
aitchon
Posts: 118
Joined: Mon Jan 22, 2007 10:30 am

creatdb error

Post by aitchon »

I'm trying to run creatdb within a docker container and I'm getting the following error:

Code: Select all

[txusr@bclr-deployment-5d8c8fd9db-rbnv5 qsend]$ creatdb tmp1
100 Open shared mem failed: No space left on device; trying again in the function TXgetLockObject
100 Open shared mem failed: No space left on device; trying again in the function TXgetLockObject
100 Open shared mem failed: No space left on device; trying again in the function TXgetLockObject
000 Open shared mem failed: No space left on device in the function TXgetLockObject
002 Cannot open shared mem /mnt/data/ftp/qsend/tmp1: No space left on device in the function TXgetLockObject
006 Timeout sending data to 127.0.0.1:10005 in the function htbuf_flushnblk
000 Could not create locks for database /mnt/data/ftp/qsend/tmp1 via monitor: Connection timeout in the function TXcreateLocksViaMonitor
000 Could not open locking mechanism for database /mnt/data/ftp/qsend/tmp1 in the function TXdblockOpenViaMethods
At the time of the command, I have about 1000 db's created. Is it reaching a limit when trying to create a new one?
User avatar
Kai
Site Admin
Posts: 1272
Joined: Tue Apr 25, 2000 1:27 pm

Re: creatdb error

Post by Kai »

Probably. No space left on device in an open-shared-mem context means there's no room left to create a new shared mem segment; each in-use database needs one for locks (~220 KB each), and with 1000 created the OS has probably run out of space. If you're not using all 1000 databases at once, you can recover some shared mem with rmlocks -f on each database when you are done with it, to free its lock structure.

You can also try increasing the max number of available shared mem segments; you'll have to check your OS/docker docs to find how to do that. (I think there's a --shm-size docker option.)
User avatar
John
Site Admin
Posts: 2613
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

Re: creatdb error

Post by John »

You can cat /proc/sys/kernel/shmmni to see the number of shared memory segments allowed. You can increase the number by writing a larger number to /proc/sys/kernel/shmmni, or add it to /etc/sysctl.conf to keep past a reboot, e.g.

echo "kernel.shmmni = 16384" >> /etc/sysctl.conf
John Turnbull
Thunderstone Software
Post Reply