473,769 Members | 2,124 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Semaphore Error

Hello all,

I m facing an interesting problem related to semaphore in php.

We are using a huge business application running on LAMP. For database
operations we are maintaining centralized DB manager classes in php
which perform all the single table related activity. Before inserting
new record we are acquiring semaphore on specific key (all the tables
are having seprate sem keys), insert the record and release the
semaphore.
From past few days we are getting error "Warning: sem_get()

[function.sem-get]: failed for key ___: No space left on device", i've
gone to linux console check thru ipcs command whether semaphore is
there or not ?? ___ sem was there i've removed that by ipcrm, it
started working.

Now the problem is, I m acquiring sem on key say 774, then i m not able
to use sem keys 775, 776, 777 etc, I really dont know the reason.

I've made one test page having a loop in which i'd tried to acquire
semaphore from a certain range starts from 10 to 200, i also display
the result whether semaphore acquire is succeed or not..?? I've
executed the script and got the random result. on some keys i've
succeed and on some i've got problem with the above error message.

I'm searching the problem on google but i m not getting proper
solution. Can anyone has faced the same or related problem like this?

Thanks
Rushik.

Oct 27 '05 #1
1 2646
rushik wrote:

We are using a huge business application running on LAMP. For database
operations we are maintaining centralized DB manager classes in php
which perform all the single table related activity. Before inserting
new record we are acquiring semaphore on specific key (all the tables
are having seprate sem keys), insert the record and release the
semaphore.

Why? MySQL is quite capable of isolating DML operations.
From past few days we are getting error "Warning: sem_get()

[function.sem-get]: failed for key ___: No space left on device", i've
gone to linux console check thru ipcs command whether semaphore is
there or not ?? ___ sem was there i've removed that by ipcrm, it
started working.


(/me does not like IPC)

How many semaphores have you got in use? It might be useful to include (a
sample of) the output of ipcs or 'cat /proc/sysvipc/shm'. AIR there are
hard limits compiled into the kernel.
Now the problem is, I m acquiring sem on key say 774, then i m not able
to use sem keys 775, 776, 777 etc, I really dont know the reason.


eh? I've only seen mapping filenames to keys using ftok.

HTH

C.
Oct 29 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
3901
by: dede | last post by:
Dear community, having written a working example for using Semphores on a windows client, I created a little "server-application" that does the following: A Server continously "listens/tails" a command-file for new commands. If a new commands arrives a split of the workload to threads is under- taken that "control themselves" via Semaphore and are joined finally. It works.
4
16931
by: Margie | last post by:
Hi, has anyone gotten the error "semaphore timeout" when trying to do a backup to disk? The disk is a logical partition. There are two drives, c: and d:. Backing up to c: is fine. However, backing up to d: produces the error below. Thanks in advance for any help. Here is the command : backup database model to TestM2 2003-07-19 09:21:35.77 spid51 Error: 15457, Severity: 0, State: 1 2003-07-19 09:21:35.77 spid51 Configuration...
32
4234
by: William Stacey [MVP] | last post by:
Here is the link. If you find an issue or think of a feature, please post a reply or send an email. Cheers! http://www.mvptools.com/doco/csharp/semaphoredjikstra.htm -- William Stacey, MVP
5
4607
by: marvind | last post by:
I tried using a Semaphore class (have included the full listing reproduced from article Figure 1 at the end of this email) in .NET 1.1. It works fine most of the time, however, I see the following error occassionally: 08/28/2005 17:32:42.82, Verbose, QueryObject.MergeSubQuery, Exception: Too many posts were made to a semaphore in mscorlib. Server stack trace:
5
2523
by: Unni | last post by:
Hello all, I m facing a memory related problem with semaphores. Our business application uses semaphores extensively and the limit imposed by the OS on the number of semaphores that can exist on the system is only 128. This could be increased to a higher value but that would not be a permanant solution to my belief. We are using the sem_get, sem_acquire php functions. After the use we are releasing the semaphore by using sem_release.
2
2146
by: techi_C | last post by:
Hi I'm getting a problem while removing semaphore from system. Before removing semaphore I'm checking the usage count of a smaphore. // checking usage count usage_count = semctl(sem_ptr->semid, 1, GETVAL, NULL); if( usage_count 1 ) // return don't remove semaphore else
1
2272
by: cranfic | last post by:
Please help... To make it simple, I have a simple test C program which calls my semphore library functions only. (It doesn't call any db2 function at all). And the following is the test program: #include "hasem.h" #include <semaphore.h> #include <stdio.h>
0
2251
by: Samuel R. Neff | last post by:
I'm having trouble creating a Semaphore with read-access rights for everyone. Originally I was trying to use this code: semaphore = new Semaphore(maxLocks, maxLocks, "RwLock#" + name); but when using that code to create a Semaphore instance for an existing system semaphore (i.e., the second time the code gets hit), I get an UnauthorizedAccessException. So I tried specifying that everyone has read rights:
5
2723
by: GHUM | last post by:
hello, in my application I am using hSem = win32event.CreateSemaphore (None, 1, 1,"stringincludinginterfaceandport") rt=win32event.WaitForSingleObject (hSem, 0) if rt != win32event.WAIT_TIMEOUT: really_do_start_my_app() else:
0
9583
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10210
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10039
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9990
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8869
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7406
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5297
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3955
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.