Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re: avoiding a race

by lostjimmy (Chaplain)
on Sep 28, 2010 at 14:18 UTC ( #862426=note: print w/replies, xml ) Need Help??

in reply to avoiding a race

I was going to suggest something similar to what gman said, but then I thought if you were having database issues, one of those issues might be that the DB is down, so recording errors in the DB might not work out so well.

I came up with two ideas: 1) Have all processes write their errors to log files named by process ID; then have a separate process create a report from those logs and email the admin. 2) Have a daemon listening on a socket (maybe a unix socket for simplicity) and have all processes write their errors to that socket. This process will make the decisions about which errors to report.

Both options have the advantage of the reporting logic being in one place, and there shouldn't be any race conditions.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://862426]
[marto]: a security event in the building, police dogs and and so on...
[Discipulus]: a test I hope..
[marto]: just a security event, they have people from the 'corporate' security, external security companies, the police etc

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2017-11-22 10:25 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (317 votes). Check out past polls.