Relational data base managers (RDBMS) make use of semaphores (and messages too) to insure that multiple users (or processes) do not clash when updating a table; the idea is the same as semaphores on railroads so that two trains do not use the same section of track at the same time, one waits, the other goes.
You may want to look at any applications you've written to see how many updates are happening at any given time rather than simply increasing the number of semaphores. PostgreSQL handles collisions pretty well (as do MariaDB/MySQL) but it's more or less up to you to do updates serially in your application software. Look to see if you have multiple processes updating the same table at the same time and consider using a single function to do the updates (or inserts or deletes) which will give the DBMS a better chance at not running out of semaphores. Also, if you've use semaphores in your programming but sure that when a semaphore has completed that it release the semaphore so you don't get overflow.
Have a look at what the [I]ipcs/I] utility show you. On a quiescent system (mine) you'll see something like this
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x00000000 1443004416 trona 600 393216 2 dest
0x00000000 1443037185 trona 600 393216 2 dest
0x00000000 1443069954 trona 600 393216 2 dest
0x00000000 1443102723 trona 600 393216 2 dest
0x00000000 1443266564 trona 600 393216 2 dest
0x00000000 1443495941 trona 600 393216 2 dest
0x00000000 2010152966 trona 600 393216 2 dest
0x00000000 2010251271 trona 600 393216 2 dest
0x00000000 2012446728 trona 600 393216 2 dest
0x00000000 1448345609 trona 600 524288 2 dest
------ Semaphore Arrays --------
key semid owner perms nsems
0xcbc384f8 44204035 trona 600 1
------ Message Queues --------
key msqid owner perms used-bytes messages
Those semaphore arrays are managed by MariaDB in this case -- if you see a whole lot of them, that's a hint to look deeper, and, of course, simply increasing the size of space you need might be the right answer but so may looking into how you are updating from multiple processes.
Hope this helps some.